Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17389

Export cubic equation formulas to code in Python

$
0
0

I'm writing code for the method to solve this cubic equation. I use python's math library.

(float)(-b+pow(pow(b,3)-27*pow(a,2)*d,1/3))/3*a;(float)((math.sqrt(delta))/(3*a))*((pow(abs(k)+math.sqrt(pow(k,2)+1),1/3))+(pow(abs(k)-math.sqrt(pow(k,2)+1),1/3)))-(b/(3*a));

Below are pictures of 2 math formulas I need to solve:

formula 1

formula 2


Viewing all articles
Browse latest Browse all 17389

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>