Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Python code to solve Kepler’s equation
- from numpy import sqrt, cbrt, pi, sin, cos, arcsin, random
- # This will solve the special form of the cubic we need.
- def solve_cubic(a, c, d):
- assert(a > 0 and c > 0)
- p = c/a
- q = d/a
- k = sqrt( q**2/4 + p**3/27 )
- return cbrt(-q/2 - k) + cbrt(-q/2 + k)
- for more:https://bestcash2020.com/Mqz9m
Advertisement
Add Comment
Please, Sign In to add comment