[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

floor & inexact->exact

    Date: Thu Nov  2 20:52:46 1989
    From: Alan Bawden <bawden@parc.xerox.com>
    Subject: another dumb question about numbers
        Date: Thu, 2 Nov 89 17:57:49 est
        From: Hal Abelson <hal@zurich.ai.mit.edu>
        Why not have round, floor, ceiling, and truncate produce exact
        integers, and provide some other names for the analogous (more
        primitive?) operations that do not force exactness?
                              ...If you -expected- an inexact quotient, then
    you probably should have written (INEXACT->EXACT (FLOOR (/ P Q))).

Probably not.  I don't see how one can be sure that inexact->exact will
return an integer.  To be sure one must write (floor (inexact->exact (/ p q))).