Math and special functions

PML supports most intrinsic math functions in the Cmath.h library (see “Supported Math Functions” for a list of supported math functions). In general, the function names are the same or very similar to the Fortran (and hence NONMEM) names of the same functions. There are some differences, however. For example, fabs(x), which applies to floating-point values, computes the absolute value of x. Do not use ABS(x), the Fortran name for absolute value, as this will give incorrect results when called with real number arguments.

In addition to the Cmath.h library functions, PML also supports a variety of special functions that are useful in PK/PD modeling. For example:

the probability density functions and cumulative distribution functions for the normal, Weibull, and inverse Gaussian distributions,

the inverse of the cumulative distribution function of the standard normal distribution, probit(x),

the Lambert W-function lambertw(x) for closed-form solutions to one-compartment model with Michaelis-Menten nonlinear elimination,

various link and inverse link functions,

some special functions useful for defining log likelihoods in certain count-type models.

A complete list of special functions is provided in “Supported Special Functions”.

Function names are typically written in lower case. For example, functions like exp, sqrt, log, are lower case, because PML uses the standard C library, in which lower case is the norm. This differs from other programs like NONMEM, which are not case sensitive. Spelling a function name incorrectly will result in a linker error message saying the function is undefined.


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