<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 9.00.8112.16434"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=706073721-30092011><FONT color=#0000ff
size=2 face="Courier New">I already wrote:</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=706073721-30092011><SPAN
lang=ES-MODERN><FONT color=#0000ff size=2 face=Arial></FONT> </DIV>
<DIV dir=ltr><FONT color=#0000ff size=2 face="Courier New">#lang
racket</FONT></DIV>
<DIV dir=ltr><FONT color=#0000ff size=2 face="Courier New">(= (inexact->exact
(round (/ 1.0 1.1e-200)))</FONT></DIV>
<DIV dir=ltr><FONT face="Courier New"><FONT color=#0000ff><FONT size=2><SPAN
class=706073721-30092011> </SPAN>(round (/ #e1.0 #e1.1e-200))) ; ->
#f</FONT></FONT></FONT></DIV>
<DIV dir=ltr><FONT color=#0000ff size=2 face="Courier New"></FONT> </DIV>
<DIV dir=ltr><SPAN class=706073721-30092011><FONT color=#0000ff size=2
face="Courier New">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 class=706073721-30092011><FONT color=#0000ff size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=706073721-30092011><FONT color=#0000ff size=2
face="Courier New">I do admit that (min 0 +inf.0) can retuirn an exact
integer.</FONT></SPAN></DIV>
<DIV dir=ltr><SPAN class=706073721-30092011><FONT color=#0000ff size=2
face="Courier New"></FONT></SPAN> </DIV>
<DIV dir=ltr><SPAN class=706073721-30092011><FONT color=#0000ff size=2
face="Courier New">Jos</FONT></SPAN></DIV>
<DIV dir=ltr align=left></SPAN></SPAN> </DIV><FONT color=#0000ff size=2
face="Courier New"></FONT><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B> users-bounces@racket-lang.org
[mailto:users-bounces@racket-lang.org] <B>On Behalf Of </B>Mark
Engelberg<BR><B>Sent:</B> viernes, 30 de septiembre de 2011 18:18<BR><B>To:</B>
Stephen Bloch<BR><B>Cc:</B> users@racket-lang.org<BR><B>Subject:</B> Re:
[racket] Question about round<BR></FONT><BR></DIV>
<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></BODY></HTML>