[squeak-dev] Re: [ANN] Number comparison, hash, NaN, Point,
and other partially ordered sets
John M McIntosh
johnmci at smalltalkconsulting.com
Fri Jan 9 22:21:55 UTC 2009
years back we coded up a FloatMathPlugin to do IEEE math a front end
to http://www.netlib.org/fdlibm/ in april of 06
Testing showed we could do IEEE math using the plugin on linux/windows/
mac (powerpc).
I believe Qwaq took over building this for macintel.
Also note the unix and carbon VM do fiddle with the FP unit control
register via this code I've a copy of
you would need to check the build tree for the unix version to see if
it is different.
#if defined(__GNUC__) && ( defined(i386) || defined(__i386) ||
defined(__i386__) \
|| defined(i486) || defined(__i486) || defined (__i486__) \
|| defined(intel) || defined(x86) || defined(i86pc) )
static void fldcw(unsigned int cw)
{
__asm__("fldcw %0" :: "m"(cw));
}
#else
# define fldcw(cw)
#endif
#if defined(__GNUC__) && ( defined(ppc) || defined(__ppc) ||
defined(__ppc__) \
|| defined(POWERPC) || defined(__POWERPC) || defined (__POWERPC__) )
void mtfsfi(unsigned long long fpscr);
void mtfsfi(unsigned long long fpscr)
{
__asm__("lfd f0, %0" :: "m"(fpscr));
__asm__("mtfsf 0xff, f0");
}
#else
# define mtfsfi(fpscr)
#endif
On 9-Jan-09, at 7:20 AM, Bert Freudenberg wrote:
>
> On 09.01.2009, at 16:16, Tim Olson wrote:
>
>>
>> On Jan 8, 2009, at 9:30 AM, Hans-Martin Mosner wrote:
>>
>>> AFAIK, the Croquet project needs to have exactly reproducible float
>>> arithmetics on all platforms.
>>
>> Are you using the exact same code on all platforms for
>> trancendentals and other floating-point functions? If not, that is
>> going to be the greatest source of different results. They tend to
>> vary widely on accuracy, since there is no 1/2 ULP accuracy
>> requirement for those functions, unlike for the defined IEEE
>> operations (+,-,*,/,sqrt)
>
>
> Yes, Andreas wrote a new plugin to ensure bit-identical floating
> point ops across platforms.
>
> - Bert -
>
>
>
--
=
=
=
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd. http://www.smalltalkconsulting.com
=
=
=
========================================================================
More information about the Squeak-dev
mailing list
|