Traceback most recent call last File run py line 19 in module fourth_s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Traceback (most recent call last):
File "./run.py", line 19, in <module>
fourth_solver.FourthSolver(number).run_forever()
File "/home/sergey/dev/icfpc09/orbit/first_solver.py", line 105, in run_forever
self.run()
File "/home/sergey/dev/icfpc09/orbit/fourth_solver.py", line 56, in run
inputs = controller.get_outputs(x, oports)
File "/home/sergey/dev/icfpc09/orbit/controller4.py", line 151, in get_outputs
return BaseController.get_outputs(self, x, inputs)
File "/home/sergey/dev/icfpc09/orbit/controller.py", line 372, in get_outputs
return self.state()
File "/home/sergey/dev/icfpc09/orbit/controller4.py", line 88, in real_refuel
h2,e2,phi2,self.sxt,self.syt,self.prev_sxt,self.prev_syt)
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 120, in get_hohmann_elliptic_delay
t = newton_solve(func, 0)
File "/home/sergey/dev/icfpc09/orbit/equations.py", line 49, in newton_solve
if abs(xn - xk) < EPS or abs(f(xn)) < EPS:
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 113, in func
ret = phi1+pi+func_phi1(t)-phi2-func_phi2(T1/2+t)
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 105, in func_phi2
Rn,Vn = rv_from_r0v0(R,V,t)
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 327, in rv_from_r0v0
x = kepler_U(t, r0, vr0, alpha)
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 298, in kepler_U
C = stumpC(a*x**2)
File "/home/sergey/dev/icfpc09/orbit/computer.py", line 381, in stumpC
c = (1 - cos(sqrt(z)))/z
ValueError: math domain error