22constexpr long double E = 2.7182818284590452353602874713526624977572470937000L;
29constexpr long double PI = 3.1415926535897932384626433832795028841971693993751L;
45template<
typename TYPE>
63template<
typename TYPE>
64TYPE
max(TYPE a, TYPE b);
81template<
typename TYPE>
82TYPE
min(TYPE a, TYPE b);
105double pow(
double base,
int exp);
111template<
typename TYPE>
114 return a > TYPE{} ? a : -a;
117template<
typename TYPE>
120 return a > b ? a : b;
123template<
typename TYPE>
126 return a < b ? a : b;
131 if (base == 0 && exp <= 0)
136 for (
int i = 0; i <
abs(exp); i += 1)
140 return exp >= 0 ? res : 1 / res;
Exception for invalid parameter values.
Definition error.h:97
Custom exception classes and callback validation utilities.
Main namespace for the project Original.
Definition algorithms.h:21
TYPE min(TYPE a, TYPE b)
Returns the smaller of two given values.
TYPE max(TYPE a, TYPE b)
Returns the larger of two given values.
TYPE abs(TYPE a)
Returns the absolute value of a given number.
constexpr long double PI
The mathematical constant PI (π).
Definition maths.h:29
double pow(double base, int exp)
Returns the result of raising a base to an exponent.
Definition maths.h:129
constexpr long double E
The mathematical constant E (Euler's number).
Definition maths.h:22