EXPR_FUNCTIONS#

module wntr.msx.base

EXPR_FUNCTIONS#

Mathematical functions available for use in expressions. See Table 19 for a list and description of the different functions recognized. These names, case insensitive, are considered invalid when naming variables.

Table 19 Functions defined for use in EPANET-MSX expressions.#

Name

Description

abs

absolute value

sgn

sign

sqrt

square-root

step

step function

exp

natural number, e, raised to a power

log

natural logarithm

log10

base-10 logarithm

sin

sine

cos

cosine

tan

tangent

cot

cotangent

asin

arcsine

acos

arccosine

atan

arctangent

acot

arccotangent

sinh

hyperbolic sine

cosh

hyperbolic cosine

tanh

hyperbolic tangent

coth

hyperbolic cotangent

*

multiplication

/

division

+

addition

-

negation and subtraction

^

power/exponents

(, )

groupings and function parameters