GNU bug report logs - #15320
[2.0.7] Rational number representation problem

Previous Next

Package: guile;

Reported by: Josh Stokes <jsstokes2 <at> googlemail.com>

Date: Tue, 10 Sep 2013 15:45:02 UTC

Severity: normal

Done: Mark H Weaver <mhw <at> netris.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 15320 in the body.
You can then email your comments to 15320 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guile <at> gnu.org:
bug#15320; Package guile. (Tue, 10 Sep 2013 15:45:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Josh Stokes <jsstokes2 <at> googlemail.com>:
New bug report received and forwarded. Copy sent to bug-guile <at> gnu.org. (Tue, 10 Sep 2013 15:45:03 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Josh Stokes <jsstokes2 <at> googlemail.com>
To: bug-guile <at> gnu.org
Subject: [2.0.7] Rational number representation problem
Date: Tue, 10 Sep 2013 14:28:37 +0100
[Message part 1 (text/plain, inline)]
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.
[Message part 2 (text/html, inline)]

Reply sent to Mark H Weaver <mhw <at> netris.org>:
You have taken responsibility. (Thu, 12 Sep 2013 21:04:03 GMT) Full text and rfc822 format available.

Notification sent to Josh Stokes <jsstokes2 <at> googlemail.com>:
bug acknowledged by developer. (Thu, 12 Sep 2013 21:04:04 GMT) Full text and rfc822 format available.

Message #10 received at 15320-close <at> debbugs.gnu.org (full text, mbox):

From: Mark H Weaver <mhw <at> netris.org>
To: Josh Stokes <jsstokes2 <at> googlemail.com>
Cc: 15320-close <at> debbugs.gnu.org
Subject: Re: bug#15320: [2.0.7] Rational number representation problem
Date: Thu, 12 Sep 2013 17:03:34 -0400
Josh Stokes <jsstokes2 <at> googlemail.com> 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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Fri, 11 Oct 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 258 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.