[r6rs-discuss] fixnum->flonum but no flonum->fixnum?

John Cowan cowan at ccil.org
Thu Mar 20 22:03:07 EDT 2008


Bradley Lucier scripsit:

> At any rate, it appears there's a fixnum->flonum, but no flonum- 
>  >fixnum; is this intentional?  Is there a rationale available?

I don't know for sure, but the rationale that comes to mind is that you
wouldn't know offhand how the conversion happens.  You can already use
FLOOR to round toward -inf.0, CEILING to round toward +inf.0, TRUNCATE
to round toward 0, or ROUND to round off.  Those should be sufficient.

(Fortran and C round toward 0, Basic rounds toward -inf.0.)

-- 
How they ever reached any  conclusion at all    <cowan at ccil.org>
is starkly unknowable to the human mind.        http://www.ccil.org/~cowan
        --"Backstage Lensman", Randall Garrett



More information about the r6rs-discuss mailing list