EXPONENT Function

Purpose

Returns the value of the exponent part of x as a FIXED BINARY(31,0).

Syntax

EXPONENT(x)

Parameters

x
An expression declared as FLOAT.

Description

Do not confuse the value returned by EXPONENT(x) as the "mathematical" exponent of x. For all values of x except 0, EXPONENT(x) is a unique number e. See Examples for more information.

Examples

When x = 0, EXPONENT(x) = 0.

EXPONENT(x) is the unique number e as in the following:

radix(x)(e-1) <= abs(x) < radix(x)e

Therefore in this example, EXPONENT(1e0) equals 1 and not 0.