FloatMathPlugin issues (was: [Vm-dev] Re: [squeak-dev] Re: [4.2]
tests status)
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Wed Dec 29 19:23:08 UTC 2010
2010/12/29 David T. Lewis <lewis at mail.msen.com>:
>>
>> I fail to see how modf() could possibly be inexact, it just has to cut
>> the mantissa in two parts...
>> Therefore, primitive 52 should lead to bit identical results across platforms.
>> The only thing to change in order to be FloatMathPlugin compatible
>> would be to fail the primitive for a nan receiver.
>>
>> The fdlibm do define a replacement __ieee754_modf() because it has to
>> (it is a replacement of libm and cannot use default libm).
>> Maybe we don't have to use it, and can safely revert to modf().
>>
>> Nicolas
>
> Judging by the results of FloatConsistencyTests>>testFractionStd,
> primitive 52 does in fact produce different results from
> FloatMathPlugin>>primitiveFractionalPart. Whether primitive 52
> would be consistent across platforms I cannot say.
>
Yes, they differ for NaN...
for fdlibm, NaN fractionPart is -/+ 0
for primitive 52, it is NaN
I'm a bit surprised that the FloatMathPlugin primitive doesn't fail in
case of NaN...
What is the use of SignalNaN class var then ?
> But more importantly, I'm afraid that the FloatMathPlugin is
> completely broken when compiled for 64 bits. I reverted the
> Float>>fractionPart method to use primitive 52 in order to be
> able to run the image, then ran the full suite of KernelTests-Numbers
> tests. The results are not encouraging:
>
Invalid C99 definition of __HI() __LO() macros and co ?
Nicolas
> ====
> 29 December 2010 1:21:48 pm
> Results of KernelTests-Numbers tests with 64-bit VM and FloatMathPlugin, no compiler optimization.
> Float>>fractionPart is reverted to prior version to permit the image to run, so FloatConsistencyTests>>testFractionStd is an expected failure.
> Test errors:
> FloatConsistencyTests>>#testAddArray
> FloatConsistencyTests>>#testArcCos
> FloatConsistencyTests>>#testArcCosH
> FloatConsistencyTests>>#testArcSin
> FloatConsistencyTests>>#testArcSinH
> FloatConsistencyTests>>#testArcTan
> FloatConsistencyTests>>#testArcTan2
> FloatConsistencyTests>>#testArcTanH
> FloatConsistencyTests>>#testCos
> FloatConsistencyTests>>#testCosH
> FloatConsistencyTests>>#testDivArray
> FloatConsistencyTests>>#testDot
> FloatConsistencyTests>>#testExp
> FloatConsistencyTests>>#testFloatAt
> FloatConsistencyTests>>#testFraction
> FloatConsistencyTests>>#testHypot
> FloatConsistencyTests>>#testLog
> FloatConsistencyTests>>#testLog10
> FloatConsistencyTests>>#testMulArray
> FloatConsistencyTests>>#testSin
> FloatConsistencyTests>>#testSinH
> FloatConsistencyTests>>#testSqrt
> FloatConsistencyTests>>#testSubArray
> FloatConsistencyTests>>#testTan
> FloatConsistencyTests>>#testTanH
> FloatConsistencyTests>>#testTimesTwoPower
> FloatTest>>#testFractionAsFloat
> LargePositiveIntegerTest>>#testReciprocalModulo
> RandomTest>>#testNext
> SqNumberParserTest>>#testFloatPrintString
> Test failures:
> FloatConsistencyTests>>#testAddScalar
> FloatConsistencyTests>>#testArcCosHStd
> FloatConsistencyTests>>#testArcCosStd
> FloatConsistencyTests>>#testArcSinHStd
> FloatConsistencyTests>>#testArcSinStd
> FloatConsistencyTests>>#testArcTanHStd
> FloatConsistencyTests>>#testArcTanStd
> FloatConsistencyTests>>#testCosHStd
> FloatConsistencyTests>>#testCosStd
> FloatConsistencyTests>>#testDivScalar
> FloatConsistencyTests>>#testExpStd
> FloatConsistencyTests>>#testFractionStd
> FloatConsistencyTests>>#testLength
> FloatConsistencyTests>>#testMulScalar
> FloatConsistencyTests>>#testNormalize
> FloatConsistencyTests>>#testSinHStd
> FloatConsistencyTests>>#testSinStd
> FloatConsistencyTests>>#testSubScalar
> FloatConsistencyTests>>#testSum
> FloatConsistencyTests>>#testTanHStd
> FloatConsistencyTests>>#testTanStd
> FloatTest>>#testArcTan
> FloatTest>>#testCharacterization
> FloatTest>>#testComparison
> FloatTest>>#testDegreeCos
> FloatTest>>#testDegreeSin
> FloatTest>>#testDegreeSinForExceptionalValues
> FloatTest>>#testFloatRounded
> FloatTest>>#testFloatTruncated
> FloatTest>>#testFractionAsFloat2
> FloatTest>>#testInfinity1
> FloatTest>>#testInfinity2
> FloatTest>>#testIntegerAsFloat
> FloatTest>>#testNonSignalingNaN
> FloatTest>>#testSignalingNaN
> FloatTest>>#testStoreBase16
> FloatTest>>#testStoreOn
> FractionTest>>#testDegreeCos
> FractionTest>>#testDegreeSin
> FractionTest>>#testLn
> FractionTest>>#testLog
> IntegerTest>>#testDegreeCos
> IntegerTest>>#testDegreeSin
> IntegerTest>>#testLn
> IntegerTest>>#testLog
> IntegerTest>>#testSqrtFloor
> NumberParsingTest>>#testFloatFromStreamWithExponent
> NumberParsingTest>>#testFloatFromStringWithExponent
> NumberTest>>#testReadFrom
> SqNumberParserTest>>#testFloatFromStreamWithExponent
> SqNumberParserTest>>#testFloatGradualUnderflow
More information about the Squeak-dev
mailing list
|