scipy - One variable solver module in Python -


i'm writing code solve root in non-linear, 1 variable equation. root has in range of 0 1. code have far works floats have less 5 decimal places, wondering if knows of more precise solver module or function. (i've tried scipy.optimize.brentq, can't figure out how use it.)

from sympy import symbol, solve def find_intersection(a, ev):     x = symbol('x')     y = symbol('y')     y = (-(0.18*x + 5.87 - a)/(0.02*x-0.42))     temp_x = solve(1.35-x+1.4*y-0.33*x*y-(0.758-0.28*x)*(y)*(1-y)-(0.101+0.109*y)*(x)*(1-x)-ev, x)     value in temp_x:         if value>=0 , value<=1:             perm_x=value     return perm_x 


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -