Coder-Spirit / php-bignumbers

A robust library to handle immutable big numbers inside PHP applications
MIT License
131 stars 29 forks source link

Fix of the rounding error for negative numbers. #31

Closed codisart closed 9 years ago

codisart commented 9 years ago

as showed in the issue #30.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling a9a28af06fda4db4cc1b742de016be5afd4d22fb on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling a9a28af06fda4db4cc1b742de016be5afd4d22fb on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling a9a28af06fda4db4cc1b742de016be5afd4d22fb on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

codisart commented 9 years ago

It seems that the cos test has an error. WolframAlpha give me -0.722180643889243476826054 for the result of cos(15000000000). So the rounded value for the scale of 20 should be -0.72218064388924347683.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling bacb07c5c05d00a8ffed034f2e7c21be0dc27595 on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling bacb07c5c05d00a8ffed034f2e7c21be0dc27595 on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

coveralls commented 9 years ago

Coverage Status

Coverage increased (+0.02%) to 96.26% when pulling bacb07c5c05d00a8ffed034f2e7c21be0dc27595 on punkka:rounding-fix into d47cf150878ba3bc9a477acc6bfefeed526103ea on Litipk:master.

castarco commented 9 years ago

Hi @punkka , thank you very much for your fix. I'll merge it this night :) .