unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: bug-guile@gnu.org
Subject: Re: big number printout
Date: Wed, 02 Jul 2008 09:30:06 +0200	[thread overview]
Message-ID: <87myl0216p.fsf@gnu.org> (raw)
In-Reply-To: 20080701140151.M11358@ccrma.Stanford.EDU

Hi,

"Bill Schottstaedt" <bil@ccrma.Stanford.EDU> writes:

> Not sure this is a bug, but it is confusing:
>
> guile> (version)
> "1.8.5"
> guile> (+ 40816513889983671.0 3.0)
> 40816513889983700.0

You're exceeding the precision of a float or double (whichever is used
for reals):

  guile> 40816513889983671.0
  40816513889983700.0  <--- rounded up
  guile> 40816513889983671
  40816513889983671    <--- integers are not rounded

FWIW, Bigloo and Ikarus behave similarly, and I don't think there's much
that can be done.

Thanks,
Ludovic.





  reply	other threads:[~2008-07-02  7:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-01 14:03 big number printout Bill Schottstaedt
2008-07-02  7:30 ` Ludovic Courtès [this message]
2008-07-02 21:22   ` Marijn Schouten (hkBst)
2008-07-03  7:17     ` Ludovic Courtès
  -- strict thread matches above, loose matches on Subject: below --
2008-07-02 22:36 Bill Schottstaedt
2008-07-03 21:58 ` Neil Jerram
2008-07-04  0:53   ` Bill Schottstaedt
2008-07-04  8:31     ` Neil Jerram
2008-07-04  9:18       ` Marijn Schouten (hkBst)

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=87myl0216p.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=bug-guile@gnu.org \
    /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).