There has been a long winding discussion on the German Forum.

IMHO this is not really relevant, as relying on the exact value of a real number is erroneous, anyway. So a real number never can be considered to *exactly* *be* 1.5, but just somewhere nearby, and hence it's not legal to predict hat it is rounded to.

Moreover results of the discussion were:

 - the way of rounding is defined by the CPU hardware, even old Turbo Pascal executables do banker's rouding on modern hardware.  - SetRoundMode is not only dangerous, but does not help, anyway, as there is no mode defining the "intuitive " "non-banker rouding" method.  - (some versions of) Turbo Pascal had a soft-real library that did "intuitive" rounding.

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

Reply via email to