extensions.st
changeset 5354 3b95aaa8c6f8
parent 5325 e976a6de6756
child 5455 20dbad6d9935
--- a/extensions.st	Tue Dec 03 22:58:18 2019 +0100
+++ b/extensions.st	Tue Dec 03 22:58:30 2019 +0100
@@ -1055,6 +1055,23 @@
 
 !Integer methodsFor:'coercing & converting'!
 
+asIEEEFloat
+    "return an IEEEFloat with same value as the receiver"
+
+    ^ IEEEFloat fromInteger:self
+
+    "
+     1234567890 asIEEEFloat
+     1234567890 asIEEEFloat asInteger
+     12345678901234567890 asIEEEFloat
+     12345678901234567890 asIEEEFloat asInteger
+    "
+
+
+! !
+
+!Integer methodsFor:'coercing & converting'!
+
 asOctaFloat
     "return a OctaFloat with same value as myself.
      Since octaFloats have a limited precision, you may loose bits when