On Tue, 13 Feb 2024, Martin Frb via fpc-devel wrote:

https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/40768

Are there any defaults, with which precision each float type (single/double/extended) should be printed?

Sysutils contains some defaults used by the format function:

 case ValueType of
    fvExtended:
      Str(Extended(Value):25, Buffer);
    fvDouble,
    fvReal:
      Str(Double(Value):23, Buffer);
    fvSingle:
      Str(Single(Value):16, Buffer);
    fvCurrency:
      Str(Currency(Value):25, Buffer);
    fvComp:
      Str(Currency(Value):23, Buffer);
  end;


There are probably some other constants in the flt_core.inc file in the rtl
for the write/str functions...

Michael.
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel

Reply via email to