Re: [q-lang-users] q 7.11 tests fail on Mac OS X
Brought to you by:
agraef
From: Albert G. <Dr....@t-...> - 2008-06-10 05:40:55
|
Ryan Schmidt wrote: > I would love to know how the arithmetic test (or maybe q in general) > does its math though. I can't get any other app to tell me that 2 * 2 > == 4.4501477170164897e-308, and finding out how it's computing that > might help me isolate what's wrong with my computer. You can find all the arithmetic routines in qmfuns.c, look for qmadd et al. Bigint arithmetic is done using the gmp routines, double arithmetic using the C floating point operators. Apart from that, it's just boxing/unboxing, which are just accesses to a C struct, nothing unusual there. The bigint arithmetic seems to work, since the first two results are ok. It's the mixed double/bigint arithmetic that fails there. The bigint -> double promotion is done using another GMP routine, mpz_get_d, I don't see how that could go wrong unless GMP is broken on that machine. You could try whether just plain double arithmetic works. If you can run the interpreter from the command line, try something like '2.0*2.0' instead of '2*2.0', or edit test.q accordingly and run 'make test'. -- Dr. Albert Gr"af Dept. of Music-Informatics, University of Mainz, Germany Email: Dr....@t-..., ag...@mu... WWW: http://www.musikinformatik.uni-mainz.de/ag |