SpeedCrunch
0.11
|
#include <hmath.h>
HNumber::HNumber | ( | ) |
Creates a new number.
HNumber::HNumber | ( | const HNumber & | hn | ) |
Copies from another number.
HNumber::HNumber | ( | int | i | ) |
Creates a new number from an integer value.
HNumber::HNumber | ( | const char * | str | ) |
Creates a new number from a string.
Destroys this number.
Error HNumber::error | ( | ) | const |
Returns the error code kept with a NaN.
char HNumber::format | ( | ) | const |
Returns the preferred format (base/precision), default is 0
bool HNumber::isInteger | ( | ) | const |
Returns true if this number is integer.
bool HNumber::isNan | ( | ) | const |
Returns true if this number is Not a Number (NaN).
bool HNumber::isNegative | ( | ) | const |
Returns true if this number is less than zero.
bool HNumber::isPositive | ( | ) | const |
Returns true if this number is more than zero.
bool HNumber::isZero | ( | ) | const |
Returns true if this number is zero.
Bitwise ANDs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
Bitwise ANDs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
Shifts the integral part of <*this> to the left by the parameters value's bits. Zeros are shifted in to the right, shifted out bits are dropped. Yields NaN, if the operand exeeds the logic range, or the shift count is not a non-negative integer.
Shifts the integral part of <*this> to the right by the parameters value's bits. The most significand bit is duplicated to the left, shifted out bits are dropped (signed or arithmethic shift right). Yields NaN, if the operand exeeds the logic range, or the shift count is not a non-negative integer.
Bitwise XORs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
Bitwise XORs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
Bitwise ORs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
Bitwise ORs the integral parts of both operands. Yields NaN, if any operand exeeds the logic range
HNumber HNumber::operator~ | ( | ) | const |
Bitwise NOTs the integral part *this. Yields NaN, if *this exeeds the logic range
HNumber & HNumber::setFormat | ( | char | c = 0 | ) |
Sets the preferred format (base/precision), default is 0
int HNumber::toInt | ( | ) | const |
Returns the number as an int. It is meant to convert small (integer) numbers only and no checking is done whatsoever.
friend class HMath [friend] |
Returns true if l is not equal to r.
Returns true if l is less than or equal to r.
Returns true if l is greater than r.
Returns true if l is greater than or equal to r.