class: ShortFloat
authorClaus Gittinger <cg@exept.de>
Wed, 25 Mar 2015 18:53:43 +0100
changeset 17658 5b0971920d66
parent 17657 424006f2570b
child 17659 f7bfcbd5efa7
class: ShortFloat class definition added: #emin
ShortFloat.st
--- a/ShortFloat.st	Wed Mar 25 18:18:33 2015 +0100
+++ b/ShortFloat.st	Wed Mar 25 18:53:43 2015 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 1996 by Claus Gittinger
 	      All Rights Reserved
@@ -485,12 +487,25 @@
     ^127
 !
 
+emin
+    "Answer the minimum exponent for this representation."
+
+    ^-126
+!
+
 pi
     "return the constant pi as ShortFloat"
 
     ^ Float pi asShortFloat
 !
 
+powersOfTwo
+    "/ sigh: cannot have PoersOfTwo as class nstvar (yet)
+    PowersOfTwo notNil ifTrue: [^PowersOfTwo].
+    PowersOfTwo := self newPowersOfTwo.
+    ^PowersOfTwo
+!
+
 unity
     "return the neutral element for multiplication (1.0) as ShortFloat"
 
@@ -2048,11 +2063,11 @@
 !ShortFloat class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.138 2015-03-25 17:17:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.139 2015-03-25 17:53:43 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.138 2015-03-25 17:17:35 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ShortFloat.st,v 1.139 2015-03-25 17:53:43 cg Exp $'
 ! !