Closed Gniller closed 5 years ago
At these numbers, subtract is really only used to check if a numbers gets below zero. So technically just returning the correct sign should do the trick for all use cases I can currently think of.
I personally use it for combat. health - damage = currenthealth. If below 0, the unit died. So if ee17 - ee18 was to return -ee17 instead of ee17, that would already do the trick.
Thanks for your report!
new Decimal("ee17").minus(new Decimal("ee18")).toString() returns "ee17" - incorrect new Decimal("ee17").minus(new Decimal("eeee17")).toString() returns "ee17" - incorrect new Decimal("ee15").minus(new Decimal("ee16")).toString() returns "1e1000000000000000" - incorrect new Decimal("e15").minus(new Decimal("e16")).toString() returns "-9.000000000000007e16" - correct