Brett Parker wrote:
Can I make a simple suggestion...
Rather than doing the maths in the order that you have in $x do: $x = 10.7 * 15 * 0.01;
I.e. you're doing the division at the end, rather than the beginning, and so the float is "more accurate".
Ah, good point. That's probably why I don't see this all that often; I normally do things that way around for precisely that reason.
Given that the price (10.7) will always be to a maximum of 2 decimal places, how confident can I be that I won't find other cases that fail even though this one now works?