This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: guile & r5rs


Tel <telford@eng.uts.edu.au> writes:

> > latter is (round (/ num (expt 2 nf))).  Very nice.  Now what do you do
> > to make it round towards even? :).
> 
> Please don't make the divide round towards even, this is a very strange
> function to work with when doing iterative calculations since it's behaviour
> changes for odd and even numbers.

The question as I understood it was whether the arguments to the
divide should be rounded towards even on the boundary case, when
bits to be rounded off are '1000000000000000000000000000 ... 0'
That is, we're double rounding and thus presumably already in a state
of sin.  The rounding of the actual result would depend on the
underlying floating point divide, and probably *would* round
towards even in the boundary case.

I'm not sure I understand the concern about odd vs even numbers.  In
the cases we're discussing hundreds of bits of precision will be lost,
odd vs even of the original arguments is not even in the noise.