### FNX – Evaluation of single-variable function

Block SymbolLicensing group: STANDARD

Function Description
The FNX block evaluates basic math functions of single variable. The table below shows the list of supported functions with corresponding constraints. The ifn parameter determines the active function.
List of functions:

 ifn: shortcut function constraints on u 1: acos arccosine $\mathtt{\text{u}}\in <-1.0,1.0>$ 2: asin arcsine $\mathtt{\text{u}}\in <-1.0,1.0>$ 3: atan arctangent – 4: ceil rounding towards the nearest higher integer – 5: cos cosine – 6: cosh hyperbolic cosine – 7: exp exponential function ${e}^{\mathtt{\text{u}}}$ – 8: exp10 exponential function $1{0}^{\mathtt{\text{u}}}$ – 9: fabs absolute value – 10: floor rounding towards the nearest lower integer – 11: log logarithm $\mathtt{\text{u}}>0$ 12: log10 decimal logarithm $\mathtt{\text{u}}>0$ 13: random arbitrary number $z\in <0,1>$ (u independent) – 14: sin sine – 15: sinh hyperbolic sine – 16: sqr square function – 17: sqrt square root $\mathtt{\text{u}}>0$ 18: srand changes the seed for the random function to u $\mathtt{\text{u}}\in ℕ$ 19: tan tangent – 20: tanh hyperbolic tangent –

Note: All trigonometric functions process data in radians.

The error output is activated ($\mathtt{\text{E}}=\mathtt{\text{on}}$) in the case when the input value u falls out of its bounds or an error occurs during evaluation of the selected function (implementation dependent), e.g. square root of negative number. The output is set to substitute value in such case ($\mathtt{\text{y}}=\mathtt{\text{yerr}}$).

Input

 ifn Function type (see table above)  $\odot$1 Long (I32) yerr Substitute value for an error case Double (F64)