|
| a b c |
a := 16r1FFFFFFFFFFFFF0.
b := a asDouble.
c := a + 1.
(a = b) & (b = c) ifTrue: [self assert: (a = c)]
"note: this is squeak imply operator
self assert: (a = b) & (b = c) ==> (a = c)"
| a b c |
a := 16r1FFFFFFFFFFFFF0.
b := a asDouble.
c := a + 1.
(a = b) & (a < c) ifTrue: [self assert: (b < c)]
"note: this is squeak imply operator
self assert: (a = b) & (a < c) ==> (b < c)"
Current implementation (in VW/Squeak/Dolphin/STX/gst etc...) is incorrectly
coercing to Double in order to perform comparisons.
I claim on the contrary that it should convert double asTrueFraction in order
to perform comparison.
These bugs have various consequences on Sets (size might depend on order which
elements are added)
And it is scratching formal beauty of my favourite language.
So please, include patch from open source repository SYSBUG-FloatComparison
|