On 14 Aug 2013, at 09:38, Sven Barth wrote:

> - 0.5 does not always have a direct representation as a floating point value 
> and thus internally it might be 0.4999999 or something like that and thus it 
> will be rounded to 0.4 (see also http://bugs.freepascal.org/view.php?id=24374 
> )

0.5 is one of the values that can always be represented exactly. The fractional 
part of IEEE 754 floating point numbers is represented as sums of negative 
powers of 2, i.e. 0.5, 0.25, etc.


Jonas
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to