Add `isInteger` method to Decimal
Closed this issue · 2 comments
castarco commented
It's very useful to check if a number is an integer number in order to properly handle cases where we apply pow
on negative numbers.
codisart commented
Hi,
I propose to check this condition with a regex. It would return false if a point was present in $this->value and if it was followed by a number different from 0 and true if not.
castarco commented
Hi @punkka, I did it yesterday, in another branch (TheBigInfiniteFix
), because I'm changing a lot of things.
Commit 16d7ec5 .
P.D.: I'm wondering if we can chat sometime, maybe using the Gitter channel (https://gitter.im/Litipk/php-bignumbers), I have many ideas, but those ideas imply big changes and i don't want to interfere on other's people work, so maybe it's a good idea to synchronize our work.