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

Graph of natural log of x, for negative x is incorrect #232

Open
hackerb9 opened this issue Nov 8, 2024 · 0 comments
Open

Graph of natural log of x, for negative x is incorrect #232

hackerb9 opened this issue Nov 8, 2024 · 0 comments

Comments

@hackerb9
Copy link

hackerb9 commented Nov 8, 2024

The underlying math library in calculator++ correctly returns complex numbers for $\ln(x)$, where $x<0$. For example,

$$\ln(-5) = \ln(5) + \pi i$$

However, the graphing part ignores complex numbers and so the graph is displayed as symmetric, $\ln(-x) = \ln(x)$, which is incorrect.

While this could be fixed by resolving issue #210, a simpler solution is to treat all numbers where the complex part is not zero as undefined, which is the traditional way logarithms were handled mathematically.

Screenshot_20241108-002309

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

1 participant