[fpc-devel] Free Pascal/Delphi compatibility cross-tests

Adriaan van Os fpc at microbizz.nl
Tue Mar 28 14:39:46 CEST 2017


Dmitriy Pomerantsev wrote:
> Hello everyone.

> 1. Difference in implementation.
> Â  For example, in Delphi, Exponent has a bias "For single precision floating-point values, the bias is 127." (http://docwiki.embarcadero.com/Libraries/Tokyo/en/System.SysUtils.TsingleHelper.Exponent), Free Pascal does not (http://www.freepascal.org/docs-html/rtl/sysutils/tsinglehelper.exponent.html).

This is certainly not true. The single floatomg-point format is determined by the IEEE-754 
standard. And that format has indeed a bias of 127 
<https://en.wikipedia.org/wiki/Single-precision_floating-point_format> for any compiler.

Regards,

Adriaian van Os



More information about the fpc-devel mailing list