LimitedPrecisionReal.st
changeset 5470 5e56d8cff0c9
parent 5357 39860dd8b0f5
child 5557 f5f8d236027c
equal deleted inserted replaced
5469:8aca7ce5626f 5470:5e56d8cff0c9
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
     9  other person.  No title to or ownership of the software is
     9  other person.  No title to or ownership of the software is
    10  hereby transferred.
    10  hereby transferred.
    11 "
    11 "
       
    12 
       
    13 "{ Package: 'stx:libbasic' }"
    12 
    14 
    13 Number subclass:#LimitedPrecisionReal
    15 Number subclass:#LimitedPrecisionReal
    14 	instanceVariableNames:''
    16 	instanceVariableNames:''
    15 	classVariableNames:''
    17 	classVariableNames:''
    16 	poolDictionaries:''
    18 	poolDictionaries:''
   406 
   408 
   407     d := aFraction denominator.
   409     d := aFraction denominator.
   408     ^ (self * d + aFraction numerator) / d
   410     ^ (self * d + aFraction numerator) / d
   409 ! !
   411 ! !
   410 
   412 
       
   413 !LimitedPrecisionReal methodsFor:'encoding'!
       
   414 
       
   415 encodeOn:anEncoder with:aParameter
       
   416 
       
   417     anEncoder encodeFloat:self with:aParameter
       
   418 
       
   419 
       
   420 ! !
       
   421 
   411 !LimitedPrecisionReal methodsFor:'printing & storing'!
   422 !LimitedPrecisionReal methodsFor:'printing & storing'!
   412 
   423 
   413 printOn:aStream
   424 printOn:aStream
   414     "append a printed representation of the receiver to
   425     "append a printed representation of the receiver to
   415      the argument, aStream.
   426      the argument, aStream.
   431 
   442 
   432     "Created: / 17.4.1996 / 12:12:20 / cg"
   443     "Created: / 17.4.1996 / 12:12:20 / cg"
   433     "Modified: / 20.1.1998 / 14:10:47 / stefan"
   444     "Modified: / 20.1.1998 / 14:10:47 / stefan"
   434 ! !
   445 ! !
   435 
   446 
       
   447 
   436 !LimitedPrecisionReal methodsFor:'testing'!
   448 !LimitedPrecisionReal methodsFor:'testing'!
   437 
   449 
   438 isFinite
   450 isFinite
   439    ^ self subclassResponsibility
   451    ^ self subclassResponsibility
   440 
   452 
   503 ! !
   515 ! !
   504 
   516 
   505 !LimitedPrecisionReal class methodsFor:'documentation'!
   517 !LimitedPrecisionReal class methodsFor:'documentation'!
   506 
   518 
   507 version
   519 version
   508     ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.34 2000-04-04 10:20:56 ps Exp $'
   520     ^ '$Header: /cvs/stx/stx/libbasic/LimitedPrecisionReal.st,v 1.35 2000-07-18 09:01:52 stefan Exp $'
   509 ! !
   521 ! !