0
Python
Please can someone help me with an algorithm on how to do complex rearrange (change of subject formula) like when you have something like this b = sqrt(b^2 - 4ac) /2a make c the subject of the formula... I came up with this idea when I create a function called change(left, right, sub) Calling the function will be change(b, div(sqrt(sub(pow(b,2),mul(4,a,c))),mul(2,a)), "c") This how I planned on receiving my data when I have function that does the add, sqrt, sub, div.. but I don't know how to go about it..
2 odpowiedzi
0
Abdullah,
You can use SymPy module of Python:
https://www.sympy.org/en/index.html
...together with Numpy -module.
Some help can be found also here:
https://stackoverflow.com/questions/50284390/rearranging-and-solving-an-equation-in-python
Edit: For me worked the power operator **, and the square root operator **(1/2)
0
What if I don't want to use any libraries?