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

Re: Implementation of read-ieee-float64

On 12/7/05, Bradley Lucier <lucier@xxxxxxxxxxxxxxx> wrote:
> Gambit 4.0b15 fails some srfi-56 tests because the first instance of
> 2.0 is not 2; unfortunately, Gambit-C calculates
> (expt 2.0 -1074)
> as
> (/ (expt 2.0 1074))

Hi, thanks for looking into this and getting it working with Gambit.
The (expt 2.0 ...) form was there for the sake of Bigloo, for which

  (expt N -M) => 0

for all exact integers N, M > 1.  This is clearly a bug on Bigloo's
part, but it seemed safe to compensate for it.  In particular, every
other tested implementation correctly evaluates (expt 2.0 -1024).

[Or so I thought.  Scheme48 also gives 0.0 for this.]

Choosing between the lesser of two evil^H^H^H^Hbugs, I'd
consider Bigloo's behavior the more egregious here, so let's
call (expt 2 ...) the correct reference form.

Congratulations, Gambit now passes all tests!

[And possibly the latest version of Scheme48 does as well.]