break_eternity.js
break_eternity.js copied to clipboard
different results when expexting the same result
I tried 'ee4e-1' and 'ee0.4' in break_eternity.min.js(call it BEm.js), I got the following results:
what the fuck is that?
(in the representation of BEm.js, it is about 5.918804334257232e-317 and 325.0022978095479, 300+ OoMs' difference)
break-eternity.js has the same problem
Just
Why would someone use like ee0.4
?
If we handled every possible notation like this one we'd surfer from performance issuses - parsing strings is already one of the slowest things in B_E
What if some notation uses it?
This probably comes from the way break_eternity handles negative exponents in strings. To ensure that, say “(e^100)-1” can be written to mean the reciprocal of “(e^100)1” (because that’s more useful behavior than what it would do if interpreted “correctly” - if interpreted correctly, writing the reciprocal of “(e^100)1” would require writing “e-eeeee….1” with 99 e’s after the negative sign), break_eternity takes negative signs anywhere above the base of the power tower and assumes they’re meant to apply to the first (i.e. the lowest non-base) exponent of the tower.
…although, interpreted in that way, “ee4e-1” would mean “e-e40”, which should have mag -40 and layer 2…