Mike:

This issue was discussed in detail a while back and I was under the impression that it has been corrected. Are you using the latest patch?

Javier,

 

Javier Valencia, PE

President

Valencia Technology Group, L.L.C.

14315 S. Twilight Ln., Suite #14

Olathe, KS  66062-4571

(913)829-0888

(913)649-2904 FAX

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of mjs
Sent: Sunday, February 09, 2003 7:30 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Rounding with Currency

 

Dear Rbase buddies,

 

I have written a payroll program that finally works almost perfectly.  I say almost because…..

 

Say the employee makes $11 per hour, and they get time and a half for overtime, and they have 0.83 hours of overtime.  How much overtime pay should they get?  Using REAL numbers (instead of currency) as follows…

(11 * .83  * 1.5) = 13.695, which should round up to $13.70.

 

Using Currency, and variables as follows…..

SET V v1 CURRENCY = 11

SET V v2 REAL = .83

SET V v3 CURRENCY

SET V v3 = (.v1 * .v2 * 1.5)   produces $13.69. 

 

Shouldn’t that round up to $13.70? 

 

I could rewrite the software using all real numbers, and convert at the end, but shouldn’t I get the same result?

 

Mike Sinclair

Reply via email to