This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Fix clog overflow/underflow (bug 13629)


On Mon, Mar 19, 2012 at 4:02 PM, Joseph S. Myers
<joseph@codesourcery.com> wrote:
> 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.

Thanks, that's sufficient rationale for me.

Cheers,
Carlos.


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