Why Does ISC Use Four Decimal Places?

Tips, Tricks, How To Guides, etc..
Post Reply
CharlieFoxtrot
Confirmed
Confirmed
Posts: 413
Joined: Sun Aug 09, 2009 1:23 pm

Why Does ISC Use Four Decimal Places?

Post by CharlieFoxtrot »

It's something I've always wondered about. Is there a practical reason why all of the prices (and many other numeric values) are saved in the database with 4 decimal places?

For example: "9.9500" instead of "9.95"

Is this an industry standard that Interspire was following? Or is it just a matter of the programmer's preferences?
ISC 4.0.7

"... and let's be honest that whole "by design" thing is getting old too."
Martin
Site Admin
Site Admin
Posts: 1854
Joined: Wed Jun 17, 2009 6:30 pm
Location: South Yorkshire UK
Contact:

Re: Why Does ISC Use Four Decimal Places?

Post by Martin »

I suppose it's possible that things like some currencies have hyper inflation and there's always some numpty who wants to use KG as their weight measure and then has lots of items weighing a couple of grams.

Probably just a play it safe thing though...
myshop
Posts: 51
Joined: Tue Jun 23, 2009 5:48 am
Location: NSW Australia
Contact:

Re: Why Does ISC Use Four Decimal Places?

Post by myshop »

Ex tax prices need to be dealt with in a minimum of 4dp of accuracy.. any less and you get rounding errors.
Post Reply