extensions.st
changeset 5354 3b95aaa8c6f8
parent 5325 e976a6de6756
child 5455 20dbad6d9935
equal deleted inserted replaced
5353:b13c97dc8d56 5354:3b95aaa8c6f8
  1053     "Created: / 07-06-2019 / 02:32:19 / Claus Gittinger"
  1053     "Created: / 07-06-2019 / 02:32:19 / Claus Gittinger"
  1054 ! !
  1054 ! !
  1055 
  1055 
  1056 !Integer methodsFor:'coercing & converting'!
  1056 !Integer methodsFor:'coercing & converting'!
  1057 
  1057 
       
  1058 asIEEEFloat
       
  1059     "return an IEEEFloat with same value as the receiver"
       
  1060 
       
  1061     ^ IEEEFloat fromInteger:self
       
  1062 
       
  1063     "
       
  1064      1234567890 asIEEEFloat
       
  1065      1234567890 asIEEEFloat asInteger
       
  1066      12345678901234567890 asIEEEFloat
       
  1067      12345678901234567890 asIEEEFloat asInteger
       
  1068     "
       
  1069 
       
  1070 
       
  1071 ! !
       
  1072 
       
  1073 !Integer methodsFor:'coercing & converting'!
       
  1074 
  1058 asOctaFloat
  1075 asOctaFloat
  1059     "return a OctaFloat with same value as myself.
  1076     "return a OctaFloat with same value as myself.
  1060      Since octaFloats have a limited precision, you may loose bits when
  1077      Since octaFloats have a limited precision, you may loose bits when
  1061      doing this."
  1078      doing this."
  1062 
  1079