[fpc-devel] Floating point precision

Colin Western mftq75 at dsl.pipex.com
Fri Apr 6 21:36:14 CEST 2007


Can I ask what determines the precision of floating point calculations 
are done in? It seems that fpc treats (for example, with J declared as 
integer)

1/sqrt(J+1.0) as single

but

1/sqrt(J+1) as double

which seems counter-intuitive. In FORTRAN I can force double precision 
evaluation with sqrt(J+1.0D0) but there is no equivalent idea of a 
double constant in Pascal.

Colin



More information about the fpc-devel mailing list