1
0
mirror of https://github.com/aportelli/LatAnalyze.git synced 2024-11-10 08:55:37 +00:00

update of standard math functions with C++11 additions

This commit is contained in:
Antonin Portelli 2014-03-03 18:34:23 +00:00
parent af246dc5d3
commit 66af922bc2
2 changed files with 69 additions and 0 deletions

View File

@ -48,19 +48,40 @@ DEF_STD_FUNC_2ARG(atan2)
DEF_STD_FUNC_1ARG(cosh)
DEF_STD_FUNC_1ARG(sinh)
DEF_STD_FUNC_1ARG(tanh)
DEF_STD_FUNC_1ARG(acosh)
DEF_STD_FUNC_1ARG(asinh)
DEF_STD_FUNC_1ARG(atanh)
// Exponential and logarithmic functions
DEF_STD_FUNC_1ARG(exp)
DEF_STD_FUNC_1ARG(log)
DEF_STD_FUNC_1ARG(log10)
DEF_STD_FUNC_1ARG(exp2)
DEF_STD_FUNC_1ARG(expm1)
DEF_STD_FUNC_1ARG(log1p)
DEF_STD_FUNC_1ARG(log2)
// Power functions
DEF_STD_FUNC_2ARG(pow)
DEF_STD_FUNC_1ARG(sqrt)
DEF_STD_FUNC_1ARG(cbrt)
DEF_STD_FUNC_2ARG(hypot)
// Error and gamma functions
DEF_STD_FUNC_1ARG(erf)
DEF_STD_FUNC_1ARG(erfc)
DEF_STD_FUNC_1ARG(tgamma)
DEF_STD_FUNC_1ARG(lgamma)
// Rounding and remainder functions
DEF_STD_FUNC_1ARG(ceil)
DEF_STD_FUNC_1ARG(floor)
DEF_STD_FUNC_2ARG(fmod)
DEF_STD_FUNC_1ARG(trunc)
DEF_STD_FUNC_1ARG(round)
DEF_STD_FUNC_1ARG(rint)
DEF_STD_FUNC_1ARG(nearbyint)
DEF_STD_FUNC_2ARG(remainder)
// Minimum, maximum, difference functions
DEF_STD_FUNC_2ARG(fdim)
@ -81,24 +102,51 @@ void STDMATH_NAMESPACE::addStdMathFunc(FunctionTable &fTable)
ADD_FUNC(asin);
ADD_FUNC(atan);
ADD_FUNC(atan2);
// Hyperbolic functions
ADD_FUNC(cosh);
ADD_FUNC(sinh);
ADD_FUNC(tanh);
ADD_FUNC(acosh);
ADD_FUNC(asinh);
ADD_FUNC(atanh);
// Exponential and logarithmic functions
ADD_FUNC(exp);
ADD_FUNC(log);
ADD_FUNC(log10);
ADD_FUNC(exp2);
ADD_FUNC(expm1);
ADD_FUNC(log1p);
ADD_FUNC(log2);
// Power functions
ADD_FUNC(pow);
ADD_FUNC(sqrt);
ADD_FUNC(cbrt);
ADD_FUNC(hypot);
// Error and gamma functions
ADD_FUNC(erf);
ADD_FUNC(erfc);
ADD_FUNC(tgamma);
ADD_FUNC(lgamma);
// Rounding and remainder functions
ADD_FUNC(ceil);
ADD_FUNC(floor);
ADD_FUNC(fmod);
ADD_FUNC(trunc);
ADD_FUNC(round);
ADD_FUNC(rint);
ADD_FUNC(nearbyint);
ADD_FUNC(remainder);
// Minimum, maximum, difference functions
ADD_FUNC(fdim);
ADD_FUNC(fmax);
ADD_FUNC(fmin);
// Absolute value
ADD_FUNC(fabs);
}

View File

@ -50,19 +50,40 @@ DECL_STD_FUNC(atan2)
DECL_STD_FUNC(cosh)
DECL_STD_FUNC(sinh)
DECL_STD_FUNC(tanh)
DECL_STD_FUNC(acosh)
DECL_STD_FUNC(asinh)
DECL_STD_FUNC(atanh)
// Exponential and logarithmic functions
DECL_STD_FUNC(exp)
DECL_STD_FUNC(log)
DECL_STD_FUNC(log10)
DECL_STD_FUNC(exp2)
DECL_STD_FUNC(expm1)
DECL_STD_FUNC(log1p)
DECL_STD_FUNC(log2)
// Power functions
DECL_STD_FUNC(pow)
DECL_STD_FUNC(sqrt)
DECL_STD_FUNC(cbrt)
DECL_STD_FUNC(hypot)
// Error and gamma functions
DECL_STD_FUNC(erf)
DECL_STD_FUNC(erfc)
DECL_STD_FUNC(tgamma)
DECL_STD_FUNC(lgamma)
// Rounding and remainder functions
DECL_STD_FUNC(ceil)
DECL_STD_FUNC(floor)
DECL_STD_FUNC(fmod)
DECL_STD_FUNC(trunc)
DECL_STD_FUNC(round)
DECL_STD_FUNC(rint)
DECL_STD_FUNC(nearbyint)
DECL_STD_FUNC(remainder)
// Minimum, maximum, difference functions
DECL_STD_FUNC(fdim)