Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

abs method doesnt work with long negative numbers. #70

Open
bnd170 opened this issue Oct 25, 2019 · 0 comments
Open

abs method doesnt work with long negative numbers. #70

bnd170 opened this issue Oct 25, 2019 · 0 comments

Comments

@bnd170
Copy link

bnd170 commented Oct 25, 2019

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant