Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-15 Thread Waynn Lue
There's an algorithm known as banker's rounding that I thought all US banks used. I'm on blackberry right now so I don't have a pointer, but essentially you round to the nearest even cent. 1.5 goes to 2, as does 2.5. Waynn On 7/15/08, tedd [EMAIL PROTECTED] wrote: At 4:15 PM -0400 7/14/08,

Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-15 Thread Jochem Maas
tedd schreef: At 4:45 PM -0400 7/14/08, Daniel Brown wrote: That's as far OT as I'm going, but it's worth noting how regulation doesn't do shit if it's not enforced. The only thing that's regulated AND enforced is what you owe the government. actually your under no obligation to

RE: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Alex Chamberlain
[quote] I don't quite understand your problem, but I use integers for any monetary workings as you can guarantee it is accurate (obviously, you work in pence or cents rather than GBP or USD). Alex Hello Alex, I was reading through this thread, and I was curious about what methods you use

RE: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 21:09 +0100, Alex Chamberlain wrote: [quote] I don't quite understand your problem, but I use integers for any monetary workings as you can guarantee it is accurate (obviously, you work in pence or cents rather than GBP or USD). Alex Hello Alex, I was

Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Daniel Brown
On Mon, Jul 14, 2008 at 4:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Nope, banks can't round like that when calculating your daily interest :) If it works in their favor, you'd be surprised what they do. That's why extending TILA to banks in the US is such a big deal to me, yet gets

Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Robert Cummings
On Mon, 2008-07-14 at 16:25 -0400, Daniel Brown wrote: On Mon, Jul 14, 2008 at 4:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Nope, banks can't round like that when calculating your daily interest :) If it works in their favor, you'd be surprised what they do. That's why

RE: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Alex Chamberlain
On Mon, 2008-07-14 at 16:25 -0400, Daniel Brown wrote: On Mon, Jul 14, 2008 at 4:15 PM, Robert Cummings [EMAIL PROTECTED] wrote: Nope, banks can't round like that when calculating your daily interest :) If it works in their favor, you'd be surprised what they do. That's why

Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread Daniel Brown
On Mon, Jul 14, 2008 at 4:28 PM, Robert Cummings [EMAIL PROTECTED] wrote: I'm not completely sure about the U.S. but banks in Canada are regulated... fortunately :) They are here, too, to a certain extent. The problem is, they can create their own rules that cost the customer a fortune,

RE: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread tedd
At 4:15 PM -0400 7/14/08, Robert Cummings wrote: Nope, banks can't round like that when calculating your daily interest :) Cheers, Rob. I do know that when it comes to interest you pay them, they round up. When it comes to interest they pay you, they round down -- and why not? A decision

Re: [PHP] Math Weirdness - Can it be done with integers alone??

2008-07-14 Thread tedd
At 4:45 PM -0400 7/14/08, Daniel Brown wrote: That's as far OT as I'm going, but it's worth noting how regulation doesn't do shit if it's not enforced. The only thing that's regulated AND enforced is what you owe the government. Don't get me started. :-) Cheers, tedd -- ---