- πΊπΈUnited States m.stenta
Thanks for reporting this @aathi179 (and for approving it @fjgarlin)!
This is an interesting bug, and I wonder why it works differently on Windows. I would like to get confirmation from at least one other Windows user that this is indeed an issue.
@aathi179 I wonder if you could tell me what you get when you run
bcscale()
in your environment. In Linux I get0
.I doubt that Windows defaults to something other than 0, but maybe something in your environment is setting it to something else.
Nevertheless, the fact that
bcpow()
falls back to using the scale frombcscale()
means this would be an issue in any environment with a non-zero scale. So we probably should set it explicitly to zero in our code.The other thing that comes to mind: our code falls back on using
pow()
if BCMath is not installed, butpow()
doesn't have an argument for scale. So I wonder how this might work differently without BCMath, and if there is risk of a similar issue. Sir, sorry to test with my pc now because i was already run this `bcpow(10,0,0);` code on cmd prompt. i will test with another laptop and update here. sorry for the delayed response i didn't get any response from drupal accidentally i checked this one.