Eric Bresie via Newlib writes: > Not directly related (and as I’m not really an expert on these things, nor able to change in any way) but was looking at the code mentioned and saw line like: > > if (x == 0.0 || y == 0.0) > > return (x * y + z); > > If either x or y is zero would it be better to just return z and avoid > an extra multiplication operation here? You want to compute the correct result and get the right exceptions in all of the delightful IEEE754 corner cases (e.g. 0 × ∞). It's easier to just execute the two operations than to try and synthesize the right result (which is implementation-dependent in the case of 0 × ∞ + qNaN). The key here is that if x or y is zero, then you won't lose any intermediate precision by performing the operation this way. -- -keith