Float string representation precision problems
Submitted by G??bor Szalai
Link to original bug (#566118)
Description
The string representation of the TTCN-3 floats are not precise enough. Less significant digits are used than required.
Examples: Code generation problems: TTCN code
var float fl:= 1.0000000000000002 // smallest value greater than 1 representable by 64bit double
Generated C++ code: fl = 1;
Other problematic example: 3.2511111111111113e123
The same precision problem exists in: string2ttcn JSON encoder float2str
The number of the needed significant digits are depends on the used floating point type. In the case of the double at least 17 digits are needed.
Version: 7.1.0