Functions | |
bool | isLNGREAL (SatAddr src) |
is the object a LNGREAL | |
bool | LNGREALdecoded (SatAddr src, double *dst) |
Convert LNGREAL to C double. | |
SatAddr | LNGREALencoded (double src, SatAddr dst) |
Convert a C double to an HP LNGREAL. | |
bool | LNGREALdecodell (SatAddr src, long long *mantissa, long long *exponent) |
Decode a LNGREAL to its mantissa and exponent. | |
SatAddr | LNGREALencodell (long long mantissa, long long exponent, SatAddr dst) |
Encode a LNGREAL from its mantissa and exponent. | |
bool | LNGREALdecodeStr (SatAddr src, char *mantissa, char *exponent) |
Decode a LNGREAL to its mantissa and exponent expressed as null-terminated ASCII strings. | |
SatAddr | LNGREALencodeStr (const char *mantissa, const char *exponent, SatAddr dst) |
Encode a LNGREAL from its mantissa and exponent expressed as null-terminated ASCII strings. | |
SatAddr | makeLNGREAL (int numMdigits, int numEdigits) |
Create a new LNGREAL in tempOb. Populate it with zero. | |
int | LNGREALnibbles (SatAddr src) |
The size of a LNGREAL in nibbles. | |
bool | LNGREALdigits (SatAddr src, int *mDigits, int *eDigits) |
Get the number of digits in a LNGREAL's mantissa and exponent. | |
bool | LNGREALbytes (SatAddr src, int *mBytes, int *eBytes) |
Get the number of bytes required to store a LNGREAL's mantissa and exponent as strings. |
I've done limited testing on these because there is no software built-in to the calculator that handles them (except to display them). "Programming in Saturn Assembly" says that there are libraries that can manipulate them.
Note that unlike REAL numbers, the decimal point always comes after the LAST mantissa digit, not the first. So if the mantissa is 123 and the exponent is 0, that means 123.0, not 1.23.
bool isLNGREAL | ( | SatAddr | src | ) |
is the object a LNGREAL
src | Saturn address of an object |
bool LNGREALbytes | ( | SatAddr | src, | |
int * | mBytes, | |||
int * | eBytes | |||
) |
Get the number of bytes required to store a LNGREAL's mantissa and exponent as strings.
src | Saturn address of a LNGREAL object. | |
mBytes | If non-null then the number of digits required to store the mantissa as a null-terminated ASCII string, including a possible leading minus sign ("-") and a terminating null byte. | |
eBytes | If non-null then the number of digits required to store the exponent as a null-terminated ASCII string, including a possible leading minus sign ("-") and a terminating null byte. |
bool LNGREALdecoded | ( | SatAddr | src, | |
double * | dst | |||
) |
Convert LNGREAL to C double.
src | The LNGREAL to decode | |
dst | Where to store the LNGREAL's value |
bool LNGREALdecodell | ( | SatAddr | src, | |
long long * | mantissa, | |||
long long * | exponent | |||
) |
Decode a LNGREAL to its mantissa and exponent.
src | The LNGREAL to decode | |
mantissa | If non-null, then the mantissa will be stored here. | |
exponent | If non-null then the exponent will be stored here. |
bool LNGREALdecodeStr | ( | SatAddr | src, | |
char * | mantissa, | |||
char * | exponent | |||
) |
Decode a LNGREAL to its mantissa and exponent expressed as null-terminated ASCII strings.
src | The LNGREAL to decode | |
mantissa | If non-null, then the mantissa will be stored here as a null-terminated string. mantissa must point to sufficient space for the string. You can get the required size with LNGREALbytes() | |
exponent | If non-null, then the exponent will be stored here as a null-terminated string. Exponent must point to sufficient space for the string. You can get the required size with LNGREALbytes() |
bool LNGREALdigits | ( | SatAddr | src, | |
int * | mDigits, | |||
int * | eDigits | |||
) |
Get the number of digits in a LNGREAL's mantissa and exponent.
src | Saturn address of a LNGREAL object. | |
mDigits | If non-null then the number of digits in the mantissa will be stored here. eDigits If non-null then the number of digits in the exponent will be stored here. |
Convert a C double to an HP LNGREAL.
src | The double to convert. | |
dst | Where to store the LNGREAL. If zero then a new LNGREAL is created. |
Encode a LNGREAL from its mantissa and exponent.
mantissa | The mantissa part. | |
exponent | The exponent part. | |
dst | Where to store the LNGREAL. If zero then a new LNGREAL is created. |
Encode a LNGREAL from its mantissa and exponent expressed as null-terminated ASCII strings.
mantissa | ASCII string of the mantissa | |
exponent | ASCII string of the exponent part. | |
dst | Where to store the LNGREAL. If zero then a new LNGREAL is created. |
int LNGREALnibbles | ( | SatAddr | src | ) |
The size of a LNGREAL in nibbles.
src | Saturn address of the LNGREAL. |