Documentation
Tools for embedded systems
Loading...
Searching...
No Matches
Float Fast-Math

Fast floating-point math library for applications where speed is more important than accuracy. More...

Classes

struct  qlibs::ffmath::numbers
 Provides several mathematical constants as single-precision floating-point numbers. More...
 

Enumerations

enum class  qlibs::ffmath::classification {
  qlibs::ffmath::classification::FFP_ZERO , qlibs::ffmath::classification::FFP_SUBNORMAL , qlibs::ffmath::classification::FFP_NORMAL , qlibs::ffmath::classification::FFP_INFINITE ,
  qlibs::ffmath::classification::FFP_NAN
}
 Enum with the possible categorizations of a 32-bit floating-point number. More...
 

Functions

bool qlibs::ffmath::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.
 
float qlibs::ffmath::getInf (void)
 Returns positive infinity inf as a 32-bit floating point number.
 
float qlibs::ffmath::getNan (void)
 Returns Not a Number ( NaN ) nan as a 32-bit floating point number.
 
classification qlibs::ffmath::classify (const float f)
 Categorizes the floating-point number x. This function determines whether its argument is a normal floating-point number, or one of several special categories of values, including NaN (not a number), infinity, subnormal floating-point values or zero. To determine what category the argument belongs to, compare the return value with the any of the following number classification macros:
 
template<typename T , typename... Args>
qlibs::ffmath::Max (const T &first, const Args &... args)
 Finds the maximum value among the provided arguments.
 
template<typename T , typename... Args>
qlibs::ffmath::Min (const T &first, const Args &... args)
 Finds the minimum value among the provided arguments.
 
bool qlibs::ffmath::isNan (const float x)
 Determine if x is Not-A-Number NaN.
 
bool qlibs::ffmath::isInf (const float x)
 Determine if x is Infinity.
 
bool qlibs::ffmath::isFinite (const float x)
 Determines if the given floating point number x has finite value i.e. it is normal, subnormal or zero, but not infinite or NaN.
 
bool qlibs::ffmath::isNormal (const float x)
 Determines if the given floating point number x is normal, i.e. is neither zero, subnormal, infinite, or NaN.
 
float qlibs::ffmath::copysign (float mag, float sgn)
 Composes a floating point value with the magnitude of mag and the sign of sgn.
 
float qlibs::ffmath::sign (float x)
 Computes the sign function ( signum function).
 
float qlibs::ffmath::absf (float x)
 Computes the absolute value of a floating point value x.
 
float qlibs::ffmath::recip (float x)
 Computes the multiplicative inverse or reciprocal for the value x, denoted by 1/x or x^(−1)
 
float qlibs::ffmath::sqrt (float x)
 Computes the square-root of x.
 
float qlibs::ffmath::rSqrt (float x)
 Computes the reciprocal square-root of x denoted as 1/sqrt(x)
 
float qlibs::ffmath::cbrt (float x)
 Computes the cubic-root of x.
 
float qlibs::ffmath::rCbrt (float x)
 Computes the reciprocal cubic-root of x denoted as 1/cbrt(x)
 
float qlibs::ffmath::rounding (float x)
 Computes the nearest integer value to x (in floating-point format), rounding halfway cases away from zero.
 
float qlibs::ffmath::floor (float x)
 Computes the largest integer value not greater than x.
 
float qlibs::ffmath::ceil (float x)
 Computes the smallest integer value not less than x.
 
float qlibs::ffmath::trunc (float x)
 Computes the nearest integer not greater in magnitude than x.
 
float qlibs::ffmath::frac (float x)
 Obtain the fractional part of x.
 
float qlibs::ffmath::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 divisor. This function is often called the remainder operation, which can be expressed as r=a-(b*trunc(a/b)) . This function follows the convention that rem(x,0) is nan.
 
float qlibs::ffmath::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 divisor. This function is often called the modulo operation, which can be expressed as b=a-m*floor(a/m) . This function follows the convention that mod(x,0) returns x.
 
float qlibs::ffmath::sin (float x)
 Computes the sine of x (measured in radians).
 
float qlibs::ffmath::cos (float x)
 Computes the cosine of x (measured in radians).
 
float qlibs::ffmath::tan (float x)
 Computes the tangent of x (measured in radians).
 
float qlibs::ffmath::asin (float x)
 Computes the principal value of the arc sine of x.
 
float qlibs::ffmath::acos (float x)
 Computes the principal value of the arc cosine of x.
 
float qlibs::ffmath::atan (float x)
 Computes the principal value of the arc tangent of x.
 
float qlibs::ffmath::atan2 (float y, float x)
 Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.
 
float qlibs::ffmath::exp2 (float x)
 Computes 2 raised to the given power x.
 
float qlibs::ffmath::log2 (float x)
 Computes the base 2 logarithm of x.
 
float qlibs::ffmath::exp (float x)
 Computes the e ( Euler's number, 2.7182818 ) raised to the given power x.
 
float qlibs::ffmath::expm1 (float x)
 Returns e raised to the given power minus one e^x-1 power x.
 
float qlibs::ffmath::exp10 (float x)
 Computes the value of 10 raised to the power of x.
 
float qlibs::ffmath::log (float x)
 Computes the natural (base e) logarithm of x.
 
float qlibs::ffmath::log1p (float x)
 Computes the natural (base e) logarithm of 1 plus the given number x ln(1+x) .
 
float qlibs::ffmath::log10 (float x)
 Computes the common (base-10) logarithm of x.
 
float qlibs::ffmath::pow (float b, float e)
 Computes the value of b raised to the power e.
 
float qlibs::ffmath::sinh (float x)
 Computes hyperbolic sine of x.
 
float qlibs::ffmath::cosh (float x)
 Computes hyperbolic cosine of x.
 
float qlibs::ffmath::tanh (float x)
 Computes hyperbolic tangent of x.
 
float qlibs::ffmath::asinh (float x)
 Computes the inverse hyperbolic sine of x.
 
float qlibs::ffmath::acosh (float x)
 Computes the inverse hyperbolic cosine of x.
 
float qlibs::ffmath::atanh (float x)
 Computes the inverse hyperbolic tangent of x.
 
float qlibs::ffmath::wrapToPi (float x)
 Wraps angle x, in radians, to the interval [−pi, pi] such that pi maps to pi and −pi maps to −pi. In general, odd, positive multiples of pi map to pi and odd, negative multiples of pi map to −pi.
 
float qlibs::ffmath::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 2*pi. In general, positive multiples of 2*pi map to 2*pi and negative multiples of 2*pi map to 0.
 
float qlibs::ffmath::wrapTo180 (float x)
 Wraps angle x, in degrees, to the interval [–180, 180] such that 180 maps to 180 and –180 maps to –180. In general, odd, positive multiples of 180 map to 180 and odd, negative multiples of 180 map to –180.
 
float qlibs::ffmath::wrapTo360 (float x)
 Wraps angle x, in degrees, to the interval [0, 360] such that 0 maps to 0 and 360 maps to 360. In general, positive multiples of 360 map to 360 and negative multiples of 360 map to zero.
 
float qlibs::ffmath::midpoint (float a, float b)
 Computes the midpoint of the floating-points a and b.
 
float qlibs::ffmath::lerp (float a, float b, float t)
 Computes the linear interpolation between a and b, if the parameter t is inside [0, 1] (the linear extrapolation otherwise), i.e. the result of a+t*(b-a) with accounting for floating-point calculation imprecision.
 
float qlibs::ffmath::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 and yMax.
 
real_t qlibs::ffmath::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.
 
bool qlibs::ffmath::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 limit inputs and coerces the value to fall within the range.
 
bool qlibs::ffmath::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.
 
bool qlibs::ffmath::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.
 
float qlibs::ffmath::erf (float x)
 Computes the error function of x.
 
float qlibs::ffmath::erfc (float x)
 Computes the complementary error function of x.
 
float qlibs::ffmath::rexp (float x, int32_t *pw2)
 Decomposes given floating point value x into a normalized fraction and an integral power of two.
 
float qlibs::ffmath::ldexp (float x, int32_t pw2)
 Multiplies a floating point value x by the number 2 raised to the pw2 power.
 
float qlibs::ffmath::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 intermediate stages of the computation.
 
float qlibs::ffmath::nextAfter (float x, float y)
 Returns the next representable value of x in the direction of y. If x equals to y, y is returned.
 
float qlibs::ffmath::tgamma (float x)
 Computes the gamma function of x.
 
float qlibs::ffmath::lgamma (float x)
 Computes the natural logarithm of the absolute value of the gamma function of x.
 
float qlibs::ffmath::factorial (float x)
 Return the factorial of the integer part of x.
 
float qlibs::ffmath::assoc_laguerre (size_t n, size_t m, float x)
 Computes the associated Laguerre polynomials of the degree n, order m, and argument x.
 
float qlibs::ffmath::assoc_legendre (size_t n, size_t m, float x)
 Computes the associated Legendre polynomials of the degree n, order m, and argument x.
 
float qlibs::ffmath::beta (float x, float y)
 Computes the Beta function of x and y.
 
float qlibs::ffmath::comp_ellint_1 (float k)
 Computes the complete elliptic integral of the first kind of k.
 
float qlibs::ffmath::comp_ellint_2 (float k)
 Computes the complete elliptic integral of the second kind of k.
 
float qlibs::ffmath::comp_ellint_3 (float k, float nu)
 Computes the complete elliptic integral of the third kind of k and nu.
 
float qlibs::ffmath::ellint_1 (float k, float phi)
 Computes the incomplete elliptic integral of the first kind of k and phi.
 
float qlibs::ffmath::ellint_2 (float k, float phi)
 Computes the incomplete elliptic integral of the second kind of k and phi.
 
float qlibs::ffmath::ellint_3 (float k, float nu, float phi)
 Computes the incomplete elliptic integral of the third kind of k, nu and phi.
 
float qlibs::ffmath::expint (float num)
 Computes the Exponential integral of num.
 
float qlibs::ffmath::hermite (size_t n, float x)
 Computes the (physicist's) Hermite polynomials of the degree n and argument x.
 
float qlibs::ffmath::laguerre (size_t n, float x)
 Computes the non-associated Laguerre polynomials of the degree n, and argument x.
 
float qlibs::ffmath::legendre (size_t n, float x)
 Computes the unassociated Legendre polynomials of the degree n, and argument x.
 
float qlibs::ffmath::riemann_zeta (float s)
 Computes the Riemann zeta function of s.
 
float qlibs::ffmath::sph_bessel (size_t n, float x)
 Computes the spherical Bessel function of the first kind n, and x.
 
float qlibs::ffmath::sph_neumann (size_t n, float x)
 Computes the spherical Bessel function of the second kind also known as the spherical Neumann function of n and x.
 
float qlibs::ffmath::cyl_bessel_i (float nu, float x)
 Computes the regular modified cylindrical Bessel function of nu and x.
 
float qlibs::ffmath::cyl_bessel_j (float nu, float x)
 Computes the cylindrical Bessel function of the first kind of nu and x.
 
float qlibs::ffmath::cyl_bessel_k (float nu, float x)
 Computes the irregular modified cylindrical Bessel function (also known as modified Bessel function of the second kind) of nu and x.
 
float qlibs::ffmath::cyl_neumann (float nu, float x)
 Computes the cylindrical Neumann function ( also known as Bessel function of the second kind or Weber function) of nu and x.
 
float qlibs::ffmath::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
 

Variables

constexpr float qlibs::ffmath::FFP_E
 The base of natural logarithms ( e ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LOG2E
 The base 2 logarithm of e ( log_2 e ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LOG10E
 The base 10 logarithm of e ( log_10 e ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LN2
 The natural logarithm of 2 ( ln 2 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LN10
 The natural logarithm of 10 ( ln 10 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_PI
 The circumference of a circle with diameter 1, ( π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_2PI
 Twice circumference of a circle with diameter 1, ( 2π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_PI_2
 Half of π ( π/2 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_PI_4
 A quarter of π ( π/4 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_1_PI
 The inverse of π ( 1/π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_2_PI
 Twice the inverse of π ( 2/π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_1_SQRTPI
 The inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_2_SQRTPI
 Twice the inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_SQRT2
 The square root of 2 ( √2 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_SQRT3
 The square root of 3 ( √3 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_SQRT1_2
 The inverse of square root of 2 ( 1/√2 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_SQRT1_3
 The inverse of square root of 3 ( 1/√3 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LN_SQRT_2PI
 The natural logarithm of the square root of 2π given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_GAMMA_E
 Constant Euler-Mascheroni given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_PHI
 The golden ratio, (1+√5)/2 given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_RADIAN
 Radian, value of ( 180/π ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LOG10_2
 The base 10 logarithm of 2 ( log_10 2 ) given as a single-precision floating-point number.
 
constexpr float qlibs::ffmath::FFP_LN_PI
 The natural logarithm of π ( ln(π) ) given as a single-precision floating-point number.
 

Detailed Description

Fast floating-point math library for applications where speed is more important than accuracy.

Enumeration Type Documentation

◆ classification

enum class qlibs::ffmath::classification
strong

Enum with the possible categorizations of a 32-bit floating-point number.

Enumerator
FFP_ZERO 

Indicates that the value is positive or negative zero

FFP_SUBNORMAL 

Indicates that the value is subnormal

FFP_NORMAL 

Indicates that the value is normal, i.e. not an infinity, subnormal, not-a-number or zero

FFP_INFINITE 

Indicates that the value is not representable by the underlying type, positive or negative infinity

FFP_NAN 

Indicates that the value is not-a-number nan (NaN)

Function Documentation

◆ absf()

float qlibs::ffmath::absf ( float x)

Computes the absolute value of a floating point value x.

Parameters
[in]xThe floating point value
Returns
The absolute value of x

◆ acos()

float qlibs::ffmath::acos ( float x)

Computes the principal value of the arc cosine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the arc cosine of x arccos(x) in the range [0 ; pi]. is returned.If the domain validation fails, a nan value is returned.

◆ acosh()

float qlibs::ffmath::acosh ( float x)

Computes the inverse hyperbolic cosine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the inverse hyperbolic cosine of x cosh^-1(x) is returned.

◆ asin()

float qlibs::ffmath::asin ( float x)

Computes the principal value of the arc sine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the arc sine of x arcsin(x) in the range [-pi/2 ; pi/2]. is returned.If the domain validation fails, a nan value is returned.

◆ asinh()

float qlibs::ffmath::asinh ( float x)

Computes the inverse hyperbolic sine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the inverse hyperbolic sine of x sinh^-1(x) is returned.

◆ assoc_laguerre()

float qlibs::ffmath::assoc_laguerre ( size_t n,
size_t m,
float x )

Computes the associated Laguerre polynomials of the degree n, order m, and argument x.

Parameters
[in]nThe degree of the polynomial, an unsigned integer value
[in]mThe order of the polynomial, an unsigned integer value
[in]xThe argument, a floating-point or integer value
Returns
Upon successful completion, the value of the associated Laguerre polynomial of x shall be returned. If the argument is nan, a nan is returned. If x is negative, nan is returned. If n or m is greater or equal to 128, the behavior is implementation-defined.

◆ assoc_legendre()

float qlibs::ffmath::assoc_legendre ( size_t n,
size_t m,
float x )

Computes the associated Legendre polynomials of the degree n, order m, and argument x.

Parameters
[in]nThe degree of the polynomial, an unsigned integer value
[in]mThe order of the polynomial, an unsigned integer value
[in]xThe argument, a floating-point or integer value
Returns
Upon successful completion, the value of the associated Legendre polynomial of x shall be returned. If the argument is nan, a nan is returned. If |x| > 1, nan is returned due the domain error. If n is greater or equal to 128, the behavior is implementation-defined.

◆ atan()

float qlibs::ffmath::atan ( float x)

Computes the principal value of the arc tangent of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the arc sine of x arctan(x) in the range [-pi/2 ; pi/2]. is returned.If the domain validation fails, a nan value is returned.

◆ atan2()

float qlibs::ffmath::atan2 ( float y,
float x )

Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant.

Parameters
[in]yThe floating point value
[in]xThe floating point value
Returns
Upon successful completion, the arc tangent of y/x arctan(y/x) in the range [-pi ; +pi] radians, is returned. If the domain validation fails, a nan value is returned.

◆ atanh()

float qlibs::ffmath::atanh ( float x)

Computes the inverse hyperbolic tangent of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the inverse hyperbolic tangent of x tanh^-1(x) is returned. If the domain validation fails, a nan value is returned. If the pole validation fails, ±inf is returned.

◆ beta()

float qlibs::ffmath::beta ( float x,
float y )

Computes the Beta function of x and y.

Parameters
[in]xThe argument, a floating-point or integer value
[in]yThe argument, a floating-point or integer value
Returns
Upon successful completion, the value of the Beta function of x and y. If the argument is nan, nan is returned. The function is only required to be defined where both x and y are greater than zero, and is allowed to return nan otherwise.

◆ cbrt()

float qlibs::ffmath::cbrt ( float x)

Computes the cubic-root of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, cubic root of x, is returned. If the domain validation fails, nan is returned

◆ ceil()

float qlibs::ffmath::ceil ( float x)

Computes the smallest integer value not less than x.

Parameters
[in]xThe floating point value
Returns
The smallest integer value not less than x

◆ classify()

ffmath::classification qlibs::ffmath::classify ( const float f)

Categorizes the floating-point number x. This function determines whether its argument is a normal floating-point number, or one of several special categories of values, including NaN (not a number), infinity, subnormal floating-point values or zero. To determine what category the argument belongs to, compare the return value with the any of the following number classification macros:

◆ comp_ellint_1()

float qlibs::ffmath::comp_ellint_1 ( float k)

Computes the complete elliptic integral of the first kind of k.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
Returns
Upon successful completion, the value of the complete elliptic integral of the first kind of k. If the argument is nan, nan is returned. If |k| > 1, NaN is returned due the domain error

◆ comp_ellint_2()

float qlibs::ffmath::comp_ellint_2 ( float k)

Computes the complete elliptic integral of the second kind of k.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
Returns
Upon successful completion, the value of the complete elliptic integral of the second kind of k. If the argument is nan, nan is returned. If |k| > 1, nan is returned due the domain error

◆ comp_ellint_3()

float qlibs::ffmath::comp_ellint_3 ( float k,
float nu )

Computes the complete elliptic integral of the third kind of k and nu.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
[in]nuElliptic characteristic as a floating-point value
Returns
Upon successful completion, the value of the complete elliptic integral of the third kind of k and nu. If the argument is nan, nan is returned. If |k| > 1, nan is returned due the domain error

◆ copysign()

float qlibs::ffmath::copysign ( float mag,
float sgn )

Composes a floating point value with the magnitude of mag and the sign of sgn.

Parameters
[in]magfloating-point value.
[in]sgnfloating-point value
Returns
The floating point value with the magnitude of mag and the sign of sgn is returned. If mag is nan, then nan with the sign of sgn is returned. if sgn is -0, the result is only negative if the implementation supports the signed zero consistently in arithmetic operations.

◆ cos()

float qlibs::ffmath::cos ( float x)

Computes the cosine of x (measured in radians).

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the cosine of x cos(x) in the range [-1 ; +1], is returned. If the domain validation fails, a nan value is returned.

◆ cosh()

float qlibs::ffmath::cosh ( float x)

Computes hyperbolic cosine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the hyperbolic cosine of x cosh(x) is returned. If the range validation fails, a inf value is returned.

◆ cyl_bessel_i()

float qlibs::ffmath::cyl_bessel_i ( float nu,
float x )

Computes the regular modified cylindrical Bessel function of nu and x.

Parameters
[in]nuThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the regular modified cylindrical Bessel function of nu and x. If the argument is nan, a nan is returned. If nu is greater or equal than 128, the behavior is implementation-defined.

◆ cyl_bessel_j()

float qlibs::ffmath::cyl_bessel_j ( float nu,
float x )

Computes the cylindrical Bessel function of the first kind of nu and x.

Parameters
[in]nuThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the irregular modified cylindrical Bessel function (also known as modified Bessel function of the second kind) of nu and x. If the argument is nan, a nan is returned. If nu is greater or equal than 128, the behavior is implementation-defined.

◆ cyl_bessel_k()

float qlibs::ffmath::cyl_bessel_k ( float nu,
float x )

Computes the irregular modified cylindrical Bessel function (also known as modified Bessel function of the second kind) of nu and x.

Parameters
[in]nuThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the irregular modified cylindrical Bessel function (also known as modified Bessel function of the second kind) of nu and x. If the argument is nan, a nan is returned. If nu is greater or equal than 128, the behavior is implementation-defined.

◆ cyl_neumann()

float qlibs::ffmath::cyl_neumann ( float nu,
float x )

Computes the cylindrical Neumann function ( also known as Bessel function of the second kind or Weber function) of nu and x.

Parameters
[in]nuThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the cylindrical Neumann function ( Bessel function of the second kind) of nu and x. If the argument is nan, a nan is returned. If nu is greater or equal than 128, the behavior is implementation-defined.

◆ ellint_1()

float qlibs::ffmath::ellint_1 ( float k,
float phi )

Computes the incomplete elliptic integral of the first kind of k and phi.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
[in]phiJacobi amplitude as a floating-point value given in radians
Returns
Upon successful completion, the value of the incomplete elliptic integral of the first kind of k and phi. If the argument is nan, nan is returned. If |k| > 1, nan is returned due the domain error

◆ ellint_2()

float qlibs::ffmath::ellint_2 ( float k,
float phi )

Computes the incomplete elliptic integral of the second kind of k and phi.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
[in]phiJacobi amplitude as a floating-point value given in radians
Returns
Upon successful completion, the value of the incomplete elliptic integral of the second kind of k and phi. If the argument is nan, nan is returned. If |k| > 1, nan is returned due the domain error

◆ ellint_3()

float qlibs::ffmath::ellint_3 ( float k,
float nu,
float phi )

Computes the incomplete elliptic integral of the third kind of k, nu and phi.

Parameters
[in]kElliptic modulus or eccentricity as a floating-point value
[in]nuElliptic characteristic as a floating-point value
[in]phiJacobi amplitude as a floating-point value given in radians
Returns
Upon successful completion, the value of the incomplete elliptic integral of the third kind of k, nu and phi. If the argument is nan, nan is returned. If |k| > 1, nan is returned due the domain error

◆ erf()

float qlibs::ffmath::erf ( float x)

Computes the error function of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the value of the error function is returned.

◆ erfc()

float qlibs::ffmath::erfc ( float x)

Computes the complementary error function of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the value of the complementary error function is returned.

◆ exp()

float qlibs::ffmath::exp ( float x)

Computes the e ( Euler's number, 2.7182818 ) raised to the given power x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the base-e exponential of x e^(x) is returned. If the range validation fails due to overflow, +inf is returned.

◆ exp10()

float qlibs::ffmath::exp10 ( float x)

Computes the value of 10 raised to the power of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the base-e exponential of x 10^(x) is returned. If the range validation fails due to overflow, ±inf or nan is returned.

◆ exp2()

float qlibs::ffmath::exp2 ( float x)

Computes 2 raised to the given power x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the base-2 exponential of x 2^x is returned. If the range validation fails due to overflow, inf is returned.

◆ expint()

float qlibs::ffmath::expint ( float num)

Computes the Exponential integral of num.

Parameters
[in]numA floating-point value
Returns
Upon successful completion, the value of the exponential integral of num. If the argument is nan, nan is returned. If the argument is ±0, -inf is returned.

◆ expm1()

float qlibs::ffmath::expm1 ( float x)

Returns e raised to the given power minus one e^x-1 power x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the base-e exponential of x minus one e^(x)-1 is returned. If the range validation fails due to overflow, +inf is returned.

◆ factorial()

float qlibs::ffmath::factorial ( float x)

Return the factorial of the integer part of x.

Note
The argument x needs to be positive
Warning
For x values greater than 14, result is imprecise because of the limited precision of the 32-bit floating point data-type. With x values greater than 35, this function overflows.
Parameters
[in]xThe floating point value
Returns
Upon successful completion, this function shall return the factorial of the integer part of x. If x is non-positive, factorial() shall return nan. If the correct value would cause overflow, factorial() shall return +inf.

◆ floor()

float qlibs::ffmath::floor ( float x)

Computes the largest integer value not greater than x.

Parameters
[in]xThe floating point value
Returns
The largest integer value not greater than x

◆ frac()

float qlibs::ffmath::frac ( float x)

Obtain the fractional part of x.

Parameters
[in]xThe floating point value
Returns
The fractional part of x

◆ getInf()

float qlibs::ffmath::getInf ( void )

Returns positive infinity inf as a 32-bit floating point number.

Returns
The +inf value

◆ getNan()

float qlibs::ffmath::getNan ( void )

Returns Not a Number ( NaN ) nan as a 32-bit floating point number.

Returns
The nan value

◆ hermite()

float qlibs::ffmath::hermite ( size_t n,
float x )

Computes the (physicist's) Hermite polynomials of the degree n and argument x.

Parameters
[in]nThe degree of the polynomial
[in]xThe argument, a floating-point value
Returns
Upon successful completion, the value of order-n Hermite polynomial of x. If the argument is nan, nan is returned. If n>=128, the behavior is implementation-defined.

◆ hypot()

float qlibs::ffmath::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 intermediate stages of the computation.

Parameters
[in]xThe floating point value
[in]yThe floating point value
Returns
The hypotenuse of a right-angled triangle, sqrt(x^2 + y^2), is returned. If the range validation fails due to overflow, +inf is returned. If the range validation fails due to underflow, the correct result (after rounding) is returned.

◆ inCircle()

bool qlibs::ffmath::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.

Parameters
[in]xPoint x-coordinate
[in]yPoint y-coordinate
[in]cxX-location of the circle
[in]cyY-location of the circle
[in]rRadio of the circle
Returns
true when the given point is inside the circle

◆ inPolygon()

bool qlibs::ffmath::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.

Parameters
[in]xPoint x-coordinate
[in]yPoint y-coordinate
[in]pxx-coordinate points of the polygon
[in]pyy-coordinate points of the polygon
[in]pNumber of points that represent the polygon
Returns
true when the given point is inside the polygon

◆ inRangeCoerce()

bool qlibs::ffmath::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 limit inputs and coerces the value to fall within the range.

Parameters
[in,out]xInput
[in]lowerLLower limit.
[in]upperLUpper limit.
Returns
true when the value falls within the specified range, otherwise false

◆ isEqual()

bool qlibs::ffmath::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.

Parameters
[in]aInput to be compared.
[in]bInput to be compared.
[in]tolTolerance
Returns
true when both values are approximately equal.

◆ isFinite()

bool qlibs::ffmath::isFinite ( const float x)
inline

Determines if the given floating point number x has finite value i.e. it is normal, subnormal or zero, but not infinite or NaN.

Parameters
[in]xThe number you want to test.
Returns
true if x has a finite value, false otherwise

◆ isInf()

bool qlibs::ffmath::isInf ( const float x)
inline

Determine if x is Infinity.

Parameters
[in]xThe number you want to test.
Returns
true if the value of x is ±Infinity, otherwise returns false.

◆ isNan()

bool qlibs::ffmath::isNan ( const float x)
inline

Determine if x is Not-A-Number NaN.

Parameters
[in]xThe number you want to test.
Returns
true if the value of x is NaN, otherwise returns false.

◆ isNormal()

bool qlibs::ffmath::isNormal ( const float x)
inline

Determines if the given floating point number x is normal, i.e. is neither zero, subnormal, infinite, or NaN.

Parameters
[in]xThe number you want to test.
Returns
true if x has a normal value, false otherwise

◆ laguerre()

float qlibs::ffmath::laguerre ( size_t n,
float x )

Computes the non-associated Laguerre polynomials of the degree n, and argument x.

Parameters
[in]nThe degree of the polynomial, an unsigned integer value
[in]xThe argument, a floating-point or integer value
Returns
Upon successful completion, the value of the non-associated Laguerre polynomial of x shall be returned. If the argument is nan, a nan is returned. If x is negative, nan is returned. If n is greater or equal than 128, the behavior is implementation-defined.

◆ ldexp()

float qlibs::ffmath::ldexp ( float x,
int32_t pw2 )

Multiplies a floating point value x by the number 2 raised to the pw2 power.

Parameters
[in]xThe floating point value
[in]pw2Integer value
Returns
x multiplied by 2 to the power of pw2 x×2^pwd is returned. If the range validation fails due to overflow, ±inf is returned. If the range validation fails due to underflow, the correct result (after rounding) is returned.

◆ legendre()

float qlibs::ffmath::legendre ( size_t n,
float x )

Computes the unassociated Legendre polynomials of the degree n, and argument x.

Parameters
[in]nThe degree of the polynomial, an unsigned integer value
[in]xThe argument, a floating-point or integer value
Returns
Upon successful completion, the value of the unassociated Legendre polynomial of x shall be returned. If the argument is nan, a nan is returned. The function is not required to be defined for |x| > 1 . If n is greater or equal than 128, the behavior is implementation-defined.

◆ lerp()

float qlibs::ffmath::lerp ( float a,
float b,
float t )

Computes the linear interpolation between a and b, if the parameter t is inside [0, 1] (the linear extrapolation otherwise), i.e. the result of a+t*(b-a) with accounting for floating-point calculation imprecision.

Parameters
aA floating point value
bA floating point value
tA floating point value
Returns
Return a+t*(b-a) . When both a and b are finite, the following properties are guaranteed: If t==0, the result is equal to a. If t==1, the result is equal to b. If t>=0 and t<=1, the result is finite. If t is finite and a==b, the result is equal to a. If t is finite or (a-b)!=0 with t infinity, the result is not nan. Let CMP(x,y) be 1 if x>y, -1 if x<y, and 0 otherwise. For any t1 and t2, the product of: CMP(lerp(a,b,t2), lerp(a,b,t1), CMP(t2,t1) , and CMP(b,a) is non-negative. (That is, lerp() is monotonic.).

◆ lgamma()

float qlibs::ffmath::lgamma ( float x)

Computes the natural logarithm of the absolute value of the gamma function of x.

Note
The argument x need not be a non-positive integer ( is defined over the reals, except the non-positive integers).
Parameters
[in]xThe floating point value
Returns
Upon successful completion, this function shall return the logarithmic gamma of x. If x is a non-positive integer, lgamma() shall return +inf. If the correct value would cause overflow, lgamma() shall return ±inf having the same sign as the correct value. If x is nan, a nan shall be returned. If x is 1 or 2, +0 shall be returned. If x is ±inf, +inf shall be returned.

◆ log()

float qlibs::ffmath::log ( float x)

Computes the natural (base e) logarithm of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the natural (base-e) logarithm of x ln(x) is returned. If the domain validation fails, a nan value is returned. If the pole validation fails, -inf is returned.

◆ log10()

float qlibs::ffmath::log10 ( float x)

Computes the common (base-10) logarithm of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the common (base-10) logarithm of x log_10(x) is returned. If the domain validation fails, a nan value is returned. If the pole validation fails, -inf is returned.

◆ log1p()

float qlibs::ffmath::log1p ( float x)

Computes the natural (base e) logarithm of 1 plus the given number x ln(1+x) .

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the natural (base-e) logarithm of 1 plus the given number x ln(1+x) is returned. If the domain validation fails, a nan value is returned. If the pole validation fails, -inf is returned.

◆ log2()

float qlibs::ffmath::log2 ( float x)

Computes the base 2 logarithm of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the base-2 logarithm of x log_2(x) is returned. If the domain validation fails, a nan value is returned. If the pole validation fails, -inf is returned.

◆ map()

float qlibs::ffmath::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 and yMax.

Parameters
[in]xInput
[in]xMinInput minimum value for range
[in]xMaxInput maximum value for range
[in]yMinOutput minimum value for range
[in]yMaxOutput maximum value for range
Returns
The scaled value in range yMin and yMax.

◆ Max()

template<typename T , typename... Args>
T qlibs::ffmath::Max ( const T & first,
const Args &... args )

Finds the maximum value among the provided arguments.

Template Parameters
TThe type of the arguments. Must support comparison using `>`.
ArgsA parameter pack representing additional arguments of type `T`.
Parameters
firstThe first argument in the list.
argsAdditional arguments to compare.
Returns
The maximum value among the provided arguments.
Note
If only one argument is provided, that value is returned directly.

◆ midpoint()

float qlibs::ffmath::midpoint ( float a,
float b )

Computes the midpoint of the floating-points a and b.

Parameters
aA floating point value
bA floating point value
Returns
Half the sum of a and b. No overflow occurs. A at most one inexact operation occurs.

◆ Min()

template<typename T , typename... Args>
T qlibs::ffmath::Min ( const T & first,
const Args &... args )

Finds the minimum value among the provided arguments.

Template Parameters
TThe type of the arguments. Must support comparison using `<`.
ArgsA parameter pack representing additional arguments of type `T`.
Parameters
firstThe first argument in the list.
argsAdditional arguments to compare.
Returns
The minimum value among the provided arguments.
Note
If only one argument is provided, that value is returned directly.

◆ mod()

float qlibs::ffmath::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 divisor. This function is often called the modulo operation, which can be expressed as b=a-m*floor(a/m) . This function follows the convention that mod(x,0) returns x.

Note
The concept of remainder after division is not uniquely defined, and the two functions ffmath::mod() and ffmath::rem() each compute a different variation. The ffmath::mod() function produces a result that is either zero or has the same sign as the divisor. The ffmath::rem() function produces a result that is either zero or has the same sign as the dividend. Another difference is the convention when the divisor is zero. The ffmath::mod() function follows the convention that mod(x,0) returns x, whereas the rem function follows the convention that rem(x,0) returns nan.
Parameters
[in]xThe floating point value
[in]yThe floating point value
Returns
If successful, returns the IEEE floating-point remainder of the division x/y. If the domain validation fails, a nan value is returned.

◆ nextAfter()

float qlibs::ffmath::nextAfter ( float x,
float y )

Returns the next representable value of x in the direction of y. If x equals to y, y is returned.

Parameters
[in]xThe floating point value
[in]yThe floating point value
Returns
The next representable value of x in the direction of y is returned. If x equals y, then y is returned. If the range validation fails due to overflow, ±inf is returned (with the same sign as x). If the range validation fails due to underflow, the correct result is returned.

◆ normalize()

float qlibs::ffmath::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.

Parameters
[in]xInput
[in]xMinInput minimum value for range
[in]xMaxInput maximum value for range
Returns
The scaled value in range [0 - 1].

◆ pow()

float qlibs::ffmath::pow ( float b,
float e )

Computes the value of b raised to the power e.

Parameters
[in]bBase as floating point value
[in]eExponent as floating point value
Returns
Upon successful completion, b raised to the power of e b^e is returned. If the domain validation fails, a nan value is returned. If the pole or range validation fails due to overflow, ±inf is returned.

◆ rCbrt()

float qlibs::ffmath::rCbrt ( float x)

Computes the reciprocal cubic-root of x denoted as 1/cbrt(x)

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the reciprocal cubic root of x, is returned. If the domain validation fails nan is returned

◆ recip()

float qlibs::ffmath::recip ( float x)

Computes the multiplicative inverse or reciprocal for the value x, denoted by 1/x or x^(−1)

Parameters
[in]xThe floating point value
Returns
The reciprocal value of x

◆ rem()

float qlibs::ffmath::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 divisor. This function is often called the remainder operation, which can be expressed as r=a-(b*trunc(a/b)) . This function follows the convention that rem(x,0) is nan.

Note
The concept of remainder after division is not uniquely defined, and the two functions ffmath::mod() and ffmath::rem() each compute a different variation. The ffmath::mod() function produces a result that is either zero or has the same sign as the divisor. The ffmath::rem() function produces a result that is either zero or has the same sign as the dividend. Another difference is the convention when the divisor is zero. The ffmath::mod() function follows the convention that mod(x,0) returns x, whereas the rem function follows the convention that rem(x,0) returns nan.
Parameters
[in]xThe floating point value
[in]yThe floating point value
Returns
If successful, returns the IEEE floating-point remainder of the division x/y. If the domain validation fails, a nan value is returned.

◆ rexp()

float qlibs::ffmath::rexp ( float x,
int32_t * pw2 )

Decomposes given floating point value x into a normalized fraction and an integral power of two.

Parameters
[in]xThe floating point value
[in]pw2Pointer to integer value to store the exponent to
Returns
If x is zero, returns zero and stores zero in pw2. Otherwise (if x is not zero), returns the value y in the range (-1;-0.5], [0.5; 1) and stores an integer value in pw2 such that y×2^(pw2) = x . If the value to be stored in pw2 is outside the range of an int, the behavior is unspecified. If x is not a floating-point number, the behavior is unspecified.

◆ riemann_zeta()

float qlibs::ffmath::riemann_zeta ( float s)

Computes the Riemann zeta function of s.

Parameters
[in]sA floating-point value
Returns
Upon successful completion, the value of the Riemann zeta function of s. If the argument is nan, nan is returned.

◆ rounding()

float qlibs::ffmath::rounding ( float x)

Computes the nearest integer value to x (in floating-point format), rounding halfway cases away from zero.

Parameters
[in]xThe floating point value
Returns
The nearest integer value to x, rounding halfway cases away from zero

◆ rSqrt()

float qlibs::ffmath::rSqrt ( float x)

Computes the reciprocal square-root of x denoted as 1/sqrt(x)

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the reciprocal square root of x, is returned. If the domain validation fails nan is returned

◆ sign()

float qlibs::ffmath::sign ( float x)

Computes the sign function ( signum function).

Parameters
[in]xThe floating point value
Returns
The sign function of x

◆ sin()

float qlibs::ffmath::sin ( float x)

Computes the sine of x (measured in radians).

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the sine of x sin(x) in the range [-1 ; +1], is returned. If the domain validation fails, a nan value is returned.

◆ sinh()

float qlibs::ffmath::sinh ( float x)

Computes hyperbolic sine of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the hyperbolic sine of x sinh(x) is returned. If the range validation fails, a ±inf is value is returned.

◆ sph_bessel()

float qlibs::ffmath::sph_bessel ( size_t n,
float x )

Computes the spherical Bessel function of the first kind n, and x.

Parameters
[in]nThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the spherical Bessel function of the first kind of n and x. If the argument is nan, a nan is returned. If n is greater or equal than 128, the behavior is implementation-defined.

◆ sph_legendre()

float qlibs::ffmath::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

Parameters
[in]lThe degree
[in]mThe order
[in]thetaPolar angle, measured in radians
Returns
Upon successful completion, the value of the spherical associated Legendre function (that is, spherical harmonic with sigma = 0) of l, m, and theta. If the argument theta is nan, a nan is returned. If l is greater or equal than 128, the behavior is implementation-defined.

◆ sph_neumann()

float qlibs::ffmath::sph_neumann ( size_t n,
float x )

Computes the spherical Bessel function of the second kind also known as the spherical Neumann function of n and x.

Parameters
[in]nThe order of the function
[in]xThe argument to the function, a floating-point or integer value
Returns
Upon successful completion, the value of the spherical Bessel function of the second kind (spherical Neumann function) of n and x. If the argument is nan, a nan is returned. If n is greater or equal than 128, the behavior is implementation-defined.

◆ sqrt()

float qlibs::ffmath::sqrt ( float x)

Computes the square-root of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, square root of x, is returned. If the domain validation fails, nan is returned

◆ tan()

float qlibs::ffmath::tan ( float x)

Computes the tangent of x (measured in radians).

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the tangent of x tan(x) is returned. If the domain validation fails, a nan value is returned.

◆ tanh()

float qlibs::ffmath::tanh ( float x)

Computes hyperbolic tangent of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, the hyperbolic tangent of x tanh(x) is returned.

◆ tgamma()

float qlibs::ffmath::tgamma ( float x)

Computes the gamma function of x.

Parameters
[in]xThe floating point value
Returns
Upon successful completion, this function shall return Gamma(x). If x is a negative integer, a inf value shall be returned. If the correct value would cause overflow, tgamma() shall return ±Inf, with the same sign as the correct value of the function. If x is nan, a nan shall be returned. If x is +inf, x shall be returned. If x is ±0, tgamma() shall return ±Inf. If x is -inf, a nan value shall be returned. For IEEE Std 754-1985 float, overflow happens when 0 < x < 1/FLT_MAX, and 171.7 < x.

◆ trunc()

float qlibs::ffmath::trunc ( float x)

Computes the nearest integer not greater in magnitude than x.

Parameters
[in]xThe floating point value
Returns
The nearest integer value not greater in magnitude than x (in other words, x rounded towards zero)

◆ wrapTo180()

float qlibs::ffmath::wrapTo180 ( float x)

Wraps angle x, in degrees, to the interval [–180, 180] such that 180 maps to 180 and –180 maps to –180. In general, odd, positive multiples of 180 map to 180 and odd, negative multiples of 180 map to –180.

Parameters
xThe angle in degrees
Returns
The angle x wrapped to the [-180, 180] interval

◆ wrapTo2Pi()

float qlibs::ffmath::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 2*pi. In general, positive multiples of 2*pi map to 2*pi and negative multiples of 2*pi map to 0.

Parameters
xThe angle in radians
Returns
The angle x wrapped to the [0, 2*pi] interval

◆ wrapTo360()

float qlibs::ffmath::wrapTo360 ( float x)

Wraps angle x, in degrees, to the interval [0, 360] such that 0 maps to 0 and 360 maps to 360. In general, positive multiples of 360 map to 360 and negative multiples of 360 map to zero.

Parameters
xThe angle in degrees
Returns
The angle x wrapped to the [0, 360] interval

◆ wrapToPi()

float qlibs::ffmath::wrapToPi ( float x)

Wraps angle x, in radians, to the interval [−pi, pi] such that pi maps to pi and −pi maps to −pi. In general, odd, positive multiples of pi map to pi and odd, negative multiples of pi map to −pi.

Parameters
xThe angle in radians
Returns
The angle x wrapped to the [-pi, pi] interval

Variable Documentation

◆ FFP_1_PI

float qlibs::ffmath::FFP_1_PI
constexpr

The inverse of π ( 1/π ) given as a single-precision floating-point number.

◆ FFP_1_SQRTPI

float qlibs::ffmath::FFP_1_SQRTPI
constexpr

The inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.

◆ FFP_2_PI

float qlibs::ffmath::FFP_2_PI
constexpr

Twice the inverse of π ( 2/π ) given as a single-precision floating-point number.

◆ FFP_2_SQRTPI

float qlibs::ffmath::FFP_2_SQRTPI
constexpr

Twice the inverse of the square root of π ( 1/√π ) given as a single-precision floating-point number.

◆ FFP_2PI

float qlibs::ffmath::FFP_2PI
constexpr

Twice circumference of a circle with diameter 1, ( 2π ) given as a single-precision floating-point number.

◆ FFP_E

float qlibs::ffmath::FFP_E
constexpr

The base of natural logarithms ( e ) given as a single-precision floating-point number.

◆ FFP_GAMMA_E

float qlibs::ffmath::FFP_GAMMA_E
constexpr

Constant Euler-Mascheroni given as a single-precision floating-point number.

◆ FFP_LN10

float qlibs::ffmath::FFP_LN10
constexpr

The natural logarithm of 10 ( ln 10 ) given as a single-precision floating-point number.

◆ FFP_LN2

float qlibs::ffmath::FFP_LN2
constexpr

The natural logarithm of 2 ( ln 2 ) given as a single-precision floating-point number.

◆ FFP_LN_PI

float qlibs::ffmath::FFP_LN_PI
constexpr

The natural logarithm of π ( ln(π) ) given as a single-precision floating-point number.

◆ FFP_LN_SQRT_2PI

float qlibs::ffmath::FFP_LN_SQRT_2PI
constexpr

The natural logarithm of the square root of 2π given as a single-precision floating-point number.

◆ FFP_LOG10_2

float qlibs::ffmath::FFP_LOG10_2
constexpr

The base 10 logarithm of 2 ( log_10 2 ) given as a single-precision floating-point number.

◆ FFP_LOG10E

float qlibs::ffmath::FFP_LOG10E
constexpr

The base 10 logarithm of e ( log_10 e ) given as a single-precision floating-point number.

◆ FFP_LOG2E

float qlibs::ffmath::FFP_LOG2E
constexpr

The base 2 logarithm of e ( log_2 e ) given as a single-precision floating-point number.

◆ FFP_PHI

float qlibs::ffmath::FFP_PHI
constexpr

The golden ratio, (1+√5)/2 given as a single-precision floating-point number.

◆ FFP_PI

float qlibs::ffmath::FFP_PI
constexpr

The circumference of a circle with diameter 1, ( π ) given as a single-precision floating-point number.

◆ FFP_PI_2

float qlibs::ffmath::FFP_PI_2
constexpr

Half of π ( π/2 ) given as a single-precision floating-point number.

◆ FFP_PI_4

float qlibs::ffmath::FFP_PI_4
constexpr

A quarter of π ( π/4 ) given as a single-precision floating-point number.

◆ FFP_RADIAN

float qlibs::ffmath::FFP_RADIAN
constexpr

Radian, value of ( 180/π ) given as a single-precision floating-point number.

◆ FFP_SQRT1_2

float qlibs::ffmath::FFP_SQRT1_2
constexpr

The inverse of square root of 2 ( 1/√2 ) given as a single-precision floating-point number.

◆ FFP_SQRT1_3

float qlibs::ffmath::FFP_SQRT1_3
constexpr

The inverse of square root of 3 ( 1/√3 ) given as a single-precision floating-point number.

◆ FFP_SQRT2

float qlibs::ffmath::FFP_SQRT2
constexpr

The square root of 2 ( √2 ) given as a single-precision floating-point number.

◆ FFP_SQRT3

float qlibs::ffmath::FFP_SQRT3
constexpr

The square root of 3 ( √3 ) given as a single-precision floating-point number.