Enhanced floating point decimal to string conversion

The default formatting of a DECIMAL(P), SMALLFLOAT and FLOAT adapts to the significant digits of the value.

Floating point decimal types (like DECIMAL(5)) can store a large range of values, with a variable number of digits after the decimal point: For example, a DECIMAL(5) can store 12345 as well as 0.12345. See DECIMAL(p,s) for more details about floating point decimal types.

In version 2.50, the DECIMAL(P) to string conversion has been reviewed, to keep all significant digits and avoid data loss.

Note: This behavior change is related to the bug fix FGL-3915.
Before 2.50, floating point decimals converted to strings were by default formatted with 2 decimal digits, which could lead to data loss:
MAIN
   DEFINE str STRING, dec12, dec12_bis DECIMAL(12)
   LET dec12 = 10.12999
   LET str = dec12
   DISPLAY str
   LET dec12_bis = str
   DISPLAY (dec12 == dec12_bis)
END MAIN
Before 2.50, the above code will display:
10.13
     0
Since 2.50, all significant digits are kept, which allows proper decimal data serialization:
10.12999
     1
Before version 2.50, floating point decimal values conversion of huge values could also loose digits in the whole part of the number (the width of the result was never longer than p + 2). Starting with version 2.50, all significant digits of a floating point decimal are kept in the result string:
   Values            Vers<2.50       Vers>=2.50
-------------------------------------------------
   1.23456e123       1.23456e123     1.23456e123
   1.23456e40        1.235e40        1.23456e40
   123.456           123.46          123.456
   123456.0          123456.0        123456.0
   0.123456          0.12            0.123456
   0.0123456         0.01            0.0123456
   0.00123456        0.00            0.00123456
   1.23456e-08       0.00            1.23456e-08
If you expect that a any DECIMAL(P) to string conversion rounds to 2 digits, define the following FGLPROFILE entry:
fglrun.decToCharScale2 = true
Note: Do not use this configuration parameter, except if you have migration issues.