moved approx function to RocketScience.