ZenCart 1.5.0, fresh install

I have some difference between sum of all products and subtotal amount. In last research it's 1 Swedish Krona with 0 decimal symbols (integer amounts).

BUG #1:
It caused by calculating subtotal in default currency (e.g. euro), and converting to Krona at the end.

So in abstract formula we have:

convert(price1+price2+price3) != convert(price1)+convert(price2)+convert(price3)

BUG #2:
Other bug in zen_round. It doesn't wrap all use cases of types casting. I loose 0.01 in euro on subtotal in this case:
Qty. Item Name Tax Total
1 x Disciples: Sacred Lands Linked 7.25% €96.53
1 x A Bug's Life "Multi Pak" Special 2003 Collectors Edition
Color: Green
Size: Medium
Version: 20th Century
Media Type: DVD 7.25% €39.67
2 x Microsoft IntelliMouse Explorer
Model: USB 7.25% €152.19

Subtotal: €288.38 (Should be 288.39)

Feel free to use my solution, it works perfectly for me:
PHP Code:
function zen_round($fNum$iPrec 2) {
        return empty(
$fNum) ? (int): (int)(string)(round($fNum$iPrec) * pow(10$iPrec));
    }