Subject: bug#15320: closed (Re: bug#15320: [2.0.7] Rational number representation problem)

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 12 Sep 2013 21:04:04 +0000

Your bug report

#15320: [2.0.7] Rational number representation problem

which was filed against the guile package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
15320: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=15320
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#15320: [2.0.7] Rational number representation problem
From: Mark H Weaver <[email-masked]>
To: Josh Stokes <[email-masked]>
Cc: [email-masked]
Date: Thu, 12 Sep 2013 17:03:34 -0400
List-Id: <debbugs-submit.debbugs.gnu.org>

Josh Stokes <[email-masked]> writes:

> It seems that certain small numbers are represented as integers, as (*
> 4294967296 4294967296) results in 0, but (* 3294967296 3294967296)
> returns the correct value of 10856809481709551616. In addition, (ash 1
> 64) gives 0, but (ash 1 65) works correctly.

This is fixed in Guile 2.0.9.

In case you're curious: this bug came into existence when C compilers
started optimizing out overflow checks, on the theory that if a signed
integer overflow occurs then the behavior is unspecified and thus the
compiler can do whatever it likes.

http://stackoverflow.com/questions/14495636/strange-multiplication-behavior-in-guile-scheme-interpreter/14498437#14498437

    Thanks,
      Mark

Subject: [2.0.7] Rational number representation problem
From: Josh Stokes <[email-masked]>
To: [email-masked]
Date: Tue, 10 Sep 2013 14:28:37 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

It seems that certain small numbers are represented as integers, as (*
4294967296 4294967296) results in 0, but (* 3294967296 3294967296) returns
the correct value of 10856809481709551616. In addition, (ash 1 64) gives 0,
but (ash 1 65) works correctly.