Thursday, December 12, 2024

UI Interactions & Animations Roundup #48

Some fresh hand-picked motion designs and...

CodeSOD: Ready Xor Not

Phil's company hired a contractor. It...

Ancient accurate approximation for sine

Computer scienceAncient accurate approximation for sine




This post started out as a Twitter thread. The text below is the same as that of the thread after correcting an error in the first part of the thread.

***

The following approximation for sin(x) is remarkably accurate for 0 < x < π.

The approximation is so good that you can’t see the difference between the exact value and the approximation until you get outside the range of the approximation.

Here’s a plot of just the error.

This is a very old approximation, dating back to Aryabhata I, around 500 AD.

In modern terms, it is a rational approximation, quadratic in the numerator and denominator. It’s not quite optimal since the ripples in the error function are not of equal height, but the coefficients are nice numbers.





Check out our other content

Check out other tags:

Most Popular Articles