The platform-specific function can be autogenerated, if the build and
runtime systems are the same, with the attached file.  [It's not a patch
because I'm clueless about the config system and have no idea where it
would go.]
--Andy

>>> [EMAIL PROTECTED] 2004-07-19 08:55:54 >>>
# New Ticket Created by  Nicholas Clark 
# Please include the string:  [perl #30737]
# in the subject line of all future correspondence about this issue. 
# <URL: http://rt.perl.org:80/rt3/Ticket/Display.html?id=30737 >


in platform.c I see:

int
Parrot_signbit(double x)
{
   union {
       double d;
       int i[2];
   } u;
   u.d = x;
#if PARROT_BIGENDIAN
   return u.i[0] < 0;
#else
   return u.i[1] < 0;
#endif
}


This is buggy. Even on an IEEE platform (which this seems to be
assuming)
there's no need for the two words of the double to be stored in the
same
endian-ness order as the bits within them.

(Yes, arm historically has been mixed endian.)

Nicholas Clark

Attachment: platform_signbit.c
Description: Binary data

Reply via email to