Index - All Packages - All Categories - All Classes

Class RealPos

Represents some real number exactly. Not all real numbers can be exactly represented. See class comment in RealSpace.

Package: Udanax-Gold
All Superclasses: Object Heaper Position
Immediate Subclasses: IEEE32Pos IEEE64Pos IEEE8Pos
Protocols: Object
Categories: Xanadu-tumbler

Class Methods

exportName


infostProtocol



Overrides: Position class

make: value

make an XuReal given an IEEE floating point number of whatever precision on this platform is able to hold all the real numbers currently representable by an XuReal. Currently this is IEEE64 (double precision), but may be redeclared as a larger IEEE precision in the future. See comment in XuReal::makeIEEE64

makeIEEE32: value

See comment in XuReal::makeIEEE64

makeIEEE64: value

Returns an XuReal which exactly represents the same real number that is represented by 'value'. BLASTs if value doesn't represent a real (ie., no NANs or inifinities). Negative 0 will be silently converted to positive zero

makeIEEE8: value

See comment in XuReal::makeIEEE64

Instance Methods

actualHashForEqual



Overrides: Position

asIEEE

Returns the value as IEEE basic data type is big enough to hold any value which can be put into an XuReal. Currently this is an IEEE64 (double precision). In future releases of this API, the return type of this method may be changed to IEEE128 (quad precision). Once we support other ways of representing real numbers, there may not be an all-inclusive IEEE type, in which case this message will BLAST.

The only IEEE values which this will return are those that represent real numbers. Ie., no NANs, no inifinities, no negative zero.

Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos

asIEEE64

Returns the value as IEEE64 (double precision).
The only IEEE values which this will return are those that represent real numbers. Ie., no NANs, no inifinities, no negative zero.

Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos

asRegion



Overrides: Position

coordinateSpace



Overrides: Position

createRcvr: receiver



Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos

exponent


isEqual: other



Overrides: Position

isGE: other



Overrides: Position

isIEEE

Whether the real number that this object represents is exactly representable in an available IEEE precision. Currently the answer is always TRUE, and the available precisions are 8 (stupid precision), 32 (single precision), and 64 (double precision). If the answer is FALSE, the meaning of the messages 'precision' and 'asIEEE' remain to be defined.

mantissa

This number represents exactly this->mantissa() * 2 ^ this->exponent(). Should we eventually support real numbers which cannot be expressed exactly with integral mantissa and exponent, then this message (and 'exponent') will BLAST for such numbers.

precision

What precision is it, in terms of the number of bits used to represent it. In the interests of efficiency, this may return a number larger than that *needed* to represent it. However, the precision reported must be at least that needed to represent this number. It is assumed that the format of the number satisfies the IEEE radix independent floating point spec. Should we represent real numbers other that those representable in IEEE, the meaning of this message will be more fully specified.

The fact that this message is allowed to overestimate precision doesn't interfere with equality: a->isEqual(b) exactly when they represent that same real number, even if one of them happens to overestimate precision more that the other.

Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos

sendSelfTo: xmtr



Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos

value

Essential. Return the number as a PrimFloat object from which you can get it in a variety of representations.

Overridden by: IEEE32Pos IEEE64Pos IEEE8Pos


Index - All Packages - All Categories - All Classes