diff --git a/skyfield/functions.py b/skyfield/functions.py
index <HASH>..<HASH> 100644
--- a/skyfield/functions.py
+++ b/skyfield/functions.py
@@ -1,5 +1,6 @@
 """Basic operations that are needed repeatedly throughout Skyfield."""
 
+import numpy as np
 from numpy import (
     arcsin, arctan2, array, cos, einsum, full_like,
     float_, load, rollaxis, sin, sqrt,
@@ -7,6 +8,8 @@ from numpy import (
 from pkgutil import get_data
 from skyfield.constants import tau
 
+_tiny = np.finfo(np.float64).tiny
+
 def dots(v, u):
     """Given one or more vectors in `v` and `u`, return their dot products.
 
@@ -74,7 +77,7 @@ def to_spherical(xyz):
     """
     r = length_of(xyz)
     x, y, z = xyz
-    theta = arcsin(z / r)
+    theta = arcsin(z / (r + _tiny))  # "+ _tiny" avoids division by zero
     phi = arctan2(y, x) % tau
     return r, theta, phi
Fix #<I> with a very, very small number