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

Re: Arithmetic issues

 | 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)