Number.st
changeset 21833 5276dd24e7c0
parent 21828 d1a7e7c21694
child 21839 4a29e408440a
--- a/Number.st	Mon Jun 19 02:34:21 2017 +0200
+++ b/Number.st	Mon Jun 19 02:34:42 2017 +0200
@@ -1468,6 +1468,15 @@
     "Modified: / 9.7.1998 / 10:17:24 / cg"
 !
 
+ldexp:exp
+    "multiply the receiver by an integral power of 2.
+     I.e. return self * (2 ^ exp)"
+
+    ^ self * (2 raisedTo:exp)
+
+    "Created: / 19-06-2017 / 01:43:35 / cg"
+!
+
 ln
     "return the natural logarithm of myself.
      Raises an exception, if the receiver is less or equal to zero."
@@ -1476,14 +1485,16 @@
     "/ retry after converting to float
     (self isLimitedPrecisionReal not
     or:[self generality < 1.0 generality]) ifTrue:[
-	^ self asLongFloat ln.
+        ^ self asLongFloat ln.
     ].
     "/ very slow fallback
     ^ self ln_withAccuracy:self epsilon
 
     "
-	(10 raisedTo:1000) ln
+     (10 raisedTo:1000) ln
     "
+
+    "Modified (comment): / 18-06-2017 / 23:31:57 / cg"
 !
 
 log