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

BigComplexMath#sqrt fails when x is a negative real number #71

Open
Onedy opened this issue Apr 22, 2024 · 0 comments
Open

BigComplexMath#sqrt fails when x is a negative real number #71

Onedy opened this issue Apr 22, 2024 · 0 comments

Comments

@Onedy
Copy link

Onedy commented Apr 22, 2024

public static BigComplex sqrt(BigComplex x, MathContext mathContext) {

This fails when x is a negative real number because you are dividing (x+abs(x))/abs(x+abs(x)) which is 0/0.

Maybe these are helpful: https://mathworld.wolfram.com/SquareRoot.html and org.apache.commons.numbers.complex.Complex#sqrt() from org.apache.commons:commons-numbers-complex.

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