Manual

Neuron C Reference Guide 63
Short
Name
Function
trunc void fl_trunc(const float_type *arg1, float_type *arg2);
Returns the whole number part of a floating-point number: (arg2 =
trunc(arg1)). Truncation is towards zero. For example, trunc(-3.45) = -
3.0.
floor void fl_floor(const float_type *arg1, float_type *arg2);
Returns the largest whole number less than or equal to a given floating-
point number: (arg2 = floor(arg1)). Truncation is towards minus
infinity. For example, floor(-3.45) = -4.0.
ceil void fl_ceil(const float_type *arg1, float_type *arg2);
Returns the smallest whole number greater than or equal to a given
floating-point number: (arg2 = ceil(arg1)). Truncation is towards plus
infinity. For example, ceil(-3.45) = -3.0.
round void fl_round(const float_type *arg1, float_type *arg2);
Returns the nearest whole number to a given floating-point number:
(arg2 = round(arg1)). For example, round(-3.45) = -3.0.
mul2 void fl_mul2(const float_type *arg1, float_type *arg2);
Multiplies a floating-point number by two: (arg2 = arg1 * 2.0).
div2 void fl_div2(const float_type *arg1, float_type *arg2);
Divides a floating-point number by two: arg2 = arg1 / 2.0).
Comparison Operators
Table 23 lists the comparison operator functions.
Table 23. Comparison Operators
Short
Name Function
eq boolean fl_eq(const float_type *arg1,
const float_type *arg2);
Returns TRUE if the first argument is equal to the second argument,
otherwise FALSE: (arg1 == arg2).
ne boolean fl_ne(const float_type *arg1,
const float_type *arg2);
Returns TRUE if the first argument is not equal to the second
argument, otherwise FALSE: (arg1 != arg2).