# Is the constant pi (not Raspberry) ever used in general computer science?

Is the constant pi (not Raspberry) ever used in general computer science? If so, how so or when is it applicable?

The $$\pi$$ constant is not used in theoretical computer science due to some intrinsic value or utility of the constant itself. However, it is (obviously) used in the simulations of physical systems or mathematical equations in which it appears. Precisely for this reason, one of the efforts that computer scientist and mathematicians have made in this regard was to identify new methods and algorithms to be able to generate as many digits of its decimal expansion as possible.

If today we know $$\pi$$ up to 31.4 trillion decimal places we owe it to the computational power of electronic systems.

• but very often you don't need more than a few dozen digits because the rest of the input isn't not as precise either Nov 28 '19 at 13:54
• @Yamar69 How about in general computer-related fields or non-theoretical means? Like computer engineering or architecture? Nov 28 '19 at 14:13
• @BrandonCasas I'm not aware of any use in all CS related fields and I never encoutered it in the literature. Nov 28 '19 at 16:18
• "Precisely for this reason, ..." -- is there any evidence for this? I'd imagine that much smaller precision is perfectly fine.
– Juho
Nov 29 '19 at 13:02

One assumption that is often used by researchers in the wireless sensor networks community is to model the region of coverage of a transmitter node as a circle (of unit radius, say) centered at that node. The graph representing such a network is called a unit disk graph because the vertices of the graph correspond to certain locations in the plane, and two vertices are joined by an edge if and only if unit disks centered at those locations intersect. You can search the literature for "unit disk graphs" - my guess is that pi shows up many papers that investigate theoretical bounds or guarantees on the performance of such networks.

$$\pi$$ does show up in the fast Fourier transform, which is a central algorithm in many areas of computer science.