FLOATDEC
FLOATDEC returns a FLOAT DEC 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 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, UCHAR, or WIDECHAR | FLOAT DEC(N) |