[perl #34549] atan2() isn't IEEE compliant on OpenBSD/*BSD/Cygwin/Solaris

Steve Peters steve.peters at gmail.com
Mon Mar 23 17:34:55 UTC 2009


On Mon, Mar 23, 2009 at 12:18 PM, Andy Dougherty <doughera at lafayette.edu> wrote:
>
>> On Mon, Mar 23, 2009 at 8:26 AM, Reini Urban <rurban at x-ray.at> wrote:
>> > 2009/3/22 Andy Dougherty via RT <bugs-parrot-track at netlabs.develooper.com>:
>> >> Well, it's not really completely resolved, but I couldn't think  of a
>> >> better status for it.  The *BSD versions are resolved, and Solaris is
>> >> half-resolved (works with Sun's cc, fails with gcc).
>> >>
>> >> This issue is now listed in Trac as TT #205, so we can close the RT
>> >> version of the ticket and keep the Trac version open.
>> >
>> > IMHO it should have be solved by this config/gen/platform/solaris/math.c entry:
>> >
>> > #include <math.h>
>> > #if defined(__GNUC__) && defined(_LIB_VERSION)
>> >    _LIB_VERSION_TYPE _LIB_VERSION = _IEEE_;
>> > #endif
>> >
>> > Maybe _LIB_VERSION is not defined?
>
> It is not solved by that bit of code.  At least on Solaris 8, _LIB_VERSION
> is not defined.  Nor is _LIB_VERSION_TYPE.  That bit of code is just
> irrelevant.  It has never been useful there.  It was worth trying, but it
> doesn't do anything.
>
> On Mon, 23 Mar 2009, Steve Peters wrote:
>
>> It is fixed for Solaris CC, but not for gcc.
>
> Correct.
>
>>  My guess is inlining
>> might be the cause here with gcc.  [ . . . ]
>> away.  Right now, I don't have a Solaris to test this theory, so if
>> someone (I'm looking at you Andy ;-) ) could compile Parrot on Solaris
>> with gcc without optimizations, I'd be interested in seeing if this is
>> fixed or not.
>
> No, that doesn't fix it.  I suspect it's a math library issue, and I just
> haven't figured out how to tell gcc to do whatever cc does when you pass
> it the -xlibmieee option.

The answer might be here
<http://people.redhat.com/drepper/sol-porting.pdf>.  It sounds like
-lieee -ffast-math might be the replacement to try.

Steve Peters
steve at fisharerojo.org


More information about the parrot-dev mailing list