I was only advocating it in the case of infinities. The R(5,6)RS documentation for min/max says: "If any argument is inexact, then the result is also inexact (unless
the procedure can prove that the inaccuracy is not large enough to affect the
result, which is possible only in unusual implementations)." I would claim that the inaccuracy in the min/max in this case is finite and not large compared to infinity, so the result is not affected.<br><br>I seem to remember that PLT Scheme used to handle infinities as exact quantities. Can anyone confirm or deny that? <br>
<br>Doug<br><br><div class="gmail_quote">On Fri, Sep 30, 2011 at 3:42 PM, Jos Koot <span dir="ltr"><<a href="mailto:jos.koot@telefonica.net">jos.koot@telefonica.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>
<div><div class="im">
<div dir="ltr" align="left"><span><font color="#0000ff" face="Courier New" size="2">I already wrote:</font></span></div>
<div dir="ltr" align="left"><span><span lang="ES-MODERN"><font color="#0000ff" face="Arial" size="2"></font> </span></span></div>
<div dir="ltr"><font color="#0000ff" face="Courier New" size="2">#lang
racket</font></div>
<div dir="ltr"><font color="#0000ff" face="Courier New" size="2">(= (inexact->exact
(round (/ 1.0 1.1e-200)))</font></div>
<div dir="ltr"><font face="Courier New"><font color="#0000ff"><font size="2"><span> </span>(round (/ #e1.0 #e1.1e-200))) ; ->
#f</font></font></font></div>
<div dir="ltr"><font color="#0000ff" face="Courier New" size="2"></font> </div>
</div><div dir="ltr"><span><font color="#0000ff" face="Courier New" size="2">A computation that ends up with an integer may introduce
a computational error when during the computation inexact numbers have
been used. Inexactness should remain contaguous.</font></span></div>
<div dir="ltr"><span><font color="#0000ff" face="Courier New" size="2"></font></span> </div>
<div dir="ltr"><span><font color="#0000ff" face="Courier New" size="2">I do admit that (min 0 +inf.0) can retuirn an exact
integer.</font></span></div>
<div dir="ltr"><span><font color="#0000ff" face="Courier New" size="2"></font></span> </div>
<div dir="ltr"><span><font color="#0000ff" face="Courier New" size="2">Jos</font></span></div>
<div dir="ltr" align="left"> </div><font color="#0000ff" face="Courier New" size="2"></font><br>
<div dir="ltr" align="left" lang="en-us">
<hr>
<font face="Tahoma" size="2"><div class="im"><b>From:</b> <a href="mailto:users-bounces@racket-lang.org" target="_blank">users-bounces@racket-lang.org</a>
[mailto:<a href="mailto:users-bounces@racket-lang.org" target="_blank">users-bounces@racket-lang.org</a>] <b>On Behalf Of </b>Mark
Engelberg<br></div><b>Sent:</b> viernes, 30 de septiembre de 2011 18:18<br><b>To:</b>
Stephen Bloch<br><b>Cc:</b> <a href="mailto:users@racket-lang.org" target="_blank">users@racket-lang.org</a><br><b>Subject:</b> Re:
[racket] Question about round<br></font><br></div><div><div></div><div class="h5">
<div></div>I'm amazed at how long I've gone with the misconception
that:<br>Exact Numbers = Integers union Rationals<br>Inexact Numbers = Floating
Point numbers<br>(Frankly, I never really thought much about what infinities
were. I assumed they were a separate, distinct type).<br><br>When I saw in
the docs for round that it returns an integer, and I was getting an inexact
number, I was sure it was a mistake. Thanks for helping me straighten out
my thinking on this. I can see how you might want to test an inexaxct
number for whether it is the floating point approximation of an "integer", so
that makes sense. Still seems weird and inconvenient for round to give you
back an inexact integer rather than an exact one, but I can see now how this
behavior matches the standard.<br><br>Thanks,<br><br>Mark<br><br></div></div></div>
<br>_________________________________________________<br>
For list-related administrative tasks:<br>
<a href="http://lists.racket-lang.org/listinfo/users" target="_blank">http://lists.racket-lang.org/listinfo/users</a><br></blockquote></div><br>