jfjr@mitre-bedford.arpa (Freedman) (07/25/87)
A few years ago I read a paper about writing a "good" random number generator for a PC. I liked what I saw and wrote it (in fortran) for a Vax 780 running VMS 3.whatever. The basic idea was to use the supplied generator to generate 4 bytes of random 1's and 0's then sort of glue them together with appropriate adjustments to make a floating point number (0,1). I had to make some adjustment because the floating point format (IEEE) described in the article did not quite match the format used in the Vax. Does that problem still exist? it should be easy to do in C but will I stumble on the fact that C does its real number computations in double? I am running on a Vax 8600 (Ultrix) Jerry Freedman, Jr "As you wander through life jfjr@mitre-bedford.arpa Whatever be your goal (617)271-6248 or 7555 Keep your eye upon the doughnut and not on the hole"
chris@mimsy.UUCP (Chris Torek) (07/26/87)
In article <8472@brl-adm.ARPA> jfjr@mitre-bedford.arpa (Freedman) writes: >I had to make some adjustment because the floating point format >(IEEE) described in the article did not quite match the format used >in the Vax. Does that problem still exist? As in `did the Vax change its floating point format'? Of course not; Vax F-floating is the same as always. >it should be easy to do in C but will I stumble on the fact that C >does its real number computations in double? Probably not, althought that depends on the nature of your `glue', I suppose. >I am running on a Vax 8600 (Ultrix) Then see `man random'. -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690) Domain: chris@mimsy.umd.edu Path: seismo!mimsy!chris