LimitedPrecisionReal.st
changeset 19359 43b079b6245c
parent 18854 ab188ceb8115
child 19406 faccbadf3034
child 20058 049707a0931d
equal deleted inserted replaced
19358:f9e7a37cffd9 19359:43b079b6245c
   456       LongFloat infinity   
   456       LongFloat infinity   
   457       LargeFloat infinity   
   457       LargeFloat infinity   
   458     "
   458     "
   459 !
   459 !
   460 
   460 
       
   461 maxSmallInteger
       
   462     "answer the largest possible SmallIntger value as instance of myself"
       
   463 
       
   464     ^ self fromInteger:SmallInteger maxVal.
       
   465 
       
   466     "
       
   467        Float maxSmallInteger.
       
   468        LongFloat maxSmallInteger.
       
   469        ShortFloat maxSmallInteger.
       
   470     "
       
   471 !
       
   472 
   461 negativeInfinity
   473 negativeInfinity
   462     "return a float representing negative infinity"
   474     "return a float representing negative infinity"
   463 
   475 
   464     ^ self unity negated uncheckedDivide:self zero
   476     ^ self unity negated uncheckedDivide:self zero
   465 
   477 
  1165      t1 inspect. t2 inspect.
  1177      t1 inspect. t2 inspect.
  1166     "
  1178     "
  1167 ! !
  1179 ! !
  1168 
  1180 
  1169 
  1181 
       
  1182 
  1170 !LimitedPrecisionReal methodsFor:'printing & storing'!
  1183 !LimitedPrecisionReal methodsFor:'printing & storing'!
  1171 
  1184 
  1172 printOn:aStream
  1185 printOn:aStream
  1173     "append a printed representation of the receiver to
  1186     "append a printed representation of the receiver to
  1174      the argument, aStream.
  1187      the argument, aStream.
  1235    "redefined since reals are kludgy (ByteArry)"
  1248    "redefined since reals are kludgy (ByteArry)"
  1236 
  1249 
  1237    ^ 0
  1250    ^ 0
  1238 ! !
  1251 ! !
  1239 
  1252 
       
  1253 
  1240 !LimitedPrecisionReal methodsFor:'testing'!
  1254 !LimitedPrecisionReal methodsFor:'testing'!
  1241 
  1255 
  1242 isFinite
  1256 isFinite
  1243    ^ self subclassResponsibility
  1257    ^ self subclassResponsibility
  1244 
  1258