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

(-8)^(1/3) ≠ -2 and wrong plots for ^(1/3) #201

Open
mbartelsm opened this issue Dec 16, 2019 · 2 comments
Open

(-8)^(1/3) ≠ -2 and wrong plots for ^(1/3) #201

mbartelsm opened this issue Dec 16, 2019 · 2 comments

Comments

@mbartelsm
Copy link

mbartelsm commented Dec 16, 2019

Title.
On input (-8)^(1/3) I get 1 + 1.7320508076i but it should be -2, in fact, it shouldn't even have an imaginary part, regardless of the value of the base.

When plotting the function x^(1/3) I get the following plot:

Screenshot_2019-12-16-12-12-57-896_org solovyev android calculator

Which is entirely wrong.

Redmi 4X running Android 7.1.2

@shadow00
Copy link

Yep, I can replicate this issue on a couple of different devices.

I get a warning that says "Complex number computation in non-RAD mode can lead to unexpected results!".
If I click "Close" I get 1.9996659589+0.0365520553i (with angles in degrees); if I click "Fix" (thus setting angles in radians) I get the same result as OP.

@MithicSpirit
Copy link

That is the correct result as it is using the principal root instead of the real-valued root. Would be nice to have an option to prioritize the real-valued root though (also would be a more sensible default).

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