You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is all in shared_bc.js which might be in need of an update. If you want to contribute please add a failing testcase ton the header of bcsub and run
Thanks for reporting, and sorry for the long wait. This project and my motivation were in a bad spot. I recently did a lot of work to breathe new life into it (http://locutus.io/2016/05/announcing-locutus/). As part of this I'm going over all issues and PRs now. It seems this issue was resolved in the big push, so I'm closing this : )
In PHP, the following code results in 0.018, which is correct:
$bcResult = bcsub(0.03, bcmul(0.03, 0.40, 3), 3);
var_dump($bcResult);
However, in PHPJS, that same code returns 0.001, which is incorrect:
var bcResult = bcsub(0.03, bcmul(0.03, 0.40, 3), 3);
console.debug(bcResult);
I have tested and bcmul for PHPJS works fine (i.e. the above bcmul(0.03, 0.40, 3) is correct). The problem is when doing the bcsub.
The text was updated successfully, but these errors were encountered: