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

Re: Zeroes and infinities



Peter Henderson <petercbh@xxxxxxxxxxx> wrote:

To probably misquote Einstein, things should be as simple as possible, 
but no simpler.  Any user who is using a function with a branch cut and 
who ends up computing values near the the branch is going to know about 
them pretty soon, whether they have heard about them or not, in which 
case they better hope they are in the specification.  Fortunately, for 
the basic functions, the branch cuts always occur on the real or 
imaginary axes.  This means +0 and -0 can be used to help the programmer 
deal with them as they see fit.  For other cases, often a related 
function can be obtained using simple shifts, so that this again is the 
case.  So if there is a thorny problem, then at least there is a solution.

Not in my experience.

The problem is with the large number of programs that don't want to
handle them, and where going near a branch cut is an error.  The
IEEE 754 approach means that the program ploughs ahead, usually
turning the use of the wrong branch into an erroneous number, an
erroneous number into completely wrong answers, and completely wrong
answers into chaos.  The user only THEN gets the diagnostic, and has
to work out what went wrong.

If the functions issue a diagnostic on the INITIAL failure, it is
usually easy to find the original mistake.


Regards,
Nick Maclaren,
University of Cambridge Computing Service,
New Museums Site, Pembroke Street, Cambridge CB2 3QH, England.
Email:  nmm1@xxxxxxxxx
Tel.:  +44 1223 334761    Fax:  +44 1223 334679

754 | revision | FAQ | references | list archive