> I think I found an issue:
> 
> float_round(17.3544, precision_rounding=0.01)
> 17.35

That's the expected result as far as I can see. Perhaps you meant to test with 
precision_rounding=0.1, in which case you'll indeed end up with 17.4, which is 
correct. You can confirm with Decimal if you're not sure:

 >>> from decimal import Decimal, ROUND_HALF_UP
 >>> Decimal('17.3544').quantize(Decimal('0.01'),rounding=ROUND_HALF_UP)
 Decimal('17.35')
 >>> Decimal('17.3544').quantize(Decimal('0.1'),rounding=ROUND_HALF_UP)
 Decimal('17.4')
 >>> 

Anyway the code still needs to be updated to cover more tricky half-up cases, 
as discussed on bug 882036.
-- 
https://code.launchpad.net/~openerp-dev/openobject-server/trunk-float-rounding-odo/+merge/82206
Your team OpenERP R&D Team is subscribed to branch 
lp:~openerp-dev/openobject-server/trunk-float-rounding-odo.

_______________________________________________
Mailing list: https://launchpad.net/~openerp-dev-gtk
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~openerp-dev-gtk
More help   : https://help.launchpad.net/ListHelp

Reply via email to