|
#define | M_PI 3.14159265358979323846 |
|
#define | M_E 2.7182818284590452354 |
|
#define | M_LOG2E 1.4426950408889634074 |
|
#define | M_LOG10E 0.43429448190325182765 |
|
#define | M_LN2 0.69314718055994530942 |
|
#define | M_LN10 2.30258509299404568402 |
|
#define | M_PI_2 1.57079632679489661923 |
|
#define | M_PI_4 0.78539816339744830962 |
|
#define | M_1_PI 0.31830988618379067154 |
|
#define | M_2_PI 0.63661977236758134308 |
|
#define | M_2_SQRTPI 1.12837916709551257390 |
|
#define | M_SQRT2 1.41421356237309504880 |
|
#define | M_SQRT1_2 0.70710678118654752440 |
|
#define | _MATH_DEFINES_DEFINED |
|
|
template<typename T > |
constexpr std::remove_cv< typenamestd::remove_reference< T >::type >::type | plask::NaN () |
| Construct NaN or its counterpart with given type T .
|
|
template<typename T > |
constexpr std::remove_cv< typenamestd::remove_reference< T >::type >::type | plask::Zero () |
| Construct NaN or its counterpart with given type T .
|
|
long double | plask::conj (long double x) |
|
double | plask::conj (double x) |
|
float | plask::conj (float x) |
|
bool | plask::is_zero (double v, double abs_supremum=SMALL) |
| Check if the real number is almost zero.
|
|
bool | plask::is_zero (dcomplex v) |
| Check if the complex number is almost zero.
|
|
bool | plask::isnan (dcomplex v) |
| Check if the complex number is NaN.
|
|
template<typename T > |
T | plask::remove_nan (T val, const T nan=Zero< T >()) |
| Replace NaN with some specified value (zero by default).
|
|
plask::dcomplex | plask::operator* (int a, const plask::dcomplex &b) |
|
plask::dcomplex | plask::operator* (const plask::dcomplex &a, int b) |
|
plask::dcomplex | plask::operator* (unsigned a, const plask::dcomplex &b) |
|
plask::dcomplex | plask::operator* (const plask::dcomplex &a, unsigned b) |
|
plask::dcomplex | plask::operator/ (int a, const plask::dcomplex &b) |
|
plask::dcomplex | plask::operator/ (const plask::dcomplex &a, int b) |
|
plask::dcomplex | plask::operator/ (unsigned a, const plask::dcomplex &b) |
|
plask::dcomplex | plask::operator/ (const plask::dcomplex &a, unsigned b) |
|
double | plask::abs2 (const dcomplex &x) |
|
template<typename T > |
const T & | plask::clamp (const T &v, const T &min, const T &max) |
| Clamp value to given range.
|
|
template<typename T > |
bool | plask::in_range (const T &v, const T &beg, const T &end) |
| Check if value v is in given range [beg, end).
|
|
template<typename T1 , typename T2 , typename T3 > |
auto | plask::fma (T1 to_mult_1, T2 to_mult_2, T3 to_sum) -> decltype(to_mult_1 *to_mult_2+to_sum) |
| Wrapper over std::fma witch works for all types.
|
|
float | plask::fma (float to_mult_1, float to_mult_2, float to_sum) |
|
double | plask::fma (double to_mult_1, double to_mult_2, double to_sum) |
|
long double | plask::fma (long double to_mult_1, long double to_mult_2, long double to_sum) |
|
bool | plask::dbl_compare_eq (double x, double y) |
| Check if two doubles are equals.
|
|
bool | plask::dbl_compare_lt (double x, double y) |
| Check if x is less than y .
|
|
bool | plask::dbl_compare_gt (double x, double y) |
| Check if x is greater than y .
|
|
bool | plask::dbl_compare_lteq (double x, double y) |
| Check if x is less or equals to y .
|
|
bool | plask::dbl_compare_gteq (double x, double y) |
| Check if x is greater or equals to y .
|
|
template<typename T > |
std::complex< T > | plask::parse_complex (std::string str_to_parse) |
| Parse complex number in format: R+Ij, R, Ij, or (R, I), where R and I are floating point numbers (last is standard C++ format).
|
|
template std::complex< double > | plask::parse_complex< double > (std::string str_to_parse) |
|