RNBO Objects & Operators fixnan
Open Help

fixnan

Replace NaN (Not a Number) values with zero.

Description

Replaces NaNs with zero. A NaN (Not a Number) is a floating point data value which represents an undefined or unrepresentable value, such as the result of dividing by zero. Computations on NaNs produce more NaNs, and so it is often preferable to replace the NaN with a zero value. Note that division and modulo operators in gen~ protect against generating NaNs by default, so this should only be required for protecting against incoming values in exported code.

Inlets

Input [number]

The value to be fixed if NaN

Outlets

Fixed Output [number]

Returns 0 if input value is NaN

Fixed Attributes

These attributes must be set in the object box and determine the behavior of the object at runtime.

hot [bool] (default: 0)

All inlets trigger calculation.

Dynamic Attributes

These attributes can be modified in the code during execution using the set object

in1 [number]

The value to be fixed if NaN

reset [bang] (default: 0)

Reset inlets to default values.

See Also

Name Description
isnan Return 1 if input is NaN (Not a Number), else return zero.
isnan~~
fixdenorm Replace denormal values with 0.
fixdenorm~ Replace denormal values with 0.