-
Notifications
You must be signed in to change notification settings - Fork 441
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
Something is wrong with the compare method in Calculator #278
Comments
Why would you want that in a |
The same story is true for almost any |
Also relevant in this thread is the GMP Floating Point Support RFC. |
We could probably throw a logic exception when doing operations with Frederik Bosch [email protected] ezt írta (2016. október 1.,
|
@sagikazarmark I think we should just leave it. If there is no |
Well, I agree. Honestly, I am not sure I completely understood the problem. However, if there is a leak in the API which easily leads to errors like this AND fixing them requires an API change we should do something. Again: not sure if this is the case. |
when doing
divide
, it'll call the calculator to verify the divisor (cast to string first) isn't zero.from what I see, the compare method in BcMathCalculator doesn't have scale as third parameter.
bccomp($a, $b)
which makes
bccomp("0.5", 0) === 0
: "Returns 0 if the two operands are equal"if use GmpCalculator instead,
ErrorException: gmp_cmp(): Unable to convert variable to GMP - string is not an integer
The text was updated successfully, but these errors were encountered: