changed: #actualPrecisionOf:
authorStefan Vogel <sv@exept.de>
Mon, 16 Apr 2012 23:58:55 +0200
changeset 658 9884ba816a34
parent 657 4f04a8bf19c5
child 659 2d1c408743da
changed: #actualPrecisionOf:
RegressionTests__FloatTest.st
--- a/RegressionTests__FloatTest.st	Sat Apr 14 20:01:29 2012 +0200
+++ b/RegressionTests__FloatTest.st	Mon Apr 16 23:58:55 2012 +0200
@@ -22,15 +22,14 @@
     "get the actual number of valid bits in the mantissa.
      This does a real test (i.e. does not believe the compiled-in ifdefs)"
 
-    |one half x count|
+    |one x count|
 
     one := aFloatClass unity.  "/ 1.0 in this class
-    half := one coerce:0.5.
     x := one.    
     count := 0.
 
-    [ one + x ~= one] whileTrue:[
-        x := x * half.
+    [ one + x > one] whileTrue:[
+        x := x / 2.
         count := count + 1.
     ].
     ^ count