-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Andrew Stirling
Sent: Monday, July 24, 2006 15:59
To: [email protected]
Subject: searching for a penny

Spent a LOT of time trying to find a error.

? 6313*.22  && =1388.86
however I need to work to 4 dec points
thus
? INT(6313.0000 * 22.00/100*10000)/10000  && =1388.8599
  Which I FLOOR to 1388.85

once I found the prob, fixed it by multiplying first thus ?
INT(10000*6313.0000*22.00/100)/10000  && =1388.8600

-- 

Andrew Stirling

===================================

Seems to me you are making things way too complicated.  

In the example you cited, you are multiplying an integer by a fraction
with two decimal places.  The precision of this calculation can never
exceed two decimal places. If you store that value in a field that
contains 4 decimal places, you will get the meaningless zeroes added on.

If you are using factors that have more than 2 decimal places total,
using FLOOR to give you the answer will inevitably cause you to lose up
to 0.9999 per calculation.  Even with normal rounding, you can lose
something if you have enough augends.

Is this some kind of UK accounting practice?  Why would you ever want to
use FLOOR() in an accounting environment?

Care to elaborate?

HALinNY 


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to