class: ShortFloat
authorClaus Gittinger <cg@exept.de>
Wed, 25 Mar 2015 18:53:43 +0100
changeset 18130 c014af8129f5
parent 18129 dfbced69ed47
child 18131 41616f1a4c2e
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 $'
 ! !