Logical Functions

IF THEN ELSE(condition, value_if_true, value_if_false)

Returns the true value when condition is nonzero; otherwise returns the false value. The engine normalizes this spelling to IF(...).

Alias: IF(condition, value_if_true, value_if_false).

Example: IF THEN ELSE(Inventory > 0, Demand, 0)

Both result expressions are evaluated before the function selects one, so do not rely on short-circuit evaluation.

ZIDZ(numerator, denominator)

Returns 0 when the absolute denominator is less than 1e-12; otherwise returns the quotient.

Example: ZIDZ(Revenue, Units)

XIDZ(numerator, denominator, fallback)

Returns fallback when the absolute denominator is less than 1e-12; otherwise returns the quotient.

Example: XIDZ(Revenue, Units, Average_Price)

SAFEDIV(numerator, denominator [, fallback])

Equivalent to XIDZ with an optional fallback. The default fallback is 0.

Example: SAFEDIV(Output, Labor, 0)

Supported logical aliases

The native engine also accepts AND(a, ...), OR(a, ...), and NOT(a). They return numeric 1 or 0; zero is false and any nonzero value is true. They are supported aliases rather than canonical editor entries.


Yano Simulator Help — Version 0.1.0, Build 20260704