Fix clog overflow/underflow (bug 13629)
Joseph S. Myers
joseph@codesourcery.com
Mon Mar 19 20:03:00 GMT 2012
On Mon, 19 Mar 2012, Carlos O'Donell wrote:
> Is there no way to share the scaling code?
Between different functions: they do different things with the scale
factor and have different requirements for it (for csqrt it's good to
start with an even power of 2 as scale factor so the scaling back is
exact, for example).
Between different floating point types for the same function: it might be
possible to do some sort of C pseudo-template with macros for these
functions, but I don't think it would be that readable. (A
next-generation libm would likely use automatic generation to build
functions for all the types from a common source, rather than macros in
the functions themselves.)
Some other functions will need substantially different scaling for their
overflow / underflow cases.
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list