|
Class: NotANumber
Object
|
+--Magnitude
|
+--ArithmeticValue
|
+--Number
|
+--MetaNumber
|
+--NotANumber
- Package:
- stx:libbasic
- Category:
- Magnitude-Numbers
- Version:
- rev:
1.13
date: 2023/09/16 09:17:02
- user: cg
- file: NotANumber.st directory: libbasic
- module: stx stc-classLibrary: libbasic
Represents the NaN metaNumber.
This is a singleton used by non-floats (which have individual NaN representations).
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.
class initialization
-
initialize
-
self initialize
instance creation
-
NaN
-
(comment from inherited method)
return the special 'not a number' float value
-
new
-
arithmetic
-
* aNumber
-
Multiply the receiver and the argument and answer with the result.
-
+ aNumber
-
Add the receiver and the argument and answer with the result.
-
- aNumber
-
Subtract the argument from the receiver and answer with the result.
-
/ aNumber
-
Divide the receiver by the argument and answer with the result.
comparing
-
= something
-
return true, if the argument represents the same numeric value
as the receiver, false otherwise.
-
hash
-
return true, if the argument represents the same numeric value
as the receiver, false otherwise.
double dispatching
-
differenceFromSomeNumber: aNumber
-
sent from aNumber-self, if aNumber does not know how to handle this
-
equalFromNumber: aNumber
-
(comment from inherited method)
aNumber does not know how to compare to the receiver -
retry the operation by coercing to higher generality
-
lessFromSomeNumber: aNumber
-
sent from aNumber < self, if aNumber does not know how to handle this
-
productFromSomeNumber: aNumber
-
sent from aNumber*self, if aNumber does not know how to handle this
-
quotientFromSomeNumber: aNumber
-
Return the quotient of the argument, aNumber and the receiver.
Sent when aNumber does not know how to divide by the receiver.
-
sumFromSomeNumber: aNumber
-
sent from aNumber+self, if aNumber does not know how to handle this
printing
-
printOn: aStream
-
(comment from inherited method)
append a printed description of the receiver to aStream
testing
-
isFinite
-
return true, if the receiver is a finite float (not NaN and not +/-INF)
-
isNaN
-
return true, if the receiver is an invalid float (NaN - not a number).
These are usually not created by ST/X float operations (they raise an exception);
however, inline C-code or proceeded exceptions or reading from a stream
could produce them.
|