Closed Patashu closed 5 years ago
α 1.0.1
This now works:
OmegaNum.add("ee16", new OmegaNum("ee16").neg()).toString()
"0"
But I can't make negative numbers with toString anymore:
new OmegaNum("-ee16").sign
1
new OmegaNum("-e16").sign
1
new OmegaNum("-1e16").sign
1
new OmegaNum(-1e16).sign
-1
Thonk I need to carry over... Duh. Obviously I'm not great at this.
Fixed!
break_eternity.js special cases this and you probably should too, since it holds true no matter how massive your number is. https://github.com/Patashu/break_eternity.js/blob/master/break_eternity.js#L1198
EDIT: Actually, the root cause might be an off by one error when computing layer 1 or higher negative numbers vs computing positive numbers:
Obviously both should be layer 1.
Actually, this bug might be independent, because even if we do a neg instead of construct from string:
yet: