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

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?

This doesn't seem right.  What if I ask 
 How far is it from Boston to San Francisco 
 and someone returns replies "About 3000 miles."
If I do (FLOOR 3000) to get an integer, that oughtn't make the
number exact.  All it should gurantee me is that the result has
no fractional part (which in this case was also true of the input,
but only incidentally).  It's a common thing for humans to not
specify a fractional part of something if the number is no good
in the ones-ies place, but there's no necessary reason. e.g.,
a number like 3.5 might really be 3.5+/-2.1 because of other errors
introduced in the computation.  So to round that number and say that
it is an exact 3 or exact 4 neglects that an exact 2 or even an 
exact 1 might be the right exact answer if all the accumulated error was
in that direction.