LargeFloat.st
changeset 24709 02a83fdf531e
parent 24706 d8e9e1584e1b
child 24967 9ab1da900f06
--- a/LargeFloat.st	Sat Aug 31 16:15:42 2019 +0200
+++ b/LargeFloat.st	Sat Aug 31 16:15:53 2019 +0200
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2003 by eXept Software AG
               All Rights Reserved
@@ -1590,7 +1592,7 @@
         baseExpEstimate := (self exponent * fBase reciprocalLogBase2 - 1.0e-10) ceiling.
         exp >= 0
                 ifTrue:
-                        [significand isPowerOfTwo
+                        [significand isPowerOf2
                                 ifTrue:
                                         [r := significand bitShift: 2 + exp.
                                         s := 4.
@@ -1600,7 +1602,7 @@
                                         s := 2.
                                         mPlus := mMinus := 1 bitShift: exp]]
                 ifFalse:
-                        [significand isPowerOfTwo
+                        [significand isPowerOf2
                                 ifTrue:
                                         [r := significand bitShift: 2.
                                         s := 1 bitShift: 2 - exp.
@@ -1673,7 +1675,7 @@
         denominator := 0.
         exp >= 0
                 ifTrue:
-                        [significand isPowerOfTwo
+                        [significand isPowerOf2
                                 ifTrue:
                                         [r := significand bitShift: 2 + exp.
                                         s := 4.
@@ -1683,7 +1685,7 @@
                                         s := 2.
                                         mPlus := mMinus := 1 bitShift: exp]]
                 ifFalse:
-                        [significand isPowerOfTwo
+                        [significand isPowerOf2
                                 ifTrue:
                                         [r := significand bitShift: 2.
                                         s := 1 bitShift: 2 - exp.
@@ -2728,11 +2730,11 @@
 !LargeFloat methodsFor:'truncation and round off'!
 
 predecessor
-	mantissa = 0 ifTrue: [^self].
-	mantissa negative ifTrue: [^self negated successor negated].
-	^mantissa isPowerOfTwo
-		ifTrue: [self - (self ulp timesTwoPower: -1)]
-		ifFalse: [self - self ulp]
+        mantissa = 0 ifTrue: [^self].
+        mantissa negative ifTrue: [^self negated successor negated].
+        ^mantissa isPowerOf2
+                ifTrue: [self - (self ulp timesTwoPower: -1)]
+                ifFalse: [self - self ulp]
 !
 
 successor