Real numbers (REAL)


Defines

#define REALnibbles(src)   (21)
 The size of a REAL in nibbles.

Functions

bool isREAL (SatAddr src)
 is object a real "approximate mode" number (REAL)?
bool REALdecode (SatAddr src, double *dst)
 Convert REAL to C double.
SatAddr REALencode (double d, SatAddr dst)
 Convert a C double to an HP REAL.
SatAddr makeREAL ()
 Create a new REAL in tempOb. It's value is undefined.

Detailed Description

A REAL is a 64 bit number with a 12 digit mantissa and an exponent from -500 to 499

Define Documentation

#define REALnibbles ( src   )     (21)

The size of a REAL in nibbles.

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


Function Documentation

bool isREAL ( SatAddr  src  ) 

is object a real "approximate mode" number (REAL)?

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

bool REALdecode ( SatAddr  src,
double *  dst 
)

Convert REAL to C double.

Parameters:
src The REAL to decode
dst Where to store the REAL's value
Returns:
true on success, false if src doesn't contain a REAL
Some HP REALs 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 REALencode ( double  d,
SatAddr  dst 
)

Convert a C double to an HP REAL.

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


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