combmag-zz / jquery-formatcurrency

Automatically exported from code.google.com/p/jquery-formatcurrency
GNU Lesser General Public License v3.0
2 stars 0 forks source link

Found an error. 9.45 is converted to 9.44 after apllying your function. #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
even in your online demo this problem occurs.

Original issue reported on code.google.com by rodrigo....@gmail.com on 21 Jun 2009 at 7:04

GoogleCodeExporter commented 9 years ago
Interesting bug, it works for things like 10.45 and 12.45, but not for 9.45.  
I'll 
investigate/add a unit-test and fix asap.

Thanks

Original comment by bdewe...@hotmail.com on 23 Jun 2009 at 3:14

GoogleCodeExporter commented 9 years ago
Running into same issue, with 1.30 converts to 1.29..

Original comment by antivan...@gmail.com on 27 Jul 2009 at 6:03

GoogleCodeExporter commented 9 years ago
Any update on this issue? I'm seeing similar behavior where 19.99 is converted 
to
19.98. This happens on FF2 and IE6.

Original comment by lsher...@gmail.com on 29 Jul 2009 at 12:15

GoogleCodeExporter commented 9 years ago
Changing line 77 to the following seems to fix my rounding error:

            num = Math.round(num * 100);

Original comment by lsher...@gmail.com on 30 Jul 2009 at 11:59

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Confirming Isherrod's fix also is working for me.

Original comment by jjlang...@gmail.com on 1 Oct 2009 at 7:17

GoogleCodeExporter commented 9 years ago
Isherrod's change works for me also.

Original comment by james.sc...@gmail.com on 21 Oct 2009 at 3:56

GoogleCodeExporter commented 9 years ago

Original comment by bdewe...@hotmail.com on 29 Oct 2009 at 7:36

GoogleCodeExporter commented 9 years ago

Original comment by bdewe...@hotmail.com on 28 Nov 2009 at 3:14