From: Mark H Weaver <mhw@netris.org>
To: Josh Stokes <jsstokes2@googlemail.com>
Cc: 15320-close@debbugs.gnu.org
Subject: bug#15320: [2.0.7] Rational number representation problem
Date: Thu, 12 Sep 2013 17:03:34 -0400 [thread overview]
Message-ID: <8738p9n461.fsf@tines.lan> (raw)
In-Reply-To: <CACV6vB5KTXynKH4f8sPDxA2iRgw7Rda-f3_O9pEUKZcdzrBzUw@mail.gmail.com> (Josh Stokes's message of "Tue, 10 Sep 2013 14:28:37 +0100")
Josh Stokes <jsstokes2@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
prev parent reply other threads:[~2013-09-12 21:03 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-10 13:28 bug#15320: [2.0.7] Rational number representation problem Josh Stokes
2013-09-12 21:03 ` Mark H Weaver [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8738p9n461.fsf@tines.lan \
--to=mhw@netris.org \
--cc=15320-close@debbugs.gnu.org \
--cc=jsstokes2@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).