#BUGFIX by cg
authorClaus Gittinger <cg@exept.de>
Thu, 07 Jun 2018 16:23:20 +0200
changeset 23053 624d156e698c
parent 23052 817250995bca
child 23054 2f647561edc5
#BUGFIX by cg class: Integer changed: #asLargeFloat LargeFloat class is not always present
Integer.st
--- a/Integer.st	Wed Jun 06 15:17:48 2018 +0200
+++ b/Integer.st	Thu Jun 07 16:23:20 2018 +0200
@@ -799,6 +799,8 @@
     "Modified: / 15.11.1999 / 20:35:20 / cg"
 ! !
 
+
+
 !Integer class methodsFor:'class initialization'!
 
 initialize
@@ -1234,7 +1236,6 @@
 ! !
 
 
-
 !Integer methodsFor:'Compatibility-Dolphin'!
 
 highWord
@@ -2772,9 +2773,10 @@
 asLargeFloat
     "return a LargeFloat with same value as myself.
      Since largeFloats have a limited precision, you usually loose bits when
-     doing this."
-
-    ^ LargeFloat fromInteger:self
+     doing this.
+     If the largeFloat class is not present, a regular float is returned"
+
+    ^ (LargeFloat ? Float) fromInteger:self
 
     "
      1234567890 asLargeFloat
@@ -2782,6 +2784,8 @@
      12345678901234567890 asLargeFloat
      12345678901234567890 asLargeFloat asInteger
     "
+
+    "Modified (comment): / 07-06-2018 / 16:22:59 / Claus Gittinger"
 !
 
 asLongFloat