This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: questions on implementing long double
- From: Craig Howland <howland at LGSInnovations dot com>
- To: <newlib at sourceware dot org>
- Date: Wed, 17 Sep 2014 12:13:37 -0400
- Subject: Re: questions on implementing long double
- Authentication-results: sourceware.org; auth=none
- References: <5419A274 dot 8050408 at gmail dot com>
On 09/17/2014 11:02 AM, Marco Atzeri wrote:
Hi,
I am currently looking on how to implement the missing long double math
functions; I am inclined to import the implementation from
FreeDSB as it seems the most completed while the Netbsd
lacks some functions.
What is FreeBSD lacking? ("most completed" implies that something is missing.)
Would you please send a path to where they have it? (In a quick look via the
FreeBSD source web interface, it was not at all obvious to me where the math
library stuff is.)
As today we have a partial implementation for platform with
_LDBL_EQ_DBL in libm/common
./libm/common/fabsl.c
while normal implementation are usually in libm/math
./libm/math/sf_fabs.c
./libm/math/s_fabs.c
Assuming to merge the current and the FreeBSD, I think that
the implementation should be moved to files with a name scheme
libm/math/sl_fabs.c
Does make sense ?
I think that the file names should reflect the function names, and not some
legacy non-matching name that makes things more difficult to find (which is a
current nuisance in the present files). So, no, not sl_fabs.c, but fabsl.c.
Additional question, except the case where in newlib
_DOUBLE_IS_32BITS is defined, on FreeBSD there are two cases
LDBL_MANT_DIG == 64
LDBL_MANT_DIG == 113
for 80bit and 128 bit.
There are other LDBL_MANT_DIG values I should be aware on
newlib platforms ?
Regards
Marco