Program to calculate root of cubics
Posted: Wed Jul 22, 2020 11:27 am
Hi all,
had a bit of time on my hands and so I wrote something i wanted to implement for a while now, namely a program to calculate the roots of cubic expressions (by Cardano's method). Now I've written it, I am not entirely sure if I'm doing everything right. I added a check for the results at the end, and I regularly get results on the order of 1e-16. Is that entirely down to my non-optimized programming? Or did I get something wrong?
had a bit of time on my hands and so I wrote something i wanted to implement for a while now, namely a program to calculate the roots of cubic expressions (by Cardano's method). Now I've written it, I am not entirely sure if I'm doing everything right. I added a check for the results at the end, and I regularly get results on the order of 1e-16. Is that entirely down to my non-optimized programming? Or did I get something wrong?