Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

different results when expexting the same result #150

Open
1231234md5 opened this issue Feb 3, 2023 · 5 comments
Open

different results when expexting the same result #150

1231234md5 opened this issue Feb 3, 2023 · 5 comments

Comments

@1231234md5
Copy link

1231234md5 commented Feb 3, 2023

I tried 'ee4e-1' and 'ee0.4' in break_eternity.min.js(call it BEm.js), I got the following results:
image
what the fuck is that?
(in the representation of BEm.js, it is about 5.918804334257232e-317 and 325.0022978095479, 300+ OoMs' difference)

@1231234md5
Copy link
Author

break-eternity.js has the same problem

@jakub791
Copy link

jakub791 commented Feb 3, 2023

Just
Why would someone use like ee0.4?

@jakub791
Copy link

jakub791 commented Feb 3, 2023

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

@1231234md5
Copy link
Author

What if some notation uses it?

@MathCookie17
Copy link
Collaborator

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…

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

No branches or pull requests

3 participants