[fpc-devel] MySQL 5.1 and Double (trouble)
Jonas Maebe
jonas.maebe at elis.ugent.be
Mon Jul 11 14:56:37 CEST 2011
On 11 Jul 2011, at 13:41, Andrew Brunner wrote:
> On Mon, Jul 11, 2011 at 4:53 AM, Ludo Brands <ludo.brands at free.fr> wrote:
>
>> How do you get the 40734.825668912003 value?
>
> Fields.FieldByName(Value).AsFloat();
You are probably assigning the result to a variable of the type "extended", or directly passing it a routine that accepts parameters of the type "extended". The digits beyond the precision guaranteed by the double type are undefined in that case (at least in case the number cannot be represented exactly by a double precision value).
Jonas
More information about the fpc-devel
mailing list