Another such annoyance is than (min 1 +inf.0) => 1.0 - because if any argument is inexact, the result is inexact. I don't think this makes sense in the case of infinities. Infinities are very useful as initial values for things that are being minimized or maximized, but there is always the need for inexact->exact to protect against the (unexpected) coercion.<br>
<br>This is all from the original R5RS and continued in R6RS - but, we aren't that language.<br><br>Could we get an exception to the coercions in the case of +/-inf.0? Or an alternative min/max that don't do it?<br>
<br><div class="gmail_quote">On Fri, Sep 30, 2011 at 6:53 AM, Matthias Felleisen <span dir="ltr"><<a href="mailto:matthias@ccs.neu.edu">matthias@ccs.neu.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br>
exact-round is preferred.<br>
<div><div></div><div class="h5"><br>
<br>
<br>
On Sep 30, 2011, at 8:51 AM, Eli Barzilay wrote:<br>
<br>
> Yesterday, Ryan Culpepper wrote:<br>
>> The pragmatic answer is you generally have to write<br>
>><br>
>> (inexact->exact (round x))<br>
>><br>
>> which is annoying, but no one has yet bothered to add a standard<br>
>> library function for this, as far as I know.<br>
><br>
> [From the annoyed side, especially since that thing tends to come in<br>
> bunches which can make some quick code look much heavier than it is:]<br>
><br>
> Maybe it's time to add something for that? `eround'? (But even<br>
> `exact-round' would be better than the above.)<br>
><br>
> --<br>
> ((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
> <a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<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>
<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>
</div></div></blockquote></div><br>