[fpc-devel] Free Pascal/Delphi compatibility cross-tests
Adriaan van Os
fpc at microbizz.nl
Tue Mar 28 14:56:14 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.
Or did you mean the Exponent function-return, not the internal format ? Then, my comment above is
wrong. Anyway, I feel that compilers should follow the IEE-754 and ISO/IEC 10967
<https://en.wikipedia.org/wiki/ISO/IEC_10967> standards.
Regards,
Adriaan van Os
More information about the fpc-devel
mailing list