#this program finds points on the correlation length y-axis given that the equation can't explicitly be solved for TN/J

import scipy.optimize as so
import math

lengths = [2,3,5,10,20,50,100,200,500,1000,5000,10000]

#return answer - length to make sure the 'root' is zero, to satisfy the requirements of http://www.scipy.org/doc/api_docs/SciPy.optimize.minpack.html#bisection
def correl(TNJ):
    return 0.498*math.exp(1.131/TNJ)*(1-0.44*TNJ)-length

for length in lengths:
    print length,so.bisect(correl,1e-2,1)