I'm in the process of writing the Firebird 4.0 Language Reference, and I'm noticing some odd things with numeric literals and INT128 (including numeric types) and DECFLOAT.

1. Integer hex literals don't support INT128 (reported as https://github.com/FirebirdSQL/firebird/issues/6809)

2. Exact numeric literals with 30 or more digits are handled as DECFLOAT(34), they should be handled as INT128 or DECIMAL/NUMERIC backed by INT128 (as those types support 38 digits; actually 39 for INT128).

The cut off point for handling long exact numeric literals should be at 38 digits (or maybe, if no decimal point is present, at INT128 max of 7FFF FFFF FFFF FFFF FFFF FFFF FFFF FFFF), longer values should be handled as DECFLOAT.

I haven't created a ticket for point 2 yet, as I was wondering if maybe this was a deliberate choice, or is this a left-over of the earlier situation when high-precision numerics were backed by DECFLOAT?

Mark
--
Mark Rotteveel


Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to