long double (was "strtold?")
Tim Prince
TimothyPrince@sbcglobal.net
Wed Mar 18 07:56:00 GMT 2009
Howland Craig D (Craig) wrote:
>> Jeff Johnston wrote:
>>
>>> (By the way, so far for the math library I have ceill, floorl,
>>> nearbyintl, rintl, truncl, fpclassify, and some of the other similar
>>> easy ones. They basically function but need polish. I will need
>>>
> some
>
>>> kind of help for the numerical (e.g. sine, log) functions as I don't
>>> know enough to write them. Anyone who'd like to help, let me know.)
>>>
>>>
>> It can definitely be a can of worms regarding accuracy as the mathfp
>> experiment has proven.
>>
>> A number of the libm routines were originally taken from Sun. You
>>
> might
>
>> want to check if there are
>> already long double versions out there from Sun if you haven't already
>> done so.
>>
> I have done some looking, and was not finding much; I've found one
> or two candidates, but not a whole set like I had expected. (For
> example, FreeBSD has just the easy ones like those I've mentioned.)
> I'll
> do more searching later. Hopefully people can keep it in mind and maybe
> we'll stumble across a set that we can import. I had hoped to find a
> set under OpenSolaris, but they don't appear to have the math library
> visible.
> I share your concern about checking. Related to that, I did find
> an arbitrary-precision package that has the transcendentals that could
> be used for checking.
> Craig
>
How ambitious are you? Does it need to be as difficult to read as
fdlibm? Both 80-bit and 128-bit IEEE formats? For x86 80-bit, gcc/387
in-lines are good enough, although expl() and powl() could use something
a notch better than glibc. If you're trying to be more general, it's
difficult to be efficient as well. For comparison checks, are you
satisfied with gmp/mpfr, or is their use in gcc a disrecommendation?
There are test suites, elefunt/celefunt being among the better/longer
established.
More information about the Newlib
mailing list