|
From: | Kon Lovett |
Subject: | Re: [Chicken-users] fixnum-specific math operators patch |
Date: | Fri, 1 Sep 2006 00:06:26 -0700 |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Aug 31, 2006, at 11:50 PM, felix winkelmann wrote:
On 9/1/06, Will M Farr <address@hidden> wrote:Hello all, In the spirit of my last post about flonum-specific math operators, attached is a patch which implements the following behavior for Chicken's fxXXX math operators:I would prefer to keep fixnum ops as they are, since "safe" code mightgive still results but will not crash the program (this definition of "safe"is used throughout the whole compiler and runtime-system). What do others say?
I think the fx* shouldn't check their arguments, ever. While the safe/ unsafe rational makes sense (nicely symmetric), people shouldn't use these routines if not 100% sure of the types. The goes for the (fixnum arithmetic) declaration.
The fp* routines must accept fixnums so checking is necessary for those, otherwise it should just assume an fp value.
I agree w/ the flonum? & x/0 -> inf, etc., though. Thank you Mr. Farr.
cheers, felix -- http://galinha.ucpel.tche.br:8081/blog/blog.ssp _______________________________________________ Chicken-users mailing list address@hidden http://lists.nongnu.org/mailman/listinfo/chicken-users
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (Darwin) iEYEARECAAYFAkT32/MACgkQJJNoeGe+5O7IBgCfYMDWwJ5QbVy0HqlFYTW6YWNr /0YAn1RAK0+9dnBusqTekYFtNLXFciE6 =fw69 -----END PGP SIGNATURE-----
[Prev in Thread] | Current Thread | [Next in Thread] |