Re: HIGHEST-ALGEBRAIC and LOWEST-ALGEBRAIC (was: Re: Dynamically ...)




"Roger While" <simrw@xxxxxxxxxxxx> wrote in message
news:euahkq$2ig$02$1@xxxxxxxxxxxxxxxxxxxx
I know that FLOAT-xxx are implementor defined but I wonder
what these functions should return for FLOAT-xxx fields and how
to programatically achieve this.

For an underlying C or C++ implementation, ...
-----
#include <float.h>

float highest_algebraic_float_short () {
return (FLT_MAX);
}
float lowest_algebraic_float_short () {
return (-FLT_MAX);
}
double highest_algebraic_float_long () {
return (DBL_MAX);
}
double lowest_algebraic_float_long () {
return (-DBL_MAX);
}
long double highest_algebraic_float_extended () {
return (LDBL_MAX);
}
long double lowest_algebraic_float_extended () {
return (-LDBL_MAX);
}
-----
Or something like this, should do it.

Values from Microsoft Visual C++ 5.0 are:

#define FLT_MAX 3.402823466e+38F /* max value */
#define DBL_MAX 1.7976931348623158e+308 /* max value */
#define LDBL_MAX 1.189731495357231765e+4932L /* max value */



.