Extended Real numbers (EREL)


Defines

#define ERELnibbles(src)   (26)
 The size of a EREL in nibbles.

Functions

bool isEREL (SatAddr src)
 is object an extended real?
bool ERELdecode (SatAddr src, double *dst)
 Convert EREL to C double.
SatAddr ERELencode (double d, SatAddr dst)
 Convert a C double to an HP EREL.
SatAddr makeEREL ()
 Create a new EREL in tempOb. It's value is undefined.
double ereal2double (SatAddr src)

Detailed Description

An EREL has 15 digits and an exponent from -50000 to 49999

Define Documentation

#define ERELnibbles ( src   )     (26)

The size of a EREL in nibbles.

Parameters:
src Saturn address of the EREL. Although unnecessary, the parameter is included for consistency
Returns:
Always returns 26


Function Documentation

bool ERELdecode ( SatAddr  src,
double *  dst 
)

Convert EREL to C double.

Parameters:
src The EREL to decode
dst Where to store the EREL's value
Returns:
true on success, false if src doesn't contain a EREL
Some HP ERELs are too large or too small to be represented in a C double and will result in a very large or very small number.

SatAddr ERELencode ( double  d,
SatAddr  dst 
)

Convert a C double to an HP EREL.

Parameters:
src The double to convert.
dst Where to store the EREL. If zero then a new EREL is created.
Returns:
The EREL's Saturn address, or zero on error

bool isEREL ( SatAddr  src  ) 

is object an extended real?

Parameters:
src Saturn address of an object
Returns:
true if the object at src is an EREL


Generated on Sat Apr 3 16:38:31 2010 for HPObjects by  doxygen 1.5.0