Firebird float support does not conform to Interbase spec [CORE2315] #2739
Submitted by: Bill Oliver (verbguy)
Assigned to: Bill Oliver (verbguy)
Is related to QA387
The Interbase documentation says that a float value should have a range from 1.175E-38 to 3.402E38. But, the largest value I can put in appears to be just under 3.4E38. 3.4E38 or higher results in overflow.
This came up when running the JDBCCTS tests against Firebird embedded. Thanks go to my co-worker Dave M.
This was fixed in SAS Vulcan (S0275993). The code in jrd/cvt.cpp is using hard-coded 3.4E38 instead of the proper FLT_MAX symbol which is 3.402823466e+38F. Fix provided to Alex for review.
Here is bad test case:
create table float_test (i integer, f float);
produces this output:
Here is correct results with my patch:
SQL> create table float_test (i integer, f float);
The text was updated successfully, but these errors were encountered:
Commented by: @AlexPeshkoff
Fincal patch is decided to be:
Added not to forget after beta1.
Commented by: Claudio Valderrama C. (robocop)
Beware that the documentation says:
Of these macros, only FLT_RADIX is guaranteed to be a constant expression. The other macros listed here cannot be reliably used in places that require constant expressions, such as `#if' preprocessing directives or in the dimensions of static arrays.