
Class: SomeNumber
Object

+Magnitude

+ArithmeticValue

+Number

+MetaNumber

+SomeNumber
 Package:
 stx:libbasic
 Category:
 MagnitudeNumbers
 Version:
 rev:
1.14
date: 2021/11/15 08:49:40
 user: cg
 file: SomeNumber.st directory: libbasic
 module: stx stcclassLibrary: libbasic
Only used internally during double dispatch,
when MetaNumbers (INF and NAN) are involved.
copyrightCOPYRIGHT (c) 2003 by eXept Software AG
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
arithmetic

> *">* something

return the product of the receiver and the argument

> +">+ something

return the sum of the receiver and the argument

> "> something

return the difference of the receiver and the argument

> /">/ something

return the quotient of the receiver and the argument

> negated">negated

return the receiver negated
comparing

> <">< something

return true if the receiver is less than the argument

> =">= something

return true, if the argument represents the same numeric value
as the receiver, false otherwise.
Usage example(s):
Float infinity = Infinity positive
Infinity positive = Float infinity
Float negativeInfinity = Infinity negative
Infinity negative = Float negativeInfinity
Float negativeInfinity = Infinity positive
Infinity positive = Float negativeInfinity

double dispatching

> differenceFromSomeNumber:">differenceFromSomeNumber: someNumber

realNumber isNaN ifTrue:[^ self ].
Usage example(s):
^ realNumber differenceFromSomeNumber:someNumber

printing

> printOn:">printOn: aStream

(comment from inherited method)
append a printed description of the receiver to aStream
privateaccessing

> realNumber">realNumber


> realNumber:">realNumber: something

queries

> isFinite">isFinite

return true, if the receiver is a finite number (not NaN and not +/INF)

> isInfinite">isInfinite

return true, if the receiver is an infinite number (+Inf or Inf)

> isNaN">isNaN

return true, if the receiver is an invalid number (NaN  not a number).

> negative">negative

true if the receiver is < 0

> positive">positive

return true if the receiver is >= 0

> sign">sign

return the sign of the receiver (1, 0 or 1)

> strictlyPositive">strictlyPositive

true if the receiver is > 0
