Hacker News new | ask | show | jobs
by brandmeyer 3750 days ago
Not quite Pi, but something very closely related to Pi is retained to extremely high precision in computers.

libm frequently contains 2/pi to very high precision. For example, Newlib's math library contains 476 decimal digits of 2/pi as part of its routines for calculating sine and cosine of numbers outside the range [-pi/4..pi/4].

See e_rem_pio2.c for more. Many of the open source math libraries are ultimately descended from the same root: the Sunpro fdlibm, archived at netlib: http://www.netlib.org/fdlibm/

1 comments

Here is an article how precision of Pi could affect trigonometry https://randomascii.wordpress.com/2014/10/09/intel-underesti...