MOOSE - Multiscale Object Oriented Simulation Environment
|
#include <cmath>
#include <cfloat>
#include <limits>
Go to the source code of this file.
Macros | |
#define | M_E 2.7182818284590452353 |
#define | M_PI 3.14159265358979323846 |
Functions | |
bool | almostEqual (float x, float y, float epsilon=FLT_EPSILON) |
bool | almostEqual (double x, double y, double epsilon=DBL_EPSILON) |
bool | almostEqual (long double x, long double y, long double epsilon=LDBL_EPSILON) |
template<class T > | |
bool | isClose (T a, T b, T tolerance) |
template<typename T > | |
bool | isInfinity (T value) |
template<class T > | |
bool | isNaN (T value) |
Variables | |
const double | LN2 = 0.69314718055994528622676 |
const unsigned long | LN2BYTES = 0xB1721814 |
const double | NATURAL_E = 2.718281828459045 |
const int | WORD_LENGTH = 32 |
#define M_E 2.7182818284590452353 |
Definition at line 38 of file numutil.h.
Referenced by Func::Func(), FuncTerm::FuncTerm(), Func::operator=(), and SeqSynHandler::updateKernel().
#define M_PI 3.14159265358979323846 |
Definition at line 34 of file numutil.h.
Referenced by ReadCell::addCaConc(), ReadCell::buildChannels(), ReadCell::buildCompartment(), calcSurf(), DifBuffer::calculateVolumeArea(), DifShell::calculateVolumeArea(), Func::Func(), FuncTerm::FuncTerm(), Func::operator=(), ReadCell::readData(), SeqSynHandler::updateKernel(), and DifBuffer::vReinit().
bool almostEqual | ( | float | x, |
float | y, | ||
float | epsilon = FLT_EPSILON |
||
) |
Definition at line 27 of file numutil.cpp.
Referenced by Interpol::setXmax(), and Interpol::setXmin().
bool almostEqual | ( | double | x, |
double | y, | ||
double | epsilon = DBL_EPSILON |
||
) |
Definition at line 40 of file numutil.cpp.
bool almostEqual | ( | long double | x, |
long double | y, | ||
long double | epsilon = LDBL_EPSILON |
||
) |
Definition at line 52 of file numutil.cpp.
bool isClose | ( | T | a, |
T | b, | ||
T | tolerance | ||
) |
Check 2 floating-point numbers for "equality". Algorithm (from Knuth) 'a' and 'b' are close if: | ( a - b ) / a | < e AND | ( a - b ) / b | < e where 'e' is a small number.
In this function, 'e' is computed as: e = tolerance * machine-epsilon
bool isNaN | ( | T | value | ) |