unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* real == frac
@ 2003-11-21 20:58 Kevin Ryde
  2003-11-30  1:31 ` Marius Vollmer
  2004-02-16 23:09 ` Kevin Ryde
  0 siblings, 2 replies; 4+ messages in thread
From: Kevin Ryde @ 2003-11-21 20:58 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2004-02-16 23:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-11-21 20:58 real == frac Kevin Ryde
2003-11-30  1:31 ` Marius Vollmer
2003-12-09 20:34   ` Kevin Ryde
2004-02-16 23:09 ` Kevin Ryde

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).