Random number generators discussion

Random number generators | www.agner.org

Fast Float Conversion
Author:  Date: 2004-08-30 05:38
The method for Int to FastFloat conversion is working fine. Can u tell me is there any similar methad for float to Int conversion.

union {
double randp1;
uint32 randbits[2];};
randbits[0] = x << 20;
randbits[1] = (x >> 12) | 0x3FF00000;
return randp1 - 1.0;}


Any pointer to this will be apreciated.

Regards
Sandeep H.R

 
thread Fast Float Conversion - Sandeep - 2004-08-30
last reply Fast Float Conversion new - Agner - 2004-08-31