FLOATDEC Function

Purpose

Returns a FLOAT DEC value with precision.

Syntax

FLOATDEC(x[,p])

Parameters

x
An expression.
p
A restricted expression specifying the total number of digits in the result. This value must not exceed the implementation limit. If omitted, the precision is derived from the source as follows, where M is the maximum Fixed Binary precision and N is the maximum Fixed Decimal precision:
Source code Result
FIXED BIN(p,q) FLOAT DEC(r)

where r = CEIL(p/3.32)

FIXED DEC(p,q) FLOAT DEC(p)
FLOAT BIN(p) FLOAT DEC(r)

where r = CEIL(p/3.32)

FLOAT DEC(p) FLOAT DEC(p)
BIT FLOAT DEC(r)

where r = CEIL(M/3.32)

CHAR, GRAPHIC or WIDECHAR FLOAT DEC(N)