Supported Math Functions

PML supports most of the intrinsic math functions in the Cmath.h library. See the following lists of supported functions. (Refer to http://www.cplusplus.com/reference/cmath/ for more information on the Cmath.h library.)

Table 1: Trigonometric Functions

Function 

Description

cos

Compute cosine

sin

Compute sine

tan

Compute tangent

acos

Compute arc cosine

asin

Compute arc sine

atan

Compute arc tangent

atan2

Compute arc tangent with two parameters

Table 2: Hyperbolic Functions

Function 

Description

cosh

Compute hyperbolic cosine

sinh

Compute hyperbolic sine

tanh

Compute hyperbolic tangent

acosh

Compute arc hyperbolic cosine

asinh

Compute arc hyperbolic sine

atanh

Compute arc hyperbolic tangent

Table 3: Exponential and Logarithmic Functions

Function

Description

exp

Compute exponential function

ldexp

Generate value from significand and exponent

log

Compute natural logarithm

log10

Compute common logarithm

exp2

Compute binary exponential function

expm1

Compute exponential minus one

ilogb

Integer binary logarithm

log1p

Compute logarithm plus one

log2

Compute binary logarithm

logb

Compute floating-point base logarithm

scalbn

Scale significand using floating-point base exponent

scalbln

Scale significand using floating-point base exponent (long)

Table 4: Power Functions

Function

Description

pow

Raise to power

sqrt

Compute square root

cbrt

Compute cubic root

hypot

Compute hypotenuse

Table 5: Error and Gamma Functions

Function

Description

erf

Compute error function

erfc

Compute complementary error function

tgamma

Compute gamma function

lgamma

Compute log-gamma function

Table 6: Rounding and Remained Functions

Function

Description

ceil

Round up value

floor

Round down value

fmod

Compute remainder of division

trunc

Truncate value

round

Round to nearest

lround

Round to nearest and cast to long integer

llround

Round to nearest and cast to long long integer

rint

Round to integral value

lrint

Round and cast to long integer

llrint

Round and cast to long long integer

nearbyint

Round to nearby integral value

remainder

Compute remainder

Table 7: Floating-point Manipulation Functions

Function

Description

copysign

Copy sign

nextafter

Next representable value

nextforward

Next representable value toward precise value

Table 8: Minimum, Maximum Difference Functions

Function

Description

fdim

Positive difference

fmax

Maximum value

fmin

Minimum value

Table 9: Other Functions Available in math.h

Function

Description

fabs

Compute absolute value

abs

Compute absolute value

fma

Multiply-add

Table 10: Classification Macro/Functions

Macro/Function

Description

isfinite

Is a finite value

isinf

Is infinity

isnormal

Is normal

signbit

Sign bit (whether the sign of x is negative)

Table 11: Comparison Macro/Functions

Macro/Function 

Description

isgreater

Is greater

isgreaterequal

Is greater or equal

isless

Is less

islessequal

Is less or equal

islessgreater

Is less or greater

isunordered

Is unordered



Legal Notice | Contact Certara
© Certara USA, Inc. All rights reserved.