FLOATBIN Function

Purpose

Returns a FLOAT BIN value with precision.

Syntax

FLOATBIN(x[,p])

Parameters

x
An expression.
p
A restricted expression specifying the float binary precision 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 BIN(p)
FIXED DEC(p,q) FLOAT BIN(r)

where r = CEIL(p*3.32)

FLOAT BIN(p) FLOAT BIN(p)
FLOAT DEC(p) FLOAT BIN(r)

where r = CEIL(p*3.32)

BIT FLOAT BIN(M)
CHAR, GRAPHIC or WIDECHAR FLOAT BIN(r)

where r = CEIL(N*3.32)