[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix for inconsistent (/ DIVIDEND DIVISOR &rest DIVISORS)
From: |
Miles Bader |
Subject: |
Re: Fix for inconsistent (/ DIVIDEND DIVISOR &rest DIVISORS) |
Date: |
Tue, 4 May 2004 18:51:31 -0400 |
User-agent: |
Mutt/1.3.28i |
On Tue, May 04, 2004 at 06:27:11PM -0400, Peter Whaite wrote:
> Some time ago there was a thread on division being inconsistent when
> floats were involved. I dont know what the outcome of that discussion
> was, but it did occur to me that the simplest fix would be to multiply
> the divisors before doing the division.
That might result in overflow where there wasn't any before, especially when
all the args are fixnums.
E.g., currently:
(/ 200000000 100000000 4) => 0
But your change would seem to make it equivalent to:
(/ 200000000 (* 100000000 4)) => -1
Given that emacs already has a very restricted integer range, this is an area
where we should be very careful.
-Miles
--
97% of everything is grunge