7 from math
import sin, cos, pi
8 except ImportError, err:
9 print "ERROR: Cannot load module: %s" % (err)
18 return sqr(y-(5.1/(4*sqr(pi)))*sqr(x)+5*x/pi-6)+10*(1-1/(8*pi))*cos(x)+10
24 print "ERROR: 2 arguments required" 26 y = branin(float(argv[0])*15-5,float(argv[1])*15)
27 f1=open(
"./results.txt",
"w+")
33 if __name__ ==
'__main__' :
36 tb = sys.exc_info()[2]
37 traceback.print_exception(e.__class__, e, tb)