When defining fields using the F_FLOATING data type and
subsequently comparing a literal value (for example, 99.999) in a
query with the field values, you must specify the literal value
in scientific notation (for example, 99.999E0) for the query to
work. In this way, Oracle Rdb can compare the F_FLOATING literal
value in the query with the F_FLOATING values for the field for
each record. This is a clarification of information described in
the RDO documentation.
For example, if you try to compare field values defined as F_
FLOATING data type with the literal 99.999, Oracle Rdb interprets
the literal 99.999 as a LONGWORD scale -3, and converts both the
literal and the F_FLOATING field values to G_FLOATING values for
the comparison. This is required because the precision of an F_
FLOATING data type is insufficient for all LONGWORD values. The
problem arises in the conversion from F_FLOATING to G_FLOATING
data type values. Because the precision of the F_FLOATING data
type is smaller than that of the G_FLOATING data type, the rules
for the conversion do not assure that an F_FLOATING data type
value of 99.999 and a LONGWORD data type value of 99.999 will
be the same when both are converted to G_FLOATING data type
values. If you do a comparison with the literal 99.999E0, Oracle Rdb
interprets this value as an F_FLOATING data type value and the
comparison works as expected. The following query returns the
desired result when the field COUPON is defined as an F_FLOATING
data type.
FOR A IN SECURITY
WITH A.COUPON = 99.999E0
PRINT A.ID
END_FOR