-
Notifications
You must be signed in to change notification settings - Fork 442
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
GmpCalculator multiply: gmp_init() error when fractional part with leading 0 #286
Comments
I think a similar issue has already be raised here: #278 Just for curiousity: what made you using the calculator directly? As far as I know it works well with the money object. @frederikbosch since this issue keeps coming back, maybe we should do something about it. Put some lines in the docs, even throw an exception somewhere? |
@sagikazarmark no it didn't work with the money object too. But by default money object uses bcmath and this error occurs when bcmath is not installed. e.g.: Money::registerCalculator(\Money\Calculator\GmpCalculator::class);
(new Money(1000, new Currency('USD')))->multiply(0.029); will throw the error |
@Michael-vb This has been fixed in the latest master. |
Thanks for reporting. |
@frederikbosch thank you! I've seen. Just answered the previous question |
The text was updated successfully, but these errors were encountered: