|
From: | Kon Lovett |
Subject: | Re: [Chicken-users] [ANN] New "numbers" egg branch |
Date: | Sun, 14 Mar 2010 16:47:04 -0700 |
On Mar 14, 2010, at 2:37 PM, John Cowan wrote:
Peter Bex scripsit:It is currently at a state where people can test it. Please do, and letme know if you find any bugs. The code can be found in Subversion: https://chicken.wiki.br/svn/chicken-eggs/release/4/numbers/branches/standaloneThis is not exactly a bug, but I note that you compute the system's floating-point parameters at run time instead of using the standard <float.h> header. There's a quick summary of this header at http://en.wikipedia.org/wiki/Float.h and a detailed explanation at http://www.opengroup.org/onlinepubs/9699919799/basedefs/float.h.html .
The applicable values (for double) from float.h are exported by chicken: (define maximum-flonum (foreign-value "DBL_MAX" double)) (define minimum-flonum (foreign-value "DBL_MIN" double)) (define flonum-radix (foreign-value "FLT_RADIX" int)) (define flonum-epsilon (foreign-value "DBL_EPSILON" double)) (define flonum-precision (foreign-value "DBL_MANT_DIG" int)) (define flonum-decimal-precision (foreign-value "DBL_DIG" int)) (define flonum-maximum-exponent (foreign-value "DBL_MAX_EXP" int)) (define flonum-minimum-exponent (foreign-value "DBL_MIN_EXP" int))(define flonum-maximum-decimal-exponent (foreign-value "DBL_MAX_10_EXP" int)) (define flonum-minimum-decimal-exponent (foreign-value "DBL_MIN_10_EXP" int)
-- John Cowan http://ccil.org/~cowan address@hidden Arise, you prisoners of Windows / Arise, you slaves of Redmond, Wash, The day and hour soon are coming / When all the IT folks say "Gosh!" It isn't from a clever lawsuit / That Windowsland will finally fall,But thousands writing open source code / Like mice who nibble through a wall.--The Linux-nationale by Greg Baker _______________________________________________ Chicken-users mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/chicken-users
Best Wishes, Kon
[Prev in Thread] | Current Thread | [Next in Thread] |