--- a/Number.st Wed May 09 18:55:39 2018 +0200
+++ b/Number.st Wed May 09 18:57:23 2018 +0200
@@ -838,7 +838,6 @@
"
! !
-
!Number class methodsFor:'private'!
readMantissaAndScaleFrom:aStream radix:radix
@@ -852,8 +851,8 @@
|nextChar value factor intMantissa scale digit scaleFactor xvalue|
- value := 0.0.
- factor := 1.0 / radix.
+ value := 0.
+ factor := 1 / radix.
self isAbstract ifFalse:[
value := self zero.
factor := self unity / (self coerce:radix).
@@ -896,7 +895,11 @@
Number readMantissaAndScaleFrom:'234000' readStream radix:10.
Number readMantissaAndScaleFrom:'234' readStream radix:10.
Number readMantissaAndScaleFrom:'000234' readStream radix:10.
+ Number readMantissaAndScaleFrom:'01' readStream radix:10.
+ Number readMantissaAndScaleFrom:'001' readStream radix:10.
+ Number readMantissaAndScaleFrom:'0001' readStream radix:10.
Number readMantissaAndScaleFrom:'000000000000000000000000000024' readStream radix:10.
+ Number readMantissaAndScaleFrom:'0000000000000000000000000000000000000000000024' readStream radix:10.
Number readMantissaAndScaleFrom:'123456789012345678901234567890' readStream radix:10.
Number readMantissaAndScaleFrom:'12345678901234567890' readStream radix:10.
@@ -933,9 +936,6 @@
^ self == Number
! !
-
-
-
!Number methodsFor:'Compatibility-Squeak'!
asSmallAngleDegrees
@@ -1382,6 +1382,18 @@
"
!
+microseconds
+ "return a TimeDuration representing this number of microseconds."
+
+ ^ TimeDuration fromMicroseconds:self
+
+ "
+ 40 microseconds
+ "
+
+ "Modified (comment): / 21-09-2017 / 17:37:18 / cg"
+!
+
milliSeconds
"return a TimeDuration representing this number of milliseconds
Same as milliseconds, for compatibility"
@@ -1420,6 +1432,30 @@
"
!
+nanoseconds
+ "return a TimeDuration representing this number of nanoseconds."
+
+ ^ TimeDuration fromNanoseconds:self
+
+ "
+ 40 nanoseconds
+ "
+
+ "Modified (comment): / 21-09-2017 / 17:37:18 / cg"
+!
+
+picoseconds
+ "return a TimeDuration representing this number of picoseconds."
+
+ ^ TimeDuration fromPicoseconds:self
+
+ "
+ 40 picoseconds
+ "
+
+ "Modified (comment): / 21-09-2017 / 17:37:18 / cg"
+!
+
seconds
"return a TimeDuration representing this number of seconds"
@@ -3404,7 +3440,6 @@
"Modified: / 5.11.2001 / 17:54:22 / cg"
! !
-
!Number class methodsFor:'documentation'!
version