Article View: comp.sys.amiga.tech
Article #13480Lattice help - drand48() = GURU!
From: Jim_Garrison
Date: Thu, 01 Feb 1990 16:19
Date: Thu, 01 Feb 1990 16:19
35 lines
991 bytes
991 bytes
Hello everyone!
I have the Lattice 5.04a 'C' compiler, and I've been having a problem with
one of the supplied random number generators - drand48(). Does anyone know
if there's a known problem with this function?
#include <math.h>
main()
{
double x;
long t;
time(&t);
srand48(t);
x = drand48(); /* BANG! Guru 0000003.xxxxxxxx */
}
Compiled with:
lc -Lm test.c
I also tried using erand48() with the same results as above.
Any help would be appreciated.
Thanks a bunch,
Jim Garrison
Hewlett Packard
Industrial Automation Center
Technical Details
Message-ID:
<2290003@hp-ptp.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!agate!ucbvax!hplabs!hp-ses!hp-ptp!jimgShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!mips!apple!agate!ucbvax!hplabs!hp-ses!hp-ptp!jimg From: jimg@hp-ptp.HP.COM (Jim_Garrison) Newsgroups: comp.sys.amiga.tech Subject: Lattice help - drand48() = GURU! Message-ID: <2290003@hp-ptp.HP.COM> Date: 1 Feb 90 16:19:07 GMT Organization: HP Pacific Technology Park - Sunnyvale, Ca. Lines: 35