[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Arithmetic issues

This page is part of the web mail archives of SRFI 77 from before July 7th, 2015. The new archives for SRFI 77 contain all messages, not just those from before July 7th, 2015.



 | Date: Tue, 18 Oct 2005 13:36:39 -0400
 | From: "John.Cowan" <jcowan@xxxxxxxxxxxxxxxxx>
 | 
 | Michael Sperber scripsit:
 | ...
 | > The fixnum, flonum, and inexact arithmetic come with a full deck of
 | > operations, including some that are defined in terms of integers (such
 | > as quotient+remainder, gcd and lcm), and others that are easily abused
 | > (such as fxabs). Should these be pruned?
 | 
 | Yes, absolutely.  (I'm not clear what the problem with fxabs might be.)

In twos-complement fixnums there is one more negative number than
there are positive numbers.

Thus (abs most-negative-fixnum) and (- most-negative-fixnum) can only
return a bignum: (+ 1 most-positive-fixnum)