Skip to content

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

@hackerb9

Description

@hackerb9

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions