This is the mail archive of the newlib@sources.redhat.com mailing list for the newlib project.


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

Re: long double support in cygwin



>I do not know if the original math package from Sun ever had long
> double support

It did not.  It did not have single precision, either.  What you have
there for `float' routines are arbitrarily redeclared versions of the
double precision codes -- if I may say, not a very efficient design
for small embedded computers.


> contributions / patches to newlib are welcome.
> Note that newlib cannot accept any GPL or proprietary code.

What I would propose to do for printf and scanf is very similar
to an appendix for DJGPP that you can look at in
  http://www.simtel.net/pub/simtelnet/gnu/djgpp/v2tk/smldbl12.zip
It is based on a program that I placed in the public domain 7 or 8 years
ago.  GCC uses that same program for its binary <-> decimal conversion.
DJGPP uses it to generate test vectors for libm functions.
It meets the requirements of IEEE 754 and IEEE 854 for conversion
accuracy.  The routines can be configured for any of the usual
precisions up through 128-bit long double.

Since an externally maintained printf-scanf patch would have to be
updated whenever you change your sources, I hope that you will be
willing to install something officially to provide the long double
conversions.

The problem of updating patches doesn't apply to libm since it is not
interwoven with any other code.  Although I might be able to help with
libm, getting you to support new libm functions is not nearly as
important to me as the printf-scanf feature.




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