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

[feature request] nth root and delete history #26

Open
stujoult opened this issue Nov 16, 2024 · 2 comments
Open

[feature request] nth root and delete history #26

stujoult opened this issue Nov 16, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@stujoult
Copy link

I don't know how to write cube root and the other nth root.
And a button to clear all calculations history.

@alexbarry
Copy link
Owner

Hi! nth root is just raising something to the power of 1/n, so I didn't originally add a separate button (but I could!). And currently if you press "alt" and then the "clear scr[ee]n" button (which will appear in place of the "clear" button), it will clear all the calculations history displayed on the screen-- though they will remain in your history, and appear as your input if you press "up".

Cube and nth root

Given that, should I still add a cube root and nth root button? If your goal is just to get a nice looking LaTeX equation, I could add a feature that shows cube or nth root if you raise something to the power of 1/n. But I realize it's cumbersome to have to type ^(1/3), so a separate button makes sense.

Where would make sense to put it? My initial thought is if you press "alt" then the "sqrt" button becomes cube root, perhaps abbreviated as "cbrt" though that isn't very standardized. And maybe the "ln" button could become "nth root", though again I'm not sure what a nice abbreviation would be. And I forget how this worked on previous calculators that I used, would you enter your exponent, the "nth root" operator, then the thing you want to take the nth root of? I think this means I would have to add a new operator instead of just using a function, but that isn't too hard.

Clear calculations history

Just to confirm, you don't just want to hide the visible previous inputs/outputs by pressing the "clear scrn" button, but actually erase them from the storage? The only user visible effect is that if you press "up" then they wouldn't be there anymore. My feeling is that this happens rarely, so rather than have a dedicated calculator button, I could put this in the options. And since it couldn't be reversed, I would add a prompt like "are you sure?". Does that sound good?

@alexbarry alexbarry added the good first issue Good for newcomers label Nov 16, 2024
@stujoult
Copy link
Author

I don't think new button for cube and nth root is necessary as long as \sqrt[3]{27} = 3, or\sqrt[4]{256} = 4. Or something like that.

Just to confirm, you don't just want to hide the visible previous inputs/outputs by pressing the "clear scrn" button, but actually erase them from the storage?

Yes. I might be paranoid but I had experience on Linux that my bash history exceeded 1GiB.

Does that sound good?

Good enough for me.

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

No branches or pull requests

2 participants