org.abora.white.tumbler
Class IEEE32Pos

java.lang.Object
  |
  +--org.abora.white.xpp.basic.Heaper
        |
        +--org.abora.white.spaces.basic.Position
              |
              +--org.abora.white.tumbler.RealPos
                    |
                    +--org.abora.white.tumbler.IEEE32Pos

public class IEEE32Pos
extends RealPos

For representing exactly those real numbers that can be represented in IEEE single precision


Field Summary
protected  float myValue
           
 
Constructor Summary
IEEE32Pos(float value)
           
IEEE32Pos(Rcvr receiver)
           
 
Method Summary
 double asIEEE()
          Returns the value as IEEE basic data type is big enough to hold any value which can be put into an XuReal.
 double asIEEE64()
          Returns the value as IEEE64 (double precision).
 int precision()
          What precision is it, in terms of the number of bits used to represent it.
 void printOn(java.io.PrintWriter oo)
          This should rarely be overridden.
 void sendSelfTo(Xmtr xmtr)
           
 PrimFloatValue value()
          Essential.
 
Methods inherited from class org.abora.white.tumbler.RealPos
actualHashForEqual, asRegion, coordinateSpace, exportName, info, isEqual, isGE, make, makeIEEE32, makeIEEE64
 
Methods inherited from class org.abora.white.xpp.basic.Heaper
destroy, destruct, equals, hashForEqual, printContentsOn, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

myValue

protected float myValue
Constructor Detail

IEEE32Pos

public IEEE32Pos(float value)

IEEE32Pos

public IEEE32Pos(Rcvr receiver)
Method Detail

asIEEE

public double asIEEE()
Description copied from class: RealPos
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. I.e., no NANs, no inifinities, no negative zero.

Specified by:
asIEEE in class RealPos

asIEEE64

public double asIEEE64()
Description copied from class: RealPos
Returns the value as IEEE64 (double precision). The only IEEE values which this will return are those that represent real numbers. I.e., no NANs, no inifinities, no negative zero.

Specified by:
asIEEE64 in class RealPos

precision

public int precision()
Description copied from class: RealPos
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.

Specified by:
precision in class RealPos

printOn

public void printOn(java.io.PrintWriter oo)
Description copied from class: Heaper
This should rarely be overridden. In Tofu, it prints ClassName(...), where ... is either produced by printInsideOn or is ??? if printInsideOn it not overridden.

Overrides:
printOn in class Heaper

value

public PrimFloatValue value()
Description copied from class: RealPos
Essential. Return the number as a PrimFloat object from which you can get it in a variety of representations.

Specified by:
value in class RealPos

sendSelfTo

public void sendSelfTo(Xmtr xmtr)
Overrides:
sendSelfTo in class RealPos


Copyright © 2003 David G Jones. All Rights Reserved.
Original Udanax-Gold - Copyright © 1979-1999 Udanax.com. All rights reserved.