Public Methods |
| Fparch_ () |
| default ctor.
|
const struct utsname* | system_descr () const |
| returns the system description in a UNIX utsname struct.
|
int | radix () const |
| returns the radix of the floating-point representation.
|
int | mantissa_digits () const |
| returns the number of significant base-Radix digits in the mantissa.
|
int | exponent_digits () const |
| returns the number of significant base-Radix digits in the exponent.
|
int | min_exp () const |
| returns the minimal base-Radix exponent.
|
REAL | smallest () const |
| returns the smallest representable floating-point number.
|
int | max_exp () const |
| returns the maximal base-Radix exponent.
|
REAL | largest () const |
| returns the largest representable floating-point number.
|
int | fpadd_round () const |
| floating-point addition rounding index (0...5).
|
bool | round_ieee754 () const |
| returns true if rounding is IEEE-754 compliant.
|
bool | round_non_ieee () const |
| returns true if some rounding is done but is not IEEE.
|
bool | fp_truncate () const |
| returns true if floating-point addition truncates.
|
bool | graceful_underflow () const |
| returns true if IEEE "graceful underflow" is available.
|
int | negep () const |
| returns the largest negative integer such that 1.0-radix^negep() != 1.0, bounded by -(digits()+3) from below.
|
REAL | epsneg () const |
| returns a small real number such that 1.0-epsneg() != 1.0.
|
int | machep () const |
| returns the largest negative integer such that 1.0+radix^negep() != 1.0, bounded by -(digits()+3) from below.
|
REAL | eps () const |
| returns the smallest real number such that 1.0+eps() != 1.0.
|
int | nguard () const |
| Returns the number of guard digits for multiplication.
|
Static Protected Methods |
REAL | absolute (REAL x) |
Private Attributes |
struct utsname | Utsname |
int | Radix |
int | Digits |
int | Rnd |
int | Negep |
int | Machep |
int | Nguard |
int | Expdigits |
int | Minexp |
int | Maxexp |
REAL | Epsneg |
REAL | Eps |
REAL | Smallest |
REAL | Largest |
Static Private Attributes |
const REAL | ZERO |
const REAL | ONE |
const REAL | TWO |
The template parameter REAL makes sense only if it is one of "float", "double" or "long double". Functionality is similar to that of <numeric_limits> in the standard C++ library. This class is provided so that you can get information about the floating-point architecture even if an ANSI C++ implementation is not available. The main difference is that the members are not static as I was too lazy to do the silly init for all static members before the ctor can be run. :-)