[fpc-pascal] round(2.5)=2

Mattias Gaertner nc-gaertnma at netcologne.de
Tue Jun 12 09:01:32 CEST 2018


On Mon, 11 Jun 2018 10:01:13 +0200
Michael Schnell <mschnell at lumino.de> wrote:

> 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.

Floats can represent 1.5 exactly. 

Mattias



More information about the fpc-pascal mailing list