Convert the non-decimal numeric operand
IBM® Informix® ESQL/C converts all operands that are not already DECIMAL (or decimal) to DECIMAL before it performs the arithmetic operation.
The following list shows the precision and scale that Informix
ESQL/C uses
for the non-DECIMAL operand.
- Operand type
- Convert to
- FLOAT
- DECIMAL(17)
- SMALLFLOAT
- DECIMAL(9)
- INTEGER
- DECIMAL(10,0)
- SMALLINT
- DECIMAL(5,0)
Informix ESQL/C does not consider leading or trailing zeros as significant digits. Leading or trailing zeros do not contribute to the determination of precision and scale. If the operation is addition or subtraction, Informix ESQL/C adds trailing zeros to the operand with the smaller scale until the scales are equal.