Archives Oct. 14, 2005

Friday, 14th October 2005

Chip

Work. Friday at last! Well, sorta. I have to work Saturday! MAD!

12:10 PM:

DAMN EXCEL!!!! Why does such a small bug mess up my spreadsheet so badly!!!! I'm talking about TRUNC() - a function that slices the fraction off without rounding the number.

TRUNC(1.25) = 1

Now the boggle:

I have $211.25 worth of money to take from the til in takings leaving the float... I have already taken from the til $211.20 in notes and coins starting from the largest denomination, now I need to calculate how many 5c pieces to take out. By the time the formulars have cascaded down from $100 notes to coins down to the 5cs that's the last one you will take out. So to check this we have a formula. I have $1.25 in 5c coins is the $1.25 of 5c less than what I have removed already? Nay, there is only 0.05. Cool. Divide the remainder by the money denominator ($0.05). To see how many will fit (1 in this case) we divide the remainder by the coin value and we get 1. So we need 1 5c piece. No probs. Answer x Denomination = Coin to remove. Swar. ONLY fscking TRUNC(1,0) seems to return 0.0000999998 == 0. SHIT!