Supported Special Functions

The following special functions (with some duplicates of the intrinsic versions, but with different names) are defined within the Phoenix PML language. The detailed C language code implementing each can be found in <Phoenix_install_dir>\application\lib\NLME\Execut­ables\mutil.c.

Name

Usage

Definition

CalcTMax

CalcTMax(A, a, B, b, C, c);

obtain Tmax for a macro-parameter model

ilogit
iloglog
icloglog
iprobit

ilogit(x);
iloglog(x);
icloglog(x);
iprobit(x);

exp(x)/(exp(x)+1)
inverse log-log link function
inverse complementary log-log link function
inverse probit (same as phi(x))

lambertw

lambertw(const z);

inverse of x(y)=y*exp(y)

lgamm
factorial

lgamm(x);
factorial(x);

gamma function
x!=x*(x – 1)*…*1

lnegbin_rp
megnin_rp

lnegbin_rp(r, p, y);
rnegbin_rp(r, p);

neg. binomial, parameterized by r, p (LL)
(sample)

lnegbin
pnegbin
rnegbin

lnegbin(mean, beta, power, y);
pnegbin(mean, beta, power, y);
rnegbin(mean, beta, power);

neg. binom., param. by mean, beta (= log(alpha)), power (LL)
(exp(LL))
(sample)

lnorm

lnorm(x, std);

log of probability density function of normal distribution with mean (m)=0.
Since probability density of the normal distribution is f(x)=1/(v(2p)s)e^–((x–m)^2/(2s^2)), then assuming that m=0, log f(x)= – 0.5*(log2p+log(s^2) +(x/s)^2).

lphi
phi
probit
erfunc

lphi(x, v);
phi(x);
probit(p);
erfunc(x);

log(phi(x/stdev))
normal(0,1) cum. dist. function
inverse N(0,1) cum.dist. function
error function

lpois
ppois
rpois

lpois(mean, int _x);
ppois(mean, int _x);
int rpois(lambda);

log(mean^n*exp(–mean)/n!) (LL)
(exp(LL))
(sample)

min
max
log10
abs
ln

min(x, y);
max(x, y);
log10(x);
abs(x);
ln(x);

minimum
maximum
log base10
absolute
natural log

unifToPois­son

unifToPoisson(mean, r);

convert uniform distribution to poisson

vfwt

vfwt(f, p);

make an observation variance function

 

Math functions

Phoenix PML supports a majority of the intrinsic math functions in the Cmath.h library. See the fol­lowing tables for a list of supported functions. (Refer to http://www.cplusplus.com/reference/cmath/ for more information on the Cmath.h library.)

Trigonometric functions 928

Hyperbolic functions 928

Exponential and logarithmic functions 928

Power functions 929

Error and gamma functions 929

Rounding and remainder functions 929

Floating-point manipulation functions 930

Minimum, maximum, difference functions 930

Other functions available in math.h 930

Classification macro/functions 930

Comparison macro/functions 931

 

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

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

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)

Power functions

Function

Description

pow

Raise to power

sqrt

Compute square root

cbrt

Compute cubic root

hypot

Compute hypotenuse

Error and gamma functions

Function

Description

erf

Compute error function

erfc

Compute complementary error function

tgamma

Compute gamma function

lgamma

Compute log-gamma function

Rounding and remainder 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

remain­der

Compute remainder

Floating-point manipulation functions

Function

Description

copysign

Copy sign

nextafter

Next representable value

nextfor­ward

Next representable value toward precise value

Minimum, maximum, difference functions

Function

Description

fdim

Positive difference

fmax

Maximum value

fmin

Minimum value

Other functions available in math.h

Function

Description

fabs

Compute absolute value

abs

Compute absolute value

fma

Multiply-add

Classification macro/functions

Function

Description

isfinite

Is a finite value

isinf

Is infinity

isnormal

Is normal

signbit

Sign bit (whether the sign of x is negative)

Comparison macro/functions

Function

Description

isgreater

Is greater

isgreatereq­ual

Is greater or equal

isless

Is less

islessequal

Is less or equal

islessgreater

Is less or greater

isunordered

Is unordered

 


Last modified date:6/26/19
Certara USA, Inc.
Legal Notice | Contact Certara
© 2019 Certara USA, Inc. All rights reserved.