Doxygen 1.9.1
Toolkit for Adaptive Stochastic Modeling and Non-Intrusive ApproximatioN: Tasmanian v8.2 (development)
TasGrid::Maths Namespace Reference

Math functions and constants. More...

Functions

int intlog2 (int i)
 Computes std::floor(std::log2(i)), but uses only integer operations.
 
int int2log2 (int i)
 Computes std::pow(2, std::floor(std::log2(i))), but uses only integer operations.
 
int int3log3 (int i)
 Computes std::pow(3, std::floor(std::log(i) / std::log(2))), but uses only integer operations.
 
int pow2 (int p)
 Computes std::pow(2, p), but uses only integer operations.
 
int pow3 (int p)
 Computes std::pow(3, p), but uses only integer operations.
 
double sign (double p)
 Returns +1 or -1 with the same sign as p.
 

Variables

constexpr double pi = 3.14159265358979323846
 Half-period of the std::sin() and std::cos() functions. More...
 
constexpr double num_tol = 1.E-12
 Numerical tolerance for various algorithms. More...
 

Detailed Description

Math functions and constants.