Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
ffmath.hpp
1
10#ifndef QLIBS_FFMATH
11#define QLIBS_FFMATH
12
13#include <include/qlibs_types.hpp>
14
18namespace qlibs {
19
21 namespace ffmath {
22
23
33 enum class classification {
34 FFP_ZERO = 0,
38 FFP_NAN,
39 };
40
41
50 bool isEqual( const float a,
51 const float b,
52 const float tol = 1.175494351e-38F ) noexcept;
53
58 float getInf( void );
59
64 float getNan( void );
65
82 classification classify( const float f );
83
85 template<typename T>
86 T Max(const T& first) {
87 return first;
88 }
100 template<typename T, typename... Args>
101 T Max( const T& first, const Args&... args ) {
102 const T& restMax = Max( args... );
103 return ( first > restMax ) ? first : restMax;
104 }
105
107 template<typename T>
108 T Min( const T& first ) {
109 return first;
110 }
122 template<typename T, typename... Args>
123 T Min( const T& first, const Args&... args ) {
124 const T& restMin = Min( args... );
125 return ( first < restMin ) ? first : restMin;
126 }
127
134 inline bool isNan( const float x )
135 {
136 return ( classification::FFP_NAN == classify( x ) );
137 }
138
144 inline bool isInf( const float x )
145 {
146 return ( classification::FFP_INFINITE == classify( x ) );
147 }
148
155 inline bool isFinite( const float x )
156 {
157 return ( classify( x ) < classification::FFP_INFINITE );
158 }
159
166 inline bool isNormal( const float x )
167 {
168 return ( classification::FFP_NORMAL == classify( x ) );
169 }
170
182 float copysign( float mag,
183 float sgn );
184
190 float sign( float x );
191
197 float absf( float x );
198
205 float recip( float x );
206
213 float sqrt( float x );
214
222 float rSqrt( float x );
223
230 float cbrt( float x );
231
239 float rCbrt( float x );
240
248 float rounding( float x );
249
255 float floor( float x );
256
262 float ceil( float x );
263
270 float trunc( float x );
271
277 float frac( float x );
278
300 float rem( float x,
301 float y );
302
325 float mod( float x,
326 float y );
327
335 float sin( float x );
336
344 float cos( float x );
345
352 float tan( float x );
353
361 float asin( float x );
362
370 float acos( float x );
371
379 float atan( float x );
380
390 float atan2( float y,
391 float x );
392
400 float exp2( float x );
401
409 float log2( float x );
410
419 float exp( float x );
420
430 float expm1( float x );
431
439 float exp10( float x );
440
448 float log( float x );
449
459 float log1p( float x );
460
468 float log10( float x );
469
479 float pow( float b,
480 float e );
481
489 float sinh( float x );
490
497 float cosh( float x );
498
505 float tanh( float x );
506
513 float asinh( float x );
514
521 float acosh( float x );
522
530 float atanh( float x );
531
539 float wrapToPi( float x );
540
548 float wrapTo2Pi( float x );
549
557 float wrapTo180( float x );
558
566 float wrapTo360( float x );
567
575 float midpoint( float a,
576 float b );
577
599 float lerp( float a,
600 float b,
601 float t );
602
613 float map( const float x,
614 const float xMin,
615 const float xMax,
616 const float yMin,
617 const float yMax ) noexcept;
626 real_t normalize( const float x,
627 const float xMin,
628 const float xMax ) noexcept;
639 bool inRangeCoerce( float &x,
640 const float lowerL,
641 const float upperL ) noexcept;
642
653 bool inPolygon( const float x,
654 const float y,
655 const float * const px,
656 const float * const py,
657 const size_t p ) noexcept;
658
669 bool inCircle( const float x,
670 const float y,
671 const float cx,
672 const float cy,
673 const float r ) noexcept;
674
681 float erf( float x );
682
689 float erfc( float x );
690
703 float rexp( float x,
704 int32_t *pw2 );
705
716 float ldexp( float x,
717 int32_t pw2 );
718
731 float hypot( float x,
732 float y );
733
745 float nextAfter( float x,
746 float y );
747
762 float tgamma( float x );
763
778 float lgamma( float x );
779
792 float factorial( float x );
793
805 float assoc_laguerre( size_t n,
806 size_t m,
807 float x );
808
820 float assoc_legendre( size_t n,
821 size_t m,
822 float x );
823
833 float beta( float x,
834 float y );
835
843 float comp_ellint_1( float k );
844
852 float comp_ellint_2( float k );
853
863 float comp_ellint_3( float k,
864 float nu );
865
875 float ellint_1( float k,
876 float phi );
877
887 float ellint_2( float k,
888 float phi );
889
900 float ellint_3( float k,
901 float nu,
902 float phi );
903
911 float expint( float num );
912
922 float hermite( size_t n,
923 float x );
924
935 float laguerre( size_t n,
936 float x );
937
948 float legendre( size_t n,
949 float x );
950
957 float riemann_zeta( float s );
958
969 float sph_bessel( size_t n,
970 float x );
971
983 float sph_neumann( size_t n,
984 float x );
985
996 float cyl_bessel_i( float nu,
997 float x );
998
1009 float cyl_bessel_j( float nu,
1010 float x );
1011
1023 float cyl_bessel_k( float nu,
1024 float x );
1025
1036 float cyl_neumann( float nu,
1037 float x );
1038
1050 float sph_legendre( size_t l,
1051 size_t m,
1052 float theta );
1053
1054 /*cstat -MISRAC++2008-0-1-4_b*/
1055
1057 constexpr float FFP_E = ( 2.718281828459045235360287471352662498F );
1059 constexpr float FFP_LOG2E = ( 1.442695040888963407359924681001892137F );
1061 constexpr float FFP_LOG10E = ( 0.434294481903251827651128918916605082F );
1063 constexpr float FFP_LN2 = ( 0.693147180559945309417232121458176568F );
1065 constexpr float FFP_LN10 = ( 2.302585092994045684017991454684364208F );
1067 constexpr float FFP_PI = ( 3.141592653589793238462643383279502884F );
1069 constexpr float FFP_2PI = ( 6.283185307179586231995926937088370323F );
1071 constexpr float FFP_PI_2 = ( 1.570796326794896557998981734272092580F );
1073 constexpr float FFP_PI_4 = ( 0.785398163397448278999490867136046290F );
1075 constexpr float FFP_1_PI = ( 0.318309886183790671537767526745028724F );
1077 constexpr float FFP_2_PI = ( 0.636619772367581382432888403855031356F );
1079 constexpr float FFP_1_SQRTPI = ( 0.564189583547756286948079451560772586F );
1081 constexpr float FFP_2_SQRTPI = ( 1.128379167095512558560699289955664426F );
1083 constexpr float FFP_SQRT2 = ( 1.414213562373095048801688724209698079F );
1085 constexpr float FFP_SQRT3 = ( 1.732050807568877293527446341505872367F );
1087 constexpr float FFP_SQRT1_2 = ( 0.707106781186547461715008466853760182F );
1089 constexpr float FFP_SQRT1_3 = ( 0.577350269189625764509148780501957456F );
1091 constexpr float FFP_LN_SQRT_2PI = ( 0.918938533204672669540968854562379419F );
1093 constexpr float FFP_GAMMA_E = ( 0.577215664901532860606512090082402431F );
1095 constexpr float FFP_PHI = ( 1.618033988749894848204586834365638118F );
1097 constexpr float FFP_RADIAN = ( 57.29577951308232286464772187173366546F );
1099 constexpr float FFP_LOG10_2 = ( 0.301029995663981198017467022509663366F );
1101 constexpr float FFP_LN_PI = ( 1.144729885849400163877476188645232468F );
1102 /*cstat +MISRAC++2008-0-1-4_b*/
1103
1107 struct numbers {
1109 static constexpr float e() { return FFP_E; }
1111 static constexpr float log2e() { return FFP_LOG2E; }
1113 static constexpr float log10e() { return FFP_LOG10E; }
1115 static constexpr float ln2() { return FFP_LN2; }
1117 static constexpr float ln10() { return FFP_LN10; }
1119 static constexpr float pi() { return FFP_PI; }
1121 static constexpr float inv_pi() { return FFP_1_PI; }
1123 static constexpr float inv_sqrtpi() { return FFP_1_SQRTPI; }
1125 static constexpr float sqrt2() { return FFP_SQRT2; }
1127 static constexpr float sqrt3() { return FFP_SQRT3; }
1129 static constexpr float inv_sqrt2() { return FFP_SQRT1_2; }
1131 static constexpr float inv_sqrt3() { return FFP_SQRT1_3; }
1133 static constexpr float egamma() { return FFP_GAMMA_E; }
1135 static constexpr float phi() { return FFP_PHI; }
1137 static constexpr float twice_pi() { return FFP_2PI; }
1139 static constexpr float half_pi() { return FFP_PI_2; }
1141 static constexpr float quarter_pi() { return FFP_PI_4; }
1143 static constexpr float radian() { return FFP_RADIAN; }
1145 static constexpr float lnpi() { return FFP_LN_PI; }
1147 static constexpr float ln_sqrt_2pi() { return FFP_LN_SQRT_2PI; }
1148 };
1149
1151 }
1152}
1153
1154
1155#endif /*QLIBS_FFMATH*/
constexpr float FFP_PHI
The golden ratio, (1+√5)/2 given as a single-precision floating-point number.
Definition ffmath.hpp:1095
float cyl_bessel_j(float nu, float x)
Computes the cylindrical Bessel function of the first kind of nu and x.
Definition ffmath.cpp:2820
constexpr float FFP_2PI
Twice circumference of a circle with diameter 1, ( 2π ) given as a single-precision floating-point nu...
Definition ffmath.hpp:1069
float exp10(float x)
Computes the value of 10 raised to the power of x.
Definition ffmath.cpp:609
float sph_bessel(size_t n, float x)
Computes the spherical Bessel function of the first kind n, and x.
Definition ffmath.cpp:2519
T Max(const T &first, const Args &... args)
Finds the maximum value among the provided arguments.
Definition ffmath.hpp:101
float wrapTo360(float x)
Wraps angle x, in degrees, to the interval [0, 360] such that 0 maps to 0 and 360 maps to 360....
Definition ffmath.cpp:688
float laguerre(size_t n, float x)
Computes the non-associated Laguerre polynomials of the degree n, and argument x.
Definition ffmath.cpp:2127
float rSqrt(float x)
Computes the reciprocal square-root of x denoted as 1/sqrt(x)
Definition ffmath.cpp:224
float tanh(float x)
Computes hyperbolic tangent of x.
Definition ffmath.cpp:651
classification classify(const float f)
Categorizes the floating-point number x. This function determines whether its argument is a normal fl...
Definition ffmath.cpp:130
constexpr float FFP_SQRT3
The square root of 3 ( √3 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1085
float expint(float num)
Computes the Exponential integral of num.
Definition ffmath.cpp:2083
float nextAfter(float x, float y)
Returns the next representable value of x in the direction of y. If x equals to y,...
Definition ffmath.cpp:911
constexpr float FFP_2_PI
Twice the inverse of π ( 2/π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1077
float mod(float x, float y)
Computes the floating point remainder after division of x by y, where x is the dividend and y is the ...
Definition ffmath.cpp:411
float ldexp(float x, int32_t pw2)
Multiplies a floating point value x by the number 2 raised to the pw2 power.
Definition ffmath.cpp:861
float ellint_3(float k, float nu, float phi)
Computes the incomplete elliptic integral of the third kind of k, nu and phi.
Definition ffmath.cpp:1901
float frac(float x)
Obtain the fractional part of x.
Definition ffmath.cpp:399
float log10(float x)
Computes the common (base-10) logarithm of x.
Definition ffmath.cpp:624
constexpr float FFP_SQRT1_3
The inverse of square root of 3 ( 1/√3 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1089
T Min(const T &first, const Args &... args)
Finds the minimum value among the provided arguments.
Definition ffmath.hpp:123
constexpr float FFP_PI
The circumference of a circle with diameter 1, ( π ) given as a single-precision floating-point numbe...
Definition ffmath.hpp:1067
float recip(float x)
Computes the multiplicative inverse or reciprocal for the value x, denoted by 1/x or x^(−1)
Definition ffmath.cpp:190
float rCbrt(float x)
Computes the reciprocal cubic-root of x denoted as 1/cbrt(x)
Definition ffmath.cpp:275
float erfc(float x)
Computes the complementary error function of x.
Definition ffmath.cpp:839
bool isInf(const float x)
Determine if x is Infinity.
Definition ffmath.hpp:144
float asinh(float x)
Computes the inverse hyperbolic sine of x.
Definition ffmath.cpp:657
float exp2(float x)
Computes 2 raised to the given power x.
Definition ffmath.cpp:520
float assoc_legendre(size_t n, size_t m, float x)
Computes the associated Legendre polynomials of the degree n, order m, and argument x.
Definition ffmath.cpp:1465
float assoc_laguerre(size_t n, size_t m, float x)
Computes the associated Laguerre polynomials of the degree n, order m, and argument x.
Definition ffmath.cpp:1382
float cyl_neumann(float nu, float x)
Computes the cylindrical Neumann function ( also known as Bessel function of the second kind or Weber...
Definition ffmath.cpp:2863
float exp(float x)
Computes the e ( Euler's number, 2.7182818 ) raised to the given power x.
Definition ffmath.cpp:599
float rem(float x, float y)
Computes the floating point remainder after division of x by y, where x is the dividend and y is the ...
Definition ffmath.cpp:404
float floor(float x)
Computes the largest integer value not greater than x.
Definition ffmath.cpp:311
constexpr float FFP_LN_SQRT_2PI
The natural logarithm of the square root of 2π given as a single-precision floating-point number.
Definition ffmath.hpp:1091
constexpr float FFP_1_PI
The inverse of π ( 1/π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1075
float comp_ellint_1(float k)
Computes the complete elliptic integral of the first kind of k.
Definition ffmath.cpp:1784
float cyl_bessel_k(float nu, float x)
Computes the irregular modified cylindrical Bessel function (also known as modified Bessel function o...
Definition ffmath.cpp:2846
float erf(float x)
Computes the error function of x.
Definition ffmath.cpp:824
float comp_ellint_3(float k, float nu)
Computes the complete elliptic integral of the third kind of k and nu.
Definition ffmath.cpp:1820
float factorial(float x)
Return the factorial of the integer part of x.
Definition ffmath.cpp:1248
bool isFinite(const float x)
Determines if the given floating point number x has finite value i.e. it is normal,...
Definition ffmath.hpp:155
constexpr float FFP_RADIAN
Radian, value of ( 180/π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1097
float comp_ellint_2(float k)
Computes the complete elliptic integral of the second kind of k.
Definition ffmath.cpp:1798
float log(float x)
Computes the natural (base e) logarithm of x.
Definition ffmath.cpp:614
constexpr float FFP_SQRT2
The square root of 2 ( √2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1083
bool isEqual(const float a, const float b, const float tol=1.175494351e-38F) noexcept
Determines if the parameters given as floating-point values are approximately equal.
Definition ffmath.cpp:113
float sinh(float x)
Computes hyperbolic sine of x.
Definition ffmath.cpp:635
float tgamma(float x)
Computes the gamma function of x.
Definition ffmath.cpp:943
constexpr float FFP_LN10
The natural logarithm of 10 ( ln 10 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1065
float trunc(float x)
Computes the nearest integer not greater in magnitude than x.
Definition ffmath.cpp:383
classification
Enum with the possible categorizations of a 32-bit floating-point number.
Definition ffmath.hpp:33
float map(const float x, const float xMin, const float xMax, const float yMin, const float yMax) noexcept
Scales the given input x in value range given by xMin and xMax to value range specified by the yMin a...
Definition ffmath.cpp:746
constexpr float FFP_LOG10E
The base 10 logarithm of e ( log_10 e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1061
real_t normalize(const float x, const float xMin, const float xMax) noexcept
Normalize the given input x in value range given by xMin and xMax to value range between 0 and 1.
Definition ffmath.cpp:739
constexpr float FFP_2_SQRTPI
Twice the inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1081
float ellint_2(float k, float phi)
Computes the incomplete elliptic integral of the second kind of k and phi.
Definition ffmath.cpp:1868
float sqrt(float x)
Computes the square-root of x.
Definition ffmath.cpp:201
float cyl_bessel_i(float nu, float x)
Computes the regular modified cylindrical Bessel function of nu and x.
Definition ffmath.cpp:2756
float riemann_zeta(float s)
Computes the Riemann zeta function of s.
Definition ffmath.cpp:2252
constexpr float FFP_E
The base of natural logarithms ( e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1057
float rexp(float x, int32_t *pw2)
Decomposes given floating point value x into a normalized fraction and an integral power of two.
Definition ffmath.cpp:844
float legendre(size_t n, float x)
Computes the unassociated Legendre polynomials of the degree n, and argument x.
Definition ffmath.cpp:2133
float expm1(float x)
Returns e raised to the given power minus one e^x-1 power x.
Definition ffmath.cpp:604
bool isNormal(const float x)
Determines if the given floating point number x is normal, i.e. is neither zero, subnormal,...
Definition ffmath.hpp:166
float cos(float x)
Computes the cosine of x (measured in radians).
Definition ffmath.cpp:467
float sign(float x)
Computes the sign function ( signum function).
Definition ffmath.cpp:165
constexpr float FFP_LOG2E
The base 2 logarithm of e ( log_2 e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1059
float midpoint(float a, float b)
Computes the midpoint of the floating-points a and b.
Definition ffmath.cpp:693
float getNan(void)
Returns Not a Number ( NaN ) nan as a 32-bit floating point number.
Definition ffmath.cpp:125
float copysign(float mag, float sgn)
Composes a floating point value with the magnitude of mag and the sign of sgn.
Definition ffmath.cpp:154
constexpr float FFP_PI_4
A quarter of π ( π/4 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1073
float lerp(float a, float b, float t)
Computes the linear interpolation between a and b, if the parameter t is inside [0,...
Definition ffmath.cpp:718
float wrapToPi(float x)
Wraps angle x, in radians, to the interval [−pi, pi] such that pi maps to pi and −pi maps to −pi....
Definition ffmath.cpp:673
float hypot(float x, float y)
Computes the square root of the sum of the squares of x and y, without undue overflow or underflow at...
Definition ffmath.cpp:877
float wrapTo180(float x)
Wraps angle x, in degrees, to the interval [–180, 180] such that 180 maps to 180 and –180 maps to –18...
Definition ffmath.cpp:683
float acosh(float x)
Computes the inverse hyperbolic cosine of x.
Definition ffmath.cpp:662
float pow(float b, float e)
Computes the value of b raised to the power e.
Definition ffmath.cpp:629
float beta(float x, float y)
Computes the Beta function of x and y.
Definition ffmath.cpp:1522
float tan(float x)
Computes the tangent of x (measured in radians).
Definition ffmath.cpp:482
constexpr float FFP_LN_PI
The natural logarithm of π ( ln(π) ) given as a single-precision floating-point number.
Definition ffmath.hpp:1101
bool inCircle(const float x, const float y, const float cx, const float cy, const float r) noexcept
Determines if the point at ( x, y) is inside the circle with radius r located at cx and cy.
Definition ffmath.cpp:814
constexpr float FFP_SQRT1_2
The inverse of square root of 2 ( 1/√2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1087
float atan2(float y, float x)
Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
Definition ffmath.cpp:508
float acos(float x)
Computes the principal value of the arc cosine of x.
Definition ffmath.cpp:493
float asin(float x)
Computes the principal value of the arc sine of x.
Definition ffmath.cpp:487
float hermite(size_t n, float x)
Computes the (physicist's) Hermite polynomials of the degree n and argument x.
Definition ffmath.cpp:2088
float sin(float x)
Computes the sine of x (measured in radians).
Definition ffmath.cpp:450
float wrapTo2Pi(float x)
Wraps angle x, in radians, to the interval [0, 2*pi] such that 0 maps to 0 and 2*pi and 2*pi maps to ...
Definition ffmath.cpp:678
float rounding(float x)
Computes the nearest integer value to x (in floating-point format), rounding halfway cases away from ...
Definition ffmath.cpp:281
bool isNan(const float x)
Determine if x is Not-A-Number NaN.
Definition ffmath.hpp:134
float ceil(float x)
Computes the smallest integer value not less than x.
Definition ffmath.cpp:347
bool inPolygon(const float x, const float y, const float *const px, const float *const py, const size_t p) noexcept
Determines if the point at ( x, y ) is inside the polygon given by the set of points on px and py.
Definition ffmath.cpp:779
constexpr float FFP_GAMMA_E
Constant Euler-Mascheroni given as a single-precision floating-point number.
Definition ffmath.hpp:1093
constexpr float FFP_LOG10_2
The base 10 logarithm of 2 ( log_10 2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1099
float absf(float x)
Computes the absolute value of a floating point value x.
Definition ffmath.cpp:185
float cosh(float x)
Computes hyperbolic cosine of x.
Definition ffmath.cpp:643
float atan(float x)
Computes the principal value of the arc tangent of x.
Definition ffmath.cpp:498
float getInf(void)
Returns positive infinity inf as a 32-bit floating point number.
Definition ffmath.cpp:120
float ellint_1(float k, float phi)
Computes the incomplete elliptic integral of the first kind of k and phi.
Definition ffmath.cpp:1843
constexpr float FFP_1_SQRTPI
The inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1079
float log2(float x)
Computes the base 2 logarithm of x.
Definition ffmath.cpp:552
constexpr float FFP_PI_2
Half of π ( π/2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1071
float log1p(float x)
Computes the natural (base e) logarithm of 1 plus the given number x ln(1+x) .
Definition ffmath.cpp:619
constexpr float FFP_LN2
The natural logarithm of 2 ( ln 2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1063
float cbrt(float x)
Computes the cubic-root of x.
Definition ffmath.cpp:270
float sph_neumann(size_t n, float x)
Computes the spherical Bessel function of the second kind also known as the spherical Neumann functio...
Definition ffmath.cpp:2540
float sph_legendre(size_t l, size_t m, float theta)
1-3) Computes the spherical associated Legendre function of degree l, order m, and polar angle theta
Definition ffmath.cpp:2885
float atanh(float x)
Computes the inverse hyperbolic tangent of x.
Definition ffmath.cpp:668
bool inRangeCoerce(float &x, const float lowerL, const float upperL) noexcept
Determines if the value pointed by x falls within a range specified by the upper limit and lower limi...
Definition ffmath.cpp:755
float lgamma(float x)
Computes the natural logarithm of the absolute value of the gamma function of x.
Definition ffmath.cpp:1207
The qLibs++ library namespace.
Definition fp16.cpp:4
float real_t
A type to instantiate a real variable double-precision of 64-bits IEEE 754.
Definition qlibs_types.hpp:43
Provides several mathematical constants as single-precision floating-point numbers.
Definition ffmath.hpp:1107
static constexpr float inv_pi()
The inverse of π ( 1/π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1121
static constexpr float radian()
Radian, value of ( 180/π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1143
static constexpr float log2e()
The base 2 logarithm of e ( log_2 e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1111
static constexpr float egamma()
Constant Euler-Mascheroni given as a single-precision floating-point number.
Definition ffmath.hpp:1133
static constexpr float ln2()
The natural logarithm of 2 ( ln 2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1115
static constexpr float quarter_pi()
A quarter of π ( π/4 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1141
static constexpr float sqrt3()
The square root of 4 ( √4 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1127
static constexpr float pi()
The circumference of a circle with diameter 1, ( π ) given as a single-precision floating-point numbe...
Definition ffmath.hpp:1119
static constexpr float inv_sqrt3()
The inverse of square root of 2 ( 1/√2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1131
static constexpr float inv_sqrtpi()
The inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.
Definition ffmath.hpp:1123
static constexpr float phi()
The golden ratio, (1+√5)/2 given as a single-precision floating-point number.
Definition ffmath.hpp:1135
static constexpr float log10e()
The base 10 logarithm of e ( log_10 e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1113
static constexpr float e()
The base of natural logarithms ( e ) given as a single-precision floating-point number.
Definition ffmath.hpp:1109
static constexpr float ln10()
The natural logarithm of 10 ( ln 10 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1117
static constexpr float inv_sqrt2()
The inverse of square root of 2 ( 1/√2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1129
static constexpr float lnpi()
The natural logarithm of π ( ln(π) ) given as a single-precision floating-point number.
Definition ffmath.hpp:1145
static constexpr float sqrt2()
The square root of 2 ( √2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1125
static constexpr float half_pi()
Half of π ( π/2 ) given as a single-precision floating-point number.
Definition ffmath.hpp:1139
static constexpr float ln_sqrt_2pi()
The natural logarithm of the square root of 2π ( ln( √2π ) ) given as a single-precision floating-poi...
Definition ffmath.hpp:1147
static constexpr float twice_pi()
Twice circumference of a circle with diameter 1, ( 2π ) given as a single-precision floating-point nu...
Definition ffmath.hpp:1137