Doxygen
1.9.1
|
Math functions and constants. More...
Go to the source code of this file.
Namespaces | |
TasGrid | |
Encapsulates the Tasmanian Sparse Grid module. | |
TasGrid::Maths | |
Math functions and constants. | |
Functions | |
int | TasGrid::Maths::intlog2 (int i) |
Computes std::floor(std::log2(i)), but uses only integer operations. | |
int | TasGrid::Maths::int2log2 (int i) |
Computes std::pow(2, std::floor(std::log2(i))), but uses only integer operations. | |
int | TasGrid::Maths::int3log3 (int i) |
Computes std::pow(3, std::floor(std::log(i) / std::log(2))), but uses only integer operations. | |
int | TasGrid::Maths::pow2 (int p) |
Computes std::pow(2, p), but uses only integer operations. | |
int | TasGrid::Maths::pow3 (int p) |
Computes std::pow(3, p), but uses only integer operations. | |
double | TasGrid::Maths::sign (double p) |
Returns +1 or -1 with the same sign as p. | |
Variables | |
constexpr double | TasGrid::Maths::pi = 3.14159265358979323846 |
Half-period of the std::sin() and std::cos() functions. More... | |
constexpr double | TasGrid::Maths::num_tol = 1.E-12 |
Numerical tolerance for various algorithms. More... | |
Math functions and constants.
Simple functions and constnats used throughout the internal algorithms of Tasmanian.