Dataflow Runtime API  3.1.1.0
Static Public Member Functions | List of all members
imt::base::core::math::Maths Class Reference

Mathematical utility functions. More...

#include <Imt.Base.Core.Math/Maths.h>

Static Public Member Functions

template<typename Type >
static bool areEqualNumbers (const Type left, const Type right)
 Compares two numbers. More...
 
template<typename Type >
static bool areEqualFloats (const Type left, const Type right)
 Compares two floating point numbers. More...
 
template<typename Type >
static bool areEqualArrayFloats (const Type *left, const Type *right, size_t size)
 Compares two floating point arrays. More...
 
template<typename Type >
static Type sqrt (const Type sqVal)
 Find square root of a value. More...
 
template<typename Type >
static Type nsqrt (const Type sqVal, Type n)
 Find n-th root of a value. More...
 
template<typename Type >
static Type nsqrt (const Type sqVal, int32_t n)
 
template<typename Type >
static Type exp (const Type value)
 Computes e (Euler's number, 2.7182818...) raised to the given power arg. More...
 
template<typename Type >
static Type ln (const Type arg)
 Computes the natural (base e) logarithm of arg. More...
 
template<typename Type >
static Type log10 (const Type arg)
 Computes the common (base-10) logarithm of n. More...
 
template<typename Type >
static Type pow (const Type base, const int32_t exp)
 Computes the value of base (m) raised to the power exponent (n) More...
 
static float64_t pow10 (const int32_t exp)
 Computes the value of 10 raised to the power exp. More...
 
template<typename Type >
static Type fabs (const Type value)
 Find absolute value of a given input. More...
 
template<typename Type >
static Type abs (const Type value)
 Find absolute value of a given input. More...
 
template<typename Type >
static Type sin (const Type value)
 Computes the sine of arg (measured in radians) More...
 
template<typename Type >
static Type cos (const Type value)
 Computes the cosine of arg (measured in radians) More...
 
template<typename Type >
static Type tan (const Type value)
 Computes the tangens of arg (measured in radians) More...
 
template<typename Type >
static Type arcos (const Type value)
 Computes the arccos of arg. More...
 
template<typename Type >
static Type arsin (const Type value)
 Computes the arsin of arg. More...
 
template<typename Type >
static Type artan (const Type value)
 Computes the arctan of arg. More...
 
template<typename Type >
static Type artan2 (const Type y, const Type x)
 Computes the arc tangent of y/x using the signs of arguments to determine the correct quadrant. More...
 
template<typename Type >
static Type cosh (const Type value)
 Computes the cosh of arg (measured in radians) More...
 
template<typename Type >
static Type sinh (const Type value)
 Computes the sinh of arg (measured in radians) More...
 
template<typename Type >
static Type tanh (const Type value)
 Computes the tanh of arg (measured in radians) More...
 
template<typename Type >
static Type arsinh (const Type value)
 Computes the arsinh of arg (measured in radians) More...
 
template<typename Type >
static Type arcosh (const Type value)
 Computes the acosh of arg (measured in radians) More...
 
template<typename Type >
static Type artanh (const Type value)
 Computes the inverse hyperbolic tangent of arg. More...
 
template<typename Type >
static Type copysign (const Type &x, const Type &y)
 Returns a value with the magnitude of x and the sign of y. More...
 
template<typename Type >
static Type erf (const Type &x)
 Compute error function. More...
 
template<typename Type >
static Type erfc (const Type &x)
 Compute complementary error function. More...
 
template<typename Type >
static Type expm1 (const Type &x)
 Compute exponential minus one. More...
 
template<typename Type >
static Type fdim (const Type &x, const Type &y)
 Positive difference. More...
 
template<typename Type >
static Type floor (const Type &x)
 Round down value. More...
 
template<typename Type >
static Type fmod (const Type &numer, const Type &denom)
 Compute remainder of division. More...
 
template<typename Type >
static Type frexp (const Type &x, int *exp)
 Get significand and exponent. More...
 
template<typename Type >
static Type hypot (const Type &x, const Type &y)
 Compute hypotenuse. More...
 
template<typename Type >
static int ilogb (const Type &x)
 Integer binary logarithm. More...
 
template<typename Type >
static bool isinf (const Type &x)
 Is infinity. More...
 
template<typename Type >
static bool isnan (const Type &x)
 Is Not-A-Number. More...
 
static double nan (const char *tagp)
 Generate quiet NaN. More...
 
static float nanf (const char *tagp)
 Generate quiet NaN. More...
 
template<typename Type >
static bool ldexp (const Type &x, int exp)
 Generate value from significand and exponent. More...
 
template<typename Type >
static Type log1p (const Type &x)
 Compute logarithm plus one. More...
 
template<typename Type >
static Type log2 (const Type &x)
 Compute binary logarithm. More...
 
template<typename Type >
static Type logb (const Type &x)
 Compute floating-point base logarithm. More...
 
template<typename Type >
static Type modf (const Type &x, Type *intpart)
 Break into fractional and integral parts. More...
 
template<typename Type >
static Type modf (const Type &x, const int8_t *tagp)
 Generate quiet NaN. More...
 
template<typename Type >
static Type nextafter (const Type &x, const Type &y)
 Next representable value. More...
 
template<typename Type >
static Type remainder (const Type &numer, const Type &denom)
 Compute remainder (IEC 60559) More...
 
template<typename Type >
static Type remquo (const Type &numer, const Type &denom, int *quot)
 Compute remainder and quotient. More...
 
template<typename Type >
static Type rint (const Type &x)
 Round to integral value. More...
 
template<typename Type >
static Type scalbln (const Type &x, long int n)
 Scale significand using floating-point base exponent (long) More...
 
template<typename Type >
static Type scalbn (const Type &x, int n)
 Scale significand using floating-point base exponent. More...
 
template<typename Type >
static Type trunc (const Type &x)
 Truncate value. More...
 

Detailed Description

Mathematical utility functions.

Pure static class.

Member Function Documentation

◆ abs()

template<typename Type >
static Type imt::base::core::math::Maths::abs ( const Type  value)
inlinestatic

Find absolute value of a given input.

Parameters
valueThe value to which absolute value has to be calculated.
Returns
Absolute of the input value.

◆ arcos()

template<typename Type >
static Type imt::base::core::math::Maths::arcos ( const Type  value)
inlinestatic

Computes the arccos of arg.

Parameters
valuethe value to compute
Returns
computes arccos(value) in the range 0 to +pi radians

◆ arcosh()

template<typename Type >
static Type imt::base::core::math::Maths::arcosh ( const Type  value)
inlinestatic

Computes the acosh of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes cosh^{-1}(value)

◆ areEqualArrayFloats()

template<typename Type >
static bool imt::base::core::math::Maths::areEqualArrayFloats ( const Type *  left,
const Type *  right,
size_t  size 
)
inlinestatic

Compares two floating point arrays.

Parameters
leftPointer to first array.
rightPointer to second array.
sizeNumber of elements of each array.
Returns
True if arrays are equal.

◆ areEqualFloats()

template<typename Type >
static bool imt::base::core::math::Maths::areEqualFloats ( const Type  left,
const Type  right 
)
inlinestatic

Compares two floating point numbers.

Parameters
leftFirst number.
rightSecond number.
Returns
True if numbers are equal.

◆ areEqualNumbers()

template<typename Type >
static bool imt::base::core::math::Maths::areEqualNumbers ( const Type  left,
const Type  right 
)
inlinestatic

Compares two numbers.

Parameters
leftFirst number.
rightSecond number.
Returns
True if numbers are equal.

◆ arsin()

template<typename Type >
static Type imt::base::core::math::Maths::arsin ( const Type  value)
inlinestatic

Computes the arsin of arg.

Parameters
valuethe value to compute
Returns
computes arsin(value) in the range -pi/2 to +pi/2 radians

◆ arsinh()

template<typename Type >
static Type imt::base::core::math::Maths::arsinh ( const Type  value)
inlinestatic

Computes the arsinh of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes sinh^{-1}(value)

◆ artan()

template<typename Type >
static Type imt::base::core::math::Maths::artan ( const Type  value)
inlinestatic

Computes the arctan of arg.

Parameters
valuethe value
Returns
computes arctan(value) in the range -pi/2 to +pi/2 radians

◆ artan2()

template<typename Type >
static Type imt::base::core::math::Maths::artan2 ( const Type  y,
const Type  x 
)
inlinestatic

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

Parameters
xvalue x
yvalue y
Returns
computes y/x (arctan(y/x) in the range -pi to +pi radians

◆ artanh()

template<typename Type >
static Type imt::base::core::math::Maths::artanh ( const Type  value)
inlinestatic

Computes the inverse hyperbolic tangent of arg.

Parameters
valuethe value
Returns
computes tanh^{-1}(value)

◆ copysign()

template<typename Type >
static Type imt::base::core::math::Maths::copysign ( const Type &  x,
const Type &  y 
)
inlinestatic

Returns a value with the magnitude of x and the sign of y.

Parameters
xValue with the magnitude of the resulting value.
yValue with the sign of the resulting value.
Returns
The value with a magnitude of x and the sign of y.

◆ cos()

template<typename Type >
static Type imt::base::core::math::Maths::cos ( const Type  value)
inlinestatic

Computes the cosine of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes cos(value)

◆ cosh()

template<typename Type >
static Type imt::base::core::math::Maths::cosh ( const Type  value)
inlinestatic

Computes the cosh of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes cosh(value)

◆ erf()

template<typename Type >
static Type imt::base::core::math::Maths::erf ( const Type &  x)
inlinestatic

Compute error function.

Parameters
xParameter for the error function.
Returns
Error function value for x.

◆ erfc()

template<typename Type >
static Type imt::base::core::math::Maths::erfc ( const Type &  x)
inlinestatic

Compute complementary error function.

Parameters
xParameter for the complementary error function.
Returns
Complementary error function value for x.

◆ exp()

template<typename Type >
static Type imt::base::core::math::Maths::exp ( const Type  value)
inlinestatic

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

Parameters
valuethe exponent n
Returns
computes power of e^n

◆ expm1()

template<typename Type >
static Type imt::base::core::math::Maths::expm1 ( const Type &  x)
inlinestatic

Compute exponential minus one.

Returns e raised to the power x minus one: ex-1. For small magnitude values of x, expm1 may be more accurate than exp(x)-1.

Parameters
xValue of the exponent.
Returns
e raised to the power of x, minus one. If the magnitude of the result is too large to be represented by a value of the return type, the function returns HUGE_VAL (or HUGE_VALF or HUGE_VALL) with the proper sign.

◆ fabs()

template<typename Type >
static Type imt::base::core::math::Maths::fabs ( const Type  value)
inlinestatic

Find absolute value of a given input.

Parameters
valueThe value to which absolute value has to be calculated.
Returns
Absolute of the input value.

◆ fdim()

template<typename Type >
static Type imt::base::core::math::Maths::fdim ( const Type &  x,
const Type &  y 
)
inlinestatic

Positive difference.

Returns the positive difference between x and y. The function returns x-y if x>y, and zero otherwise.

Parameters
xValues whose difference is calculated.
yValues whose difference is calculated.
Returns
The positive difference between x and y.

◆ floor()

template<typename Type >
static Type imt::base::core::math::Maths::floor ( const Type &  x)
inlinestatic

Round down value.

Rounds x downward, returning the largest integral value that is not greater than x.

Parameters
xValue to round down.
Returns
The positive difference between x and y.

◆ fmod()

template<typename Type >
static Type imt::base::core::math::Maths::fmod ( const Type &  numer,
const Type &  denom 
)
inlinestatic

Compute remainder of division.

Returns the floating-point remainder of numer/denom (rounded towards zero):

fmod = numer - tquot * denom

Parameters
numerValue of the quotient numerator.
denomValue of the quotient denominator.
Returns
The remainder of dividing the arguments. If denom is zero, the function may either return zero

◆ frexp()

template<typename Type >
static Type imt::base::core::math::Maths::frexp ( const Type &  x,
int *  exp 
)
inlinestatic

Get significand and exponent.

Breaks the floating point number x into its binary significand (a floating point with an absolute value between 0.5(included) and 1.0(excluded)) and an integral exponent for 2, such that:

x = significand * 2 exponent The exponent is stored in the location pointed by exp, and the significand is the value returned by the function.

If x is zero, both parts (significand and exponent) are zero. If x is negative, the significand returned by this function is negative.

Parameters
xValue to be decomposed.
expPointer to an int where the value of the exponent is stored.
Returns
The binary significand of x. This value is the floating point value whose absolute value lays in the interval [0.5,1) which, once multiplied by 2 raised to the power of exp, yields x.

◆ hypot()

template<typename Type >
static Type imt::base::core::math::Maths::hypot ( const Type &  x,
const Type &  y 
)
inlinestatic

Compute hypotenuse.

Returns the hypotenuse of a right-angled triangle whose legs are x and y.

The function returns what would be the square root of the sum of the squares of x and y (as per the Pythagorean theorem), but without incurring in undue overflow or underflow of intermediate values.

Parameters
xFloating point values corresponding to the legs of a right-angled triangle for which the hypotenuse is computed.
yFloating point values corresponding to the legs of a right-angled triangle for which the hypotenuse is computed.
Returns
The square root of (x2+y2). If the magnitude of the result is too large to be represented by a value of the return type, the function may return HUGE_VAL (or HUGE_VALF or HUGE_VALL) with the proper sign.

◆ ilogb()

template<typename Type >
static int imt::base::core::math::Maths::ilogb ( const Type &  x)
inlinestatic

Integer binary logarithm.

Returns the integral part of the logarithm of |x|, using FLT_RADIX as base for the logarithm.

This is the exponent used internally by the machine to express the floating-point value x, when it uses a significand between 1.0 and FLT_RADIX, so that, for a positive x:

x = significand * FLT_RADIX exponent

Generally, FLT_RADIX is 2, and the value returned by this function is one less than the exponent obtained with frexp (because of the different significand normalization as [1.0,2.0) instead of [0.5,1.0)).

Parameters
xValue whose ilogb is returned.
Returns
If x is normal, the base-FLT_RADIX logarithm of x. If x is subnormal, the value returned is the one corresponding to the normalized representation (negative exponent). If x is zero, it returns FP_LOGB0 (a special value, only returned by this function, defined in math.h). If x is infinite, it returns INT_MAX. If x is NaN, it returns FP_ILOGBNAN (a special value, only returned by this function, defined in math.h).

◆ isinf()

template<typename Type >
static bool imt::base::core::math::Maths::isinf ( const Type &  x)
inlinestatic

Is infinity.

Returns whether x is an infinity value (either positive infinity or negative infinity).

Parameters
xA floating-point value.
Returns
A non-zero value (true) if x is an infinity; and zero (false) otherwise.

◆ isnan()

template<typename Type >
static bool imt::base::core::math::Maths::isnan ( const Type &  x)
inlinestatic

Is Not-A-Number.

Returns whether x is a NaN (Not-A-Number) value.

The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.

Parameters
xA floating-point value.
Returns
A non-zero value (true) if x is a NaN value; and zero (false) otherwise.

◆ ldexp()

template<typename Type >
static bool imt::base::core::math::Maths::ldexp ( const Type &  x,
int  exp 
)
inlinestatic

Generate value from significand and exponent.

Returns the result of multiplying x (the significand) by 2 raised to the power of exp (the exponent).

lexpr(x,exp) = x * 2 exp

Parameters
xFloating point value representing the significand.
expValue of the exponent.
Returns
The function returns:

x * 2 exp

If the magnitude of the result is too large to be represented by a value of the return type, the function returns HUGE_VAL (or HUGE_VALF or HUGE_VALL) with the proper sign.

◆ ln()

template<typename Type >
static Type imt::base::core::math::Maths::ln ( const Type  arg)
inlinestatic

Computes the natural (base e) logarithm of arg.

Parameters
argthe value
Returns
computes ln(value)

◆ log10()

template<typename Type >
static Type imt::base::core::math::Maths::log10 ( const Type  arg)
inlinestatic

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

Parameters
argthe value n
Returns
computes log_10(n)

◆ log1p()

template<typename Type >
static Type imt::base::core::math::Maths::log1p ( const Type &  x)
inlinestatic

Compute logarithm plus one.

Returns the natural logarithm of one plus x.

For small magnitude values of x, logp1 may be more accurate than log(1+x).

Parameters
xValue whose logarithm is calculated.
Returns
The natural logarithm of (1+x).

◆ log2()

template<typename Type >
static Type imt::base::core::math::Maths::log2 ( const Type &  x)
inlinestatic

Compute binary logarithm.

Returns the binary (base-2) logarithm of x.

Parameters
xValue whose logarithm is calculated.
Returns
The binary logarithm of x: log2x.

◆ logb()

template<typename Type >
static Type imt::base::core::math::Maths::logb ( const Type &  x)
inlinestatic

Compute floating-point base logarithm.

Returns the logarithm of |x|, using FLT_RADIX as base for the logarithm.

On most platforms, FLT_RADIX is 2, and thus this function is equivalent to log2 for positive values.

Parameters
xValue whose logarithm is calculated.
Returns
The base-FLT_RADIX logarithm of x.

◆ modf() [1/2]

template<typename Type >
static Type imt::base::core::math::Maths::modf ( const Type &  x,
const int8_t tagp 
)
inlinestatic

Generate quiet NaN.

Returns a quiet NaN (Not-A-Number) value of type double.

The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.

The argument can be used by library implementations to distinguish different NaN values in a implementation-specific manner.

Similarly, nanf and nanl return NaN values of type float and long double, respectively.

Parameters
xFloating point value to break into parts.
tagpAn implementation-specific C-string. If this is an empty string (""), the function returns a generic NaN value (the same as returned by passing "NAN" to strtod).
Returns
A quiet NaN value.

◆ modf() [2/2]

template<typename Type >
static Type imt::base::core::math::Maths::modf ( const Type &  x,
Type *  intpart 
)
inlinestatic

Break into fractional and integral parts.

Breaks x into an integral and a fractional part.

The integer part is stored in the object pointed by intpart, and the fractional part is returned by the function. Both parts have the same sign as x.

Parameters
xFloating point value to break into parts.
intpartPointer to an object (of the same type as x) where the integral part is stored with the same sign as x.
Returns
The fractional part of x, with the same sign.

◆ nan()

static double imt::base::core::math::Maths::nan ( const char *  tagp)
inlinestatic

Generate quiet NaN.

Returns a quiet NaN (Not-A-Number) value of type double.

The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.

The argument can be used by library implementations to distinguish different NaN values in a implementation-specific manner.

Similarly, nanf and nanl return NaN values of type float and long double, respectively.

Parameters
tagpAn implementation-specific C-string. If this is an empty string (""), the function returns a generic NaN value (the same as returned by passing "NAN" to strtod).
Returns
A quiet NaN value.

◆ nanf()

static float imt::base::core::math::Maths::nanf ( const char *  tagp)
inlinestatic

Generate quiet NaN.

Returns a quiet NaN (Not-A-Number) value of type float.

The NaN values are used to identify undefined or non-representable values for floating-point elements, such as the square root of negative numbers or the result of 0/0.

The argument can be used by library implementations to distinguish different NaN values in a implementation-specific manner.

Similarly, nanf and nanl return NaN values of type float and long float, respectively.

Parameters
tagpAn implementation-specific C-string. If this is an empty string (""), the function returns a generic NaN value (the same as returned by passing "NAN" to strtod).
Returns
A quiet NaN value.

◆ nextafter()

template<typename Type >
static Type imt::base::core::math::Maths::nextafter ( const Type &  x,
const Type &  y 
)
inlinestatic

Next representable value.

Returns the next representable value after x in the direction of y.

The similar function, nexttoward has the same behavior, but it takes a long double as second argument.

If both parameters compare equal, the function returns y.

Parameters
xBase value
yValue toward which the return value is approximated.
Returns
A quiet NaN value.

◆ nsqrt() [1/2]

template<typename Type >
static Type imt::base::core::math::Maths::nsqrt ( const Type  sqVal,
int32_t  n 
)
inlinestatic

◆ nsqrt() [2/2]

template<typename Type >
template< typename Type > Type imt::base::core::math::Maths::nsqrt ( const Type  sqVal,
Type  n 
)
inlinestatic

Find n-th root of a value.

Parameters
sqValThe value to which square root has to be calculated.
nThe root type
Returns
n-te root of the input value.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

◆ pow()

template<typename Type >
static Type imt::base::core::math::Maths::pow ( const Type  base,
const int32_t  exp 
)
inlinestatic

Computes the value of base (m) raised to the power exponent (n)

Parameters
basethe base m
expthe exponent n
Returns
computes power of m^n

◆ pow10()

static float64_t imt::base::core::math::Maths::pow10 ( const int32_t  exp)
inlinestatic

Computes the value of 10 raised to the power exp.

Parameters
expthe exponent n
Returns
computes power of 10^n

◆ remainder()

template<typename Type >
static Type imt::base::core::math::Maths::remainder ( const Type &  numer,
const Type &  denom 
)
inlinestatic

Compute remainder (IEC 60559)

Returns the floating-point remainder of numer/denom (rounded to nearest):

remainder = numer - rquot * denom

Where rquot is the result of: numer/denom, rounded toward the nearest integral value (with halfway cases rounded toward the even number).

Parameters
numerValue of the quotient numerator.
denomValue of the quotient denominator.
Returns
The remainder of dividing the arguments. If this remainder is zero, its sign shall be that of numer.

◆ remquo()

template<typename Type >
static Type imt::base::core::math::Maths::remquo ( const Type &  numer,
const Type &  denom,
int *  quot 
)
inlinestatic

Compute remainder and quotient.

Returns the same as remainder, but it additionally stores the quotient internally used to determine its result in the object pointed by quot.

The value pointed by quot contains the congruent modulo with at least 3 bits of the integral quotient numer/denom.

Parameters
numerValue of the quotient numerator.
denomValue of the quotient denominator.
quotPointer to an object where the quotient internally used to determine the remainder is stored as a value of type int.
Returns
The remainder of dividing the arguments. If this remainder is zero, its sign shall be that of x; In this case, the value stored in quot is unspecified.

◆ rint()

template<typename Type >
static Type imt::base::core::math::Maths::rint ( const Type &  x)
inlinestatic

Round to integral value.

Rounds x to an integral value, using the rounding direction specified by fegetround.

This function may raise an FE_INEXACT exception if the value returned differs in value from x. See nearbyint for an equivalent function that cannot raise such exception.

Parameters
xValue to round.
Returns
The value of x rounded to a nearby integral (as a floating-point value). If this value differs from x, a FE_INEXACT exception may be raised (depending on the implementation).

◆ scalbln()

template<typename Type >
static Type imt::base::core::math::Maths::scalbln ( const Type &  x,
long int  n 
)
inlinestatic

Scale significand using floating-point base exponent (long)

Scales x by FLT_RADIX raised to the power of n, returning the result of computing:

scalbn(x,n) = x * FLT_RADIXn

Presumably, x and n are the components of a floating-point number in the system; In such a case, this function may be optimized to be more efficient than the theoretical operations to compute the value explicitly.

There also exists another version of this function: scalbn, which is identical, except that it takes an int as second argument.

Parameters
xfloating point value
ninteger value
Returns
Returns x * FLT_RADIXn. If the magnitude of the result is too large to be represented by a value of the return type, the function returns HUGE_VAL (or HUGE_VALF or HUGE_VALL) with the proper sign, and an overflow range error may occur (if too small, the function returns zero, and an underflow range error may occur).

◆ scalbn()

template<typename Type >
static Type imt::base::core::math::Maths::scalbn ( const Type &  x,
int  n 
)
inlinestatic

Scale significand using floating-point base exponent.

Scales x by FLT_RADIX raised to the power of n, returning the same as::

scalbn(x,n) = x * FLT_RADIXn

Presumably, x and n are the components of a floating-point number in the system; In such a case, this function may be optimized to be more efficient than the theoretical operations to compute the value explicitly.

On most platforms, FLT_RADIX is 2, making this function equivalent to ldexp.

Parameters
xValue representing the significand.
nValue of the exponent.
Returns
Returns x * FLT_RADIXn. If the magnitude of the result is too large to be represented by a value of the return type, the function returns HUGE_VAL (or HUGE_VALF or HUGE_VALL) with the proper sign, and an overflow range error may occur (if too small, the function returns zero, and an underflow range error may occur).

◆ sin()

template<typename Type >
static Type imt::base::core::math::Maths::sin ( const Type  value)
inlinestatic

Computes the sine of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes sin(value)

◆ sinh()

template<typename Type >
static Type imt::base::core::math::Maths::sinh ( const Type  value)
inlinestatic

Computes the sinh of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes sinh(value)

◆ sqrt()

template<typename Type >
static Type imt::base::core::math::Maths::sqrt ( const Type  sqVal)
inlinestatic

Find square root of a value.

Parameters
sqValThe value to which square root has to be calculated.
Returns
Square root of the input value.

◆ tan()

template<typename Type >
static Type imt::base::core::math::Maths::tan ( const Type  value)
inlinestatic

Computes the tangens of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes tan(value)

◆ tanh()

template<typename Type >
static Type imt::base::core::math::Maths::tanh ( const Type  value)
inlinestatic

Computes the tanh of arg (measured in radians)

Parameters
valuerepresenting in radians
Returns
computes tanh(value)

◆ trunc()

template<typename Type >
static Type imt::base::core::math::Maths::trunc ( const Type &  x)
inlinestatic

Truncate value.

Rounds x toward zero, returning the nearest integral value that is not larger in magnitude than x.

Parameters
xValue to truncate.
Returns
The nearest integral value that is not larger in magnitude than x (as a floating-point value).

The documentation for this class was generated from the following file: