FUZZ Function

Returns the nearest integer if the argument is within 1E-12 of that integer.

Category: Truncation
Returned data type: DOUBLE

Syntax

FUZZ(expression)

Arguments

expression

specifies any valid expression that evaluates to a numeric value.

Data type DOUBLE
See <sql-expression>
FedSQL Expressions

Details

The FUZZ function returns the nearest integer value if the expression is within 1E-12 of the integer (that is, if the absolute difference between the integer and argument is less than 1E-12). Otherwise, the expression is returned.

Example

The following statement illustrates the FUZZ function:
Statements
Results
select fuzz(5.99999999);
5.99999999
Last updated: February 23, 2017