eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'NotANumber':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: NotANumber


Inheritance:

   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

Description:


Represents the NaN metaNumber.
This is a singleton used by non-floats (which have individual NaN representations).

copyright

COPYRIGHT (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 protocol:

class initialization
o  initialize
self initialize

instance creation
o  NaN
(comment from inherited method)
return the special 'not a number' float value

o  new


Instance protocol:

arithmetic
o  * aNumber
Multiply the receiver and the argument and answer with the result.

o  + aNumber
Add the receiver and the argument and answer with the result.

o  - aNumber
Subtract the argument from the receiver and answer with the result.

o  / aNumber
Divide the receiver by the argument and answer with the result.

comparing
o  = something
return true, if the argument represents the same numeric value
as the receiver, false otherwise.

o  hash
return true, if the argument represents the same numeric value
as the receiver, false otherwise.

double dispatching
o  differenceFromSomeNumber: aNumber
sent from aNumber-self, if aNumber does not know how to handle this

o  equalFromNumber: aNumber
(comment from inherited method)
aNumber does not know how to compare to the receiver -
retry the operation by coercing to higher generality

o  lessFromSomeNumber: aNumber
sent from aNumber < self, if aNumber does not know how to handle this

o  productFromSomeNumber: aNumber
sent from aNumber*self, if aNumber does not know how to handle this

o  quotientFromSomeNumber: aNumber
Return the quotient of the argument, aNumber and the receiver.
Sent when aNumber does not know how to divide by the receiver.

o  sumFromSomeNumber: aNumber
sent from aNumber+self, if aNumber does not know how to handle this

printing
o  printOn: aStream
(comment from inherited method)
append a printed description of the receiver to aStream

testing
o  isFinite
return true, if the receiver is a finite float (not NaN and not +/-INF)

o  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.



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:29:32 GMT