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

BC Math requirement #156

Closed
rik-coenders opened this issue Aug 11, 2016 · 5 comments
Closed

BC Math requirement #156

rik-coenders opened this issue Aug 11, 2016 · 5 comments
Assignees

Comments

@rik-coenders
Copy link

Version 10.1.0 uses the function bccomp (http://php.net/manual/en/function.bccomp.php) from BC Math in the file src\Google\Api\Ads\AdWords\Util\XmlSerializer.php
This function only works with BC Math enabled, which is not default in php. The requirement for BC Math is not documented in the README file, and seems unnecessary, because this problem could easily be solved in a way not requiring BC Math.

@fiboknacky
Copy link
Member

Hello,

Sorry for late response.
I'll take a look as soon as possible.

Knack

@janakprajapati
Copy link

Hi Knack,

Any updates on the issue? or is there any alternate way which we can use to prevent the error?

Thanks,
Janak

@hakimio
Copy link

hakimio commented Aug 29, 2016

@janakprajapati
bccomp is a rather simple function. If you don't want or can't use PHP BC Math extension, you can simply introduce the function in your code:
https://github.com/yuloh/bccomp-polyfill

@fiboknacky
Copy link
Member

Hi @janakprajapati

The reason why we decided to use bccomp was because PHP doesn't handle some of the edge cases when numbers are so large correctly.
Therefore, we need more accurate computation for that.

I'll discuss with my colleague to see what it's the best in this case.
Sorry for your inconvenience.

@hakimio
Thanks for your comment!

Knack

@fiboknacky
Copy link
Member

Fixed in v13.1.0

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

4 participants