On Sun, Dec 26, 2010 at 08:16:22AM +0100, Andreas Raab wrote: > On 12/24/2010 9:35 PM, David T. Lewis wrote: > >On Fri, Dec 24, 2010 at 03:41:23PM -0300, Jecel Assumpcao Jr. wrote: > >>Ken G. Brown wrote on Wed, 22 Dec 2010 23:19:45 -0800 > >>>I think too, that it would be good to coordinate with Matthew F. > >>>To be sure the Croquet stuff is operational in 4.2. > >> > >>Yes, this was actually mentioned in the last meeting report - > >> > >>http://squeakboard.wordpress.com/2010/12/21/meeting-report-for-december- > >>21-2010/ > >> > >>If I understood correctly, he will continue to track Trunk and doesn't > >>feel that an incomplete merge in 4.2 will be a problem. He did mention > >>the "FloatMath plugin issue" and that it would be good to have that > >>solved in 4.2, but I have not been paying attention to this discussion. > > > >I think that the "FloatMath plugin issue" is Mantis 0007583: Float does > >not use FloatMathPlugin for bit-consistent float math across platforms. > > > > http://bugs.squeak.org/view.php?id=7583 > > I went ahead and pushed the changes. They do look reasonable to me but > please everyone give it a shot and run all the float tests to ensure it > works on your favorite platform as well. In short, if all the tests in > KernelTests-Numbers pass, we're good, if any fail, please report back > with details. > > Cheers, > - Andreas (cc to vm-dev list) I have found an additional issue with the FloatMath updates. When running on a VM compiled for 64 bits, an updated trunk image hangs up with no input event processing and no display updates. This is on a Linux VM compiled with no optimization (CFLAGS='-g -m64 -O0). The problem is related to Float>>fractionPart. If this method is reverted to the prior version, or if the FloatMathPlugin is not present, the image no longer hangs. The primitive in question is FloatMathPlugin>>primitiveFractionalPart which presumably has a bug related to pointer size. The bug is exposed by compiling with 64 bit pointers, and the updated trunk image will hang up if the primitive is being called by Float>>fractionPart. The FloatMathPlugin>>primitiveFractionalPart method looks fine (variables all declared correctly). The error occurs within the __ieee754_modf(rcvr, &trunc) function call, which produces completely bogus results when compiled -m64. This function is implemented as modf() in fdlibm. A stand-alone C test program confirms that the bug is in the library function itself. Presumably this bug would affect Mac VMs compiled for 64-bits, and I think there are a number of these in circulation (though I do not know if they include the FloatMathPlugin). Dave |
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 2010/12/29 David T. Lewis <[hidden email]>: > > (cc to vm-dev list) > > I have found an additional issue with the FloatMath updates. When running > on a VM compiled for 64 bits, an updated trunk image hangs up with no input > event processing and no display updates. > > This is on a Linux VM compiled with no optimization (CFLAGS='-g -m64 -O0). > > The problem is related to Float>>fractionPart. If this method is reverted > to the prior version, or if the FloatMathPlugin is not present, the image > no longer hangs. > > The primitive in question is FloatMathPlugin>>primitiveFractionalPart which > presumably has a bug related to pointer size. The bug is exposed by compiling > with 64 bit pointers, and the updated trunk image will hang up if the primitive > is being called by Float>>fractionPart. > > The FloatMathPlugin>>primitiveFractionalPart method looks fine (variables > all declared correctly). The error occurs within the __ieee754_modf(rcvr, &trunc) > function call, which produces completely bogus results when compiled -m64. > This function is implemented as modf() in fdlibm. A stand-alone C test > program confirms that the bug is in the library function itself. > > Presumably this bug would affect Mac VMs compiled for 64-bits, and I think > there are a number of these in circulation (though I do not know if they > include the FloatMathPlugin). > > Dave > > > |
On Wed, Dec 29, 2010 at 07:13:25PM +0100, Nicolas Cellier wrote: > > 2010/12/29 David T. Lewis <[hidden email]>: > > > > I have found an additional issue with the FloatMath updates. When running > > on a VM compiled for 64 bits, an updated trunk image hangs up with no input > > event processing and no display updates. > > > > This is on a Linux VM compiled with no optimization (CFLAGS='-g -m64 -O0). > > > > The problem is related to Float>>fractionPart. If this method is reverted > > to the prior version, or if the FloatMathPlugin is not present, the image > > no longer hangs. > > > > The primitive in question is FloatMathPlugin>>primitiveFractionalPart which > > presumably has a bug related to pointer size. The bug is exposed by compiling > > with 64 bit pointers, and the updated trunk image will hang up if the primitive > > is being called by Float>>fractionPart. > > > > The FloatMathPlugin>>primitiveFractionalPart method looks fine (variables > > all declared correctly). The error occurs within the __ieee754_modf(rcvr, &trunc) > > function call, which produces completely bogus results when compiled -m64. > > This function is implemented as modf() in fdlibm. A stand-alone C test > > program confirms that the bug is in the library function itself. > > > > Presumably this bug would affect Mac VMs compiled for 64-bits, and I think > > there are a number of these in circulation (though I do not know if they > > include the FloatMathPlugin). > > > > Dave > > 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. 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: ==== 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 Tests passed: RandomTest>>#testClassComment RandomTest>>#testCoverage RandomTest>>#testNew RandomTest>>#testUnCategorizedMethods ExtendedNumberParserTest>>#testClassComment ExtendedNumberParserTest>>#testCoverage ExtendedNumberParserTest>>#testFractionPartWithoutIntegerPart ExtendedNumberParserTest>>#testIntegerPartWithoutFraction ExtendedNumberParserTest>>#testInvalidExponent ExtendedNumberParserTest>>#testInvalidRadix ExtendedNumberParserTest>>#testInvalidScale ExtendedNumberParserTest>>#testNew ExtendedNumberParserTest>>#testPositive ExtendedNumberParserTest>>#testPositiveExponent ExtendedNumberParserTest>>#testUnCategorizedMethods NumberTest>>#testClassComment NumberTest>>#testCoverage NumberTest>>#testFractionPart NumberTest>>#testIntegerPart NumberTest>>#testNew NumberTest>>#testOne NumberTest>>#testPrintShowingDecimalPlaces NumberTest>>#testPrintShowingDecimalPlaces2 NumberTest>>#testPrintShowingDecimalPlaces3 NumberTest>>#testRaisedTo NumberTest>>#testRaisedToInteger NumberTest>>#testRaisedToIntegerWithFloats NumberTest>>#testReciprocal NumberTest>>#testUnCategorizedMethods FloatConsistencyTests>>#testMD5 LargePositiveIntegerTest>>#testBitShift LargePositiveIntegerTest>>#testClassComment LargePositiveIntegerTest>>#testCompactClassIndex LargePositiveIntegerTest>>#testCoverage LargePositiveIntegerTest>>#testDenormalizedPrintString LargePositiveIntegerTest>>#testEmptyTemplate LargePositiveIntegerTest>>#testMultDicAddSub LargePositiveIntegerTest>>#testNew LargePositiveIntegerTest>>#testNormalize LargePositiveIntegerTest>>#testUnCategorizedMethods LargeNegativeIntegerTest>>#testClassComment LargeNegativeIntegerTest>>#testCompactClassIndex LargeNegativeIntegerTest>>#testCoverage LargeNegativeIntegerTest>>#testDenormalizedPrintString LargeNegativeIntegerTest>>#testEmptyTemplate LargeNegativeIntegerTest>>#testNew LargeNegativeIntegerTest>>#testUnCategorizedMethods SmallIntegerTest>>#testBasicNew SmallIntegerTest>>#testClassComment SmallIntegerTest>>#testCoverage SmallIntegerTest>>#testDivide SmallIntegerTest>>#testEven SmallIntegerTest>>#testMaxVal SmallIntegerTest>>#testMinVal SmallIntegerTest>>#testNew SmallIntegerTest>>#testOdd SmallIntegerTest>>#testPrintPaddedWith SmallIntegerTest>>#testPrintString SmallIntegerTest>>#testUnCategorizedMethods IntegerDigitLogicTest>>#testAndSingleBitWithMinusOne IntegerDigitLogicTest>>#testLargeShift IntegerDigitLogicTest>>#testMixedSignDigitLogic IntegerDigitLogicTest>>#testNBitAndNNegatedEqualsN IntegerDigitLogicTest>>#testNNegatedEqualsNComplementedPlusOne IntegerDigitLogicTest>>#testShiftMinusOne1LeftThenRight IntegerDigitLogicTest>>#testShiftOneLeftThenRight IntegerTest>>#testBenchFib IntegerTest>>#testBitAt IntegerTest>>#testBitLogic IntegerTest>>#testCreationFromBytes1 IntegerTest>>#testCreationFromBytes2 IntegerTest>>#testCreationFromBytes3 IntegerTest>>#testCrossSumBase IntegerTest>>#testDifferentBases IntegerTest>>#testEven IntegerTest>>#testHighBit IntegerTest>>#testHighBitOfMagnitude IntegerTest>>#testIntegerByteEncoded IntegerTest>>#testIntegerPadding IntegerTest>>#testIntegerReadFrom IntegerTest>>#testIsInteger IntegerTest>>#testIsPowerOfTwo IntegerTest>>#testIsPowerOfTwoM6873 IntegerTest>>#testIsPrime IntegerTest>>#testIsProbablyPrime IntegerTest>>#testLargePrimesUpTo IntegerTest>>#testLowBit IntegerTest>>#testNegativeIntegerPrinting IntegerTest>>#testNew IntegerTest>>#testNumberOfDigits IntegerTest>>#testPositiveIntegerPrinting IntegerTest>>#testPrimesUpTo IntegerTest>>#testPrintOnBaseShowRadix IntegerTest>>#testPrintStringBase IntegerTest>>#testReadFrom IntegerTest>>#testReciprocalModulo IntegerTest>>#testRomanPrinting IntegerTest>>#testStringAsNumber IntegerTest>>#testTwoComplementBitLogicWithCarry IntegerTest>>#testTwoComplementRightShift SqNumberParserTest>>#testClassComment SqNumberParserTest>>#testCoverage SqNumberParserTest>>#testFail SqNumberParserTest>>#testFloatFromStreamAsNumber SqNumberParserTest>>#testFloatReadError SqNumberParserTest>>#testFloatReadWithRadix SqNumberParserTest>>#testIntegerReadFrom SqNumberParserTest>>#testIntegerReadWithRadix SqNumberParserTest>>#testNew SqNumberParserTest>>#testScaledDecimalWithTrailingZeroes SqNumberParserTest>>#testUnCategorizedMethods ScaledDecimalTest>>#testAsNumber ScaledDecimalTest>>#testAsNumberNegatedWithoutDecimalPoint ScaledDecimalTest>>#testAsNumberNegatedWithoutDecimalPoint2 ScaledDecimalTest>>#testAsNumberWithExtendedScale ScaledDecimalTest>>#testAsNumberWithRadix ScaledDecimalTest>>#testAsNumberWithSuperfluousDecimalPoint ScaledDecimalTest>>#testAsNumberWithoutDecimalPoint ScaledDecimalTest>>#testAsNumberWithoutDecimalPoint2 ScaledDecimalTest>>#testClassComment ScaledDecimalTest>>#testCoercion ScaledDecimalTest>>#testConvertFromFloat ScaledDecimalTest>>#testConvertFromFraction ScaledDecimalTest>>#testConvertFromFractionWithScale ScaledDecimalTest>>#testConvertFromInteger ScaledDecimalTest>>#testConvertFromIntegerWithScale ScaledDecimalTest>>#testCoverage ScaledDecimalTest>>#testIsLiteral ScaledDecimalTest>>#testLiteral ScaledDecimalTest>>#testNew ScaledDecimalTest>>#testOneRaisedToInteger ScaledDecimalTest>>#testPrintString ScaledDecimalTest>>#testRaisedToInteger ScaledDecimalTest>>#testReadFrom ScaledDecimalTest>>#testScaleExtension ScaledDecimalTest>>#testStoreOn ScaledDecimalTest>>#testUnCategorizedMethods ScaledDecimalTest>>#testZeroRaisedToInteger FractionTest>>#testClassComment FractionTest>>#testCoverage FractionTest>>#testFractionPrinting FractionTest>>#testNew FractionTest>>#testReciprocal FractionTest>>#testUnCategorizedMethods NumberParsingTest>>#testFloatFromStreamAsNumber NumberParsingTest>>#testFloatFromStringAsNumber NumberParsingTest>>#testFloatReadWithRadix NumberParsingTest>>#testIntegerFromString NumberParsingTest>>#testIntegerReadFrom NumberParsingTest>>#testIntegerReadWithRadix NumberParsingTest>>#testNegativeZero NumberParsingTest>>#testScaledDecimalWithTrailingZeroes FloatTest>>#test32bitGradualUnderflow FloatTest>>#test32bitRoundingMode FloatTest>>#testClassComment FloatTest>>#testCloseTo FloatTest>>#testComparisonWhenPrimitiveFails FloatTest>>#testContinuedFractions FloatTest>>#testCopy FloatTest>>#testCoverage FloatTest>>#testDegreeCosForExceptionalValues FloatTest>>#testDivide FloatTest>>#testHugeIntegerCloseTo FloatTest>>#testInfinity3 FloatTest>>#testInfinityCloseTo FloatTest>>#testIsZero FloatTest>>#testNaN1 FloatTest>>#testNaN2 FloatTest>>#testNaN3 FloatTest>>#testNaN4 FloatTest>>#testNaN5 FloatTest>>#testNaNCompare FloatTest>>#testNaNisLiteral FloatTest>>#testNegativeZeroAbs FloatTest>>#testNegativeZeroSign FloatTest>>#testNew FloatTest>>#testRaisedTo FloatTest>>#testReadFromManyDigits FloatTest>>#testReciprocal FloatTest>>#testSetOfFloat FloatTest>>#testSign FloatTest>>#testStringAsNumber FloatTest>>#testUnCategorizedMethods FloatTest>>#testZero1 FloatTest>>#testZero2 FloatTest>>#testZeroSignificandAsInteger |
2010/12/29 David T. Lewis <[hidden email]>: >> >> 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 |
Free forum by Nabble | Edit this page |