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

Theory reference #1

Open
Hanlin-Dong opened this issue Jan 30, 2023 · 8 comments
Open

Theory reference #1

Hanlin-Dong opened this issue Jan 30, 2023 · 8 comments

Comments

@Hanlin-Dong
Copy link

Hi, thanks a lot for publishing such a beautiful code. I'm wondering what book or article gives the theory that you write this code?

@BaseMax
Copy link
Owner

BaseMax commented Jan 30, 2023

Heya Hanlin, This project is for year ago so I think i used available projects and other software, and a few science articles.

P.S: My education field is Pure Mathematics and I am doing research at the University. Feel free to say me if there is any kind of errors or problems in the code.

Department of Pure Mathematics, Faculty of Mathematical Sciences,
University of Kashan, Kashan 87317-53153, I. R. Iran

@Hanlin-Dong
Copy link
Author

Hi BaseMax, thanks for the reply. There's no problem at all. I just wanted to know how the expressions are derived. I found the Cardano fomula, but the expressions in your code look much prettier. So I wished if you could tell me where to find articles teaching how to derive these expressions. It's okay if time is too long and you cannot remember where to find them. Thank you.

@BaseMax
Copy link
Owner

BaseMax commented Jan 30, 2023

Hi Hanlin, I will search about it later and try to see if I can find out it... I need to check the project again.

For your side, Maybe it's easier to explore the cubic version of this program: https://github.com/BaseMax/CubicEquationCalculator

@Hanlin-Dong
Copy link
Author

Hi BaseMax, I tried to write some code on solving cubic equations these days, and also tried your code. However, I found that its result is sometimes wrong when the equation have three real roots. For example, when the coefficients are [1., 800., 3600., 1.], the correct answer should be around [-795, -4.53, -0.000278]. However, the results from your function is [132, -262, 130]. (Run with node v14). Just a report for this issue. Thanks.

@BaseMax
Copy link
Owner

BaseMax commented Feb 5, 2023

Hi Hanlin, Can you provide more details about the issue you are referring to?

Thanks in advance.

@Hanlin-Dong
Copy link
Author

The function just return incorrect answers, as I described above. After some debug, I found that it may be caused by the cut-off errors in the arccos calculation.

@Hanlin-Dong
Copy link
Author

My last comment was incorrect. I have found a bug in the code and pulled a request.

@BaseMax
Copy link
Owner

BaseMax commented Feb 6, 2023

Thanks, Hanlin-Dong@59188cf.

Please send a Pull Request when the patch is ready.

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

2 participants