Approximate solution valid only for small eccentricity.
double kepler4(double e, double m) { return math.atan2(math.sin(m), math.cos(m) - e); }