Open Hanlin-Dong opened 1 year ago
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
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.
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
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.
Hi Hanlin, Can you provide more details about the issue you are referring to?
Thanks in advance.
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.
My last comment was incorrect. I have found a bug in the code and pulled a request.
Please send a Pull Request when the patch is ready.
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?