[fpc-devel] certain divisions in single precision only

Tomas L. kesbubka at gmail.com
Fri Dec 6 14:43:23 CET 2019


Dear fpc developers,

Let me submit a divison bug:

When a floating point constant which fits into single precision is divided
by integer variable, the result is assumed to be a single-precision
number.

program div5;
var  five:integer=5;
begin
    writeln(1.0/five);
    writeln(1.0/five-1/five);
end.

versions where problem spotted:
3.0.4 [2019/10/27] for x86_64 on windows
3.0.4+dfsg-18ubuntu2 [2018/08/29] for x86_64

older version with no problem:
fpc 2.6.4 i386-win32 is OK

Thanks

   T.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20191206/368cd1da/attachment.html>


More information about the fpc-devel mailing list