]>
Commit | Line | Data |
---|---|---|
1 | --- erand48.c.orig 2003-05-20 15:21:01.000000000 -0700 | |
2 | +++ erand48.c 2005-11-03 12:30:30.000000000 -0800 | |
3 | @@ -19,8 +19,8 @@ | |
4 | double | |
5 | erand48(unsigned short xseed[3]) | |
6 | { | |
7 | - _dorand48(xseed); | |
8 | - return ldexp((double) xseed[0], -48) + | |
9 | - ldexp((double) xseed[1], -32) + | |
10 | - ldexp((double) xseed[2], -16); | |
11 | + uint48 tmp; | |
12 | + ERAND48_BEGIN; | |
13 | + DORAND48(tmp, xseed); | |
14 | + ERAND48_END(tmp); | |
15 | } |