Mail Archives: djgpp-workers/1996/07/29/21:12:05
> How useful is long double to most applications?
>
> double provides such high precision, 15k of bloat to support something
> which is:
> not ANSI
> not used (by my estimate 99.999% of the time)
> I would say if it is needed have a special libldbl.a which has
> to be used to handle long doubles.
To summarize previous postings, I think the best approach is to
1) Add low-overhead support into libc's printf. These would cast
everything to double and work with the existing double formatting
code.
2) Write high-precision printf/scanf routines and put them in libm.
Like the ansi math functions, you get a high precision and full IEEE
compliance if you link in libm.
This is only acceptable if there are no basic *functional* differences
between the two implementations; only precision and code bloat.
(i.e. they must obey the same format parameters, but libm's might
handle NaNs and large precision specifiers better).
- Raw text -