Russ Coxa934846f21 years agoHistory
17 lines · 210 B · C
RawDownload
#include	<u.h>#include	<libc.h> #define	MASK	0x7fffffffL#define	NORM	(1.0/(1.0+MASK)) doublefrand(void){	double x; 	do {		x = lrand() * NORM;		x = (x + lrand()) * NORM;	} while(x >= 1);	return x;}

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t