Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent floating point accuracy loss #134

Open
pinkynrg opened this issue Aug 4, 2017 · 1 comment
Open

Prevent floating point accuracy loss #134

pinkynrg opened this issue Aug 4, 2017 · 1 comment

Comments

@pinkynrg
Copy link

pinkynrg commented Aug 4, 2017

Maybe would be nice to use Rational numbers?

calculator = Dentaku::Calculator.new
calculator.evaluate("1/3*3").to_s #0.99999999999999
@fmundaca
Copy link

fmundaca commented Oct 20, 2017

Currently i have an expresion like this c/b. C = float and B float > 0. In some cases the result isn't right. Maybe a round problem ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants