FLOATBIN
FLOATBIN returns a FLOAT BIN value with precision derived from the source unless explicitly specified as a parameter to the function.
- x
- Expression.
- p
- Restricted expression that specifies the total number of digits in the result. It must not exceed the implementation limit.
If p is omitted, the precision of the result is determined from the source according to this table:
source | 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, UCHAR, or WIDECHAR | FLOAT BIN(r)
where r = CEIL(N*3.32) |