Page 1 of 1

[SOLVED] DOUBLE vs DECIMAL

Posted: Wed Nov 03, 2004 5:07 am
by irealms
whats the difference?

I mean i looked it up in the manual bit can't see what difference the 2 have in practical terms. I'm using DEICIMAL for a price field, is this the best type to use?

Difference.

Posted: Wed Nov 03, 2004 6:08 am
by AnarKy
Hi,

Semantically they can be used interchangeably.

From my c/c++ experience all i can say is: Decimal is stored as strings and will take longer to process in calculations, however, Double’s are sometimes prone to rounding errors especially with extreme values.

If I were going to store currency, I would probably go for a Decimal type field. In most instances I would not bother about it. :)

Posted: Thu Nov 04, 2004 3:50 am
by irealms
Ah thanks for clearing that up :)