IEEE arithmetic may break som programs
cspw ruccx1
cspw.ruccx1 at p0.f4.n494.z5.fidonet.org
Tue May 8 03:53:25 AEST 1990
Thanks to all those who posted replies to my query about
IEEE math in C (and profuse apologies from our postmaster
whose system managed to spill N >> 1 copies of it onto the net).
Here is part of a reply that really seemed worth a wider audience ....
"By the way, IEEE math can break programs not expecting it. For instance,
to figure out where the decimal point goes, keep dividing the (positive)
number by 10 until it is less than 1. This is an infinite loop for
Inf or NaN, and on one implementation with very half-baked IEEE sortof
attempted, it breaks printf! I'm not real sure how I'd write a
printf that works with IEEE and non-IEEE math, without ifdefs. "
Gordon L. Burditt
sneaky.lonestar.org!gordon
Pete
--
uucp: uunet!m2xenix!puddle!5!494!4.0!cspw.ruccx1
Internet: cspw.ruccx1 at p0.f4.n494.z5.fidonet.org
More information about the Comp.lang.c
mailing list