php-bignumbers icon indicating copy to clipboard operation
php-bignumbers copied to clipboard

abs method doesnt work with long negative numbers.

Open bnd170 opened this issue 5 years ago • 0 comments

got this value -2.689785E + 23 and i need convert it to absolute before work with him.

When abs method is used, it returns 0. I was checking why and it's about that abs checks if number is zero before call additiveInverse, that method also check if value is zero.

The scale with that number is -1 automaticaly, then the check of isZero always returns true.

bnd170 avatar Oct 25 '19 08:10 bnd170