[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.



Aubrey Jaffer scripsit:

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

Ah.  However, I favor signaling fixnum operations, in which case (fxabs
smallest-fixnum) should signal an error.

-- 
You're a brave man! Go and break through the            John Cowan
lines, and remember while you're out there              jcowan@xxxxxxxxxxxxxxxxx
risking life and limb through shot and shell,           www.ccil.org/~cowan
we'll be in here thinking what a sucker you are!        www.reutershealth.com
        --Rufus T. Firefly