Float.st
changeset 18129 dfbced69ed47
parent 18125 447519ca12b9
child 18133 7e86f6decdba
--- a/Float.st	Wed Mar 25 18:17:35 2015 +0100
+++ b/Float.st	Wed Mar 25 18:18:33 2015 +0100
@@ -622,24 +622,10 @@
     ^ 2.7182818284590452353602874713526625
 !
 
-fmax
-    "The largest value allowed by the characterized
-    floating point object representation.  The answer
-    should be equal to
-
-    (1 - (self radix raisedTo: self precision negated))
-            * (self radix raisedTo: self emax + 1)
-
-    Note the ANSI spec says
-
-    (1 - (self radix raisedTo: self precision negated))
-            * (self radix raisedTo: self emax)
-
-    but this is not correct."
-
-    ^(self fromNumber: 1) -
-            ((self fromNumber: self radix) timesTwoPower: self precision negated - 1) * self radix
-            * ((self fromNumber: self radix) timesTwoPower: self emax - 1)
+emax
+    "Answer the maximum exponent for this representation."
+
+    ^1023
 !
 
 ln2
@@ -3108,11 +3094,11 @@
 !Float class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.211 2015-03-25 15:41:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.212 2015-03-25 17:18:33 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.211 2015-03-25 15:41:40 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Float.st,v 1.212 2015-03-25 17:18:33 cg Exp $'
 ! !