If you believe only integers exist, you're welcome to proverbially blow your mind by the fact that there exist several simple algorithms of
extracting digits of Pi –– in hexadecimal, base 16. For example,
David H. Bailey and Helaman Ferguson discovered in 1997 a formula they called PSLQ:
$$\pi = \sum_{k=0}^{\infty} \frac{1}{16^k} \left( \frac{4}{8 k + 1} - \frac{2}{8 k + 4} - \frac{1}{8 k + 5} - \frac{1}{8 k + 6} \right)$$
where each term \$k\$ defines exactly one hexadecimal digit of \$\pi\$.
In general, this subfield is described as
"finding integer relations among more than two numbers".
In the physical sense, more than 52 or so hex digits is unnecessary precision, because the diameter of the universe is about 5.4×10
61 Planck length units, and there is nothing physically larger nor more precisely measurable. For computation, especially for intermediate results, more precision is often useful, of course.
The key realization is that just because you cannot write the exact value down in any base, does not mean it isn't a specific value: it is only
unwritable, but not unexpressible. It is perfectly acceptable to define say \$x = \sqrt{5}\$, because there are many formulae where you only ever need \$x^2 = 5\$.
A particular example is Euclidean distances. In \$N\$ dimensions, the distance \$d\$ from origin to point \$(x_1, x_2, \dots, x_{N-1}, x_N)\$ is \$d = \sqrt{x_1^2 + x_2^2 + \dots + x_{N-1}^2 + x_{N}^2} = \sqrt{\sum_{i=1}^{N} x_i^2}\$. In many subfields of physics, especially those dealing with lattices, we can determine certain useful properties of materials by just examining the various possible distances between lattice points. Numerically, it is preferable to do this using functions that return
the distance squared, which in a lattice is an integer, because that way we avoid rounding errors. (Essentially, if you examine a \$(2 L)^N\$ cuboid of points, or rather an \$1/2^N\$ positive cuboid of that with \$L^N\$ lattice points, you get the lattice point distance distribution for distances not exceeding \$L\$, and the points above that distance are discarded. You save potentially a lot of time (when \$N\$ is large) by only doing the square root operation for display purposes, i.e. when showing the distance histogram.)
Same applies to many cases in 3D computer graphics, especially raycasting and raytracing. For example, if you're interested in ray-cylinder (right circular cylinder) intersections, check out the formulae at my
Wikipedia user page (from 2010); in many cases the square root operation can be omitted. Note that these formulae are so simple only because the origin of the ray (ie. the focal point of the camera or the eye of the viewer) is at origin!
Because square root is a monotonically increasing function for nonnegative distances, one can use a
z-buffer containing squared distances instead of distances themselves, without any effect on the resulting visuals.