All functions listed in Table 3.5 are defined to work on the built-in parameter types analogously to the ANSI C++ standard.
Syntax | Description |
rval fabs ( rval ) | absolute value |
rval ceil ( rval ) | smallest integer not less than the argument |
rval floor( rval ) | largest integer not greater than the argument |
rval sqrt ( rval ) | square root of the argument |
rval exp ( rval ) | exponential of the argument, base e |
rval log ( rval ) | natural logarithm of the argument, base e |
rval log10( rval ) | logarithm of the argument, base 10 |
rval sin ( rval ) | sine of the argument |
rval cos ( rval ) | cosine of the argument |
rval tan ( rval ) | tangent of the argument |
rval asin ( rval ) | inverse sine of the argument |
rval acos ( rval ) | inverse cosine of the argument |
rval atan ( rval ) | inverse tangent of the argument |
rval sinh ( rval ) | hyperbolic sine of the argument |
rval cosh ( rval ) | hyperbolic cosine of the argument |
rval tanh ( rval ) | hyperbolic tangent of the argument |
rval pow ( rval, rval ) | argument-1 to the power of argument-2 |
rval atan2( rval, rval ) | arc tangent of argument-1/argument-2 |
rval fmod ( rval, rval ) | floating point remainder of argument-1 / argument-2 |
While it is not possible to add other functions by using MDL statements, these can be generated by writing C++ implementations and adding them to external Algorithm Library modules. Equivalent functionality can often be obtained by using sub-Models and methods within pure MDL code.