Closed James103 closed 3 months ago
I am of the opinion that -Infinity should be {-1, Infinity, Infinity}, but break_eternity was designed with -Infinity as {-1, -Infinity, -Infinity}, so that's what it normalizes to - it just wasn't even registering as -Infinity as all when I had it normalizing to {-1, Infinity, Infinity}. I don't want to cause a breaking change, so despite my preferences, it'll remain as {-1, -Infinity, -Infinity}... so I'll probably need to make a bunch of special cases to fix it in the functions. I'll look into this at some point.
I did an immediate fix for the Eternal Notations issue (i.e. it now detects infinities in a way that sidesteps the break_eternity bug, so -Infinity works there now. Figured I'd note this here since this was kind of an Eternal Notations issue too, though I haven't looked at the actual break_eternity bug yet)
...on second thought, there are just too many strange cases that {-1, -Infinity, -Infinity} causes. I'm changing it to {-1, Infinity, Infinity} like it always should have been.
new Decimal(Infinity)
returns a Decimal object with{ sign: 1, mag: Infinity, layer: Infinity }
.new Decimal(Infintiy).negate()
returns a Decimal object with{ sign: -1, mag: Infinity, layer: Infinity }
. Normalizing this withnew Decimal(Infintiy).negate().normalize()
, I get a Decimal object with{ sign: -1, mag: -Infinity, layer: -Infinity }
. Runningnew Decimal(-Infinity)
directly also returns a Decimal object with{ sign: -1, mag: -Infinity, layer: -Infinity }
.Either the normalization of
new Decimal(-Infinity)
should be a Decimal object with{ sign: -1, mag: Infinity, layer: Infinity }
, or functions operating on Decimals should be changed to handle Decimals consisting of{ sign: -1, mag: -Infinity, layer: -Infinity }
.Originally found in https://mathcookie17.github.io/Eternal-Notations/, by navigating to that page, opening a browser console for that page, and running the command
formatAll(new Decimal(-Infinity))
there.