From: Kevin Ryde <user42@zip.com.au>
Subject: real == frac
Date: Sat, 22 Nov 2003 06:58:55 +1000 [thread overview]
Message-ID: <87u14xphf4.fsf@zip.com.au> (raw)
I noticed that
(= 0.5 (+ 1/2 (/ 1 (ash 1 1000))))
gives #t, but I think with exact fractions it should now be #f, since
the second arg is 1/2+1/2^1000, not an actual 0.5.
I guess fraction2double is rounding, making the comparison not quite
right. Going the other way, converting double to fraction and
comparing fractions would avoid that.
I suspect the same applies to all uses of fraction2double in <, min
and max too.
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel
next reply other threads:[~2003-11-21 20:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-11-21 20:58 Kevin Ryde [this message]
2003-11-30 1:31 ` real == frac Marius Vollmer
2003-12-09 20:34 ` Kevin Ryde
2004-02-16 23:09 ` Kevin Ryde
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=87u14xphf4.fsf@zip.com.au \
--to=user42@zip.com.au \
/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).