bug-gnulib
[Top][All Lists]
Advanced

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

Re: new module 'printf-frexpl'


From: Bruno Haible
Subject: Re: new module 'printf-frexpl'
Date: Mon, 26 Feb 2007 15:59:24 +0100
User-agent: KMail/1.9.1

Paolo Bonzini asked:
> > Similarly to 'printf-frexp', here is the corresponding module for
> > 'long double'.
> 
> What's the difference from frexpl and why can't we obsolete that one?

You see it by looking into the USE_FREXP_LDEXP branch of lib/printf-frexp.c:
  - The normalization is different (mantissa in [0.5,1.0) vs. [1.0,2.0),
  - The treatment of denormalized numbers is different.
Basically, it's tailored for printf's use only.

I made it a separate module from 'vasnprintf' because some other printf-like
routines in unistdio/* may need it as well.

If printf-frexp was to use 'frexp' and 'ldexp' always, I would also have had
to provide 'ldexp-nolibm', 'ldexpl-nolibm' modules, and the code would have
been less efficient than it is now.

I don't think either of the modules 'frexpl', 'printf-frexpl' is obsolete.

Bruno




reply via email to

[Prev in Thread] Current Thread [Next in Thread]