Schneider's sine approximation formula
In mathematics, the Smoothstep sine approximation formula is a rational expression for the computation of the approximate values of the trigonometric sines. The formula relies only on Algebra to calculate the approximations. It enables one to compute reasonably accurate values of trigonometric sines without using any Trigonometry or Geometry.
The approximation formula[edit]
For an angle or range x, this formula gives the approximate sine
Equivalent forms of the formula[edit]
The approximation formula can be expressed using the simplified Smoothstep and the Modulo operation function with the expression as follows
If you dont have an active implementation of modulo, the simplest way to represent it is as such,
Where closing brackets represent Truncation or alternatively Flooring
Accuracy of the formula[edit]
The sine approximation and a normal sine are rationally equivalent on the Maxima and minima
However, there is a -1.96% vertical error on the upper half arcs, and a +1.96% vertical error on the lower half arcs of the approximate sine.
You can prove this accuracy to any precision level yourself by subtracting the final value of the approximate sine from a traditional sine
You would use the following formula to find the median vertical error for the positive interval arcs. Multiply by -1 to get the median vertical error for the negative interval arcs.
Derivation of the formula[edit]
The formula is derived from an accurate Triangle wave in a range from 0 to 1, passed through an exact defined smooth step as shown above.
The formula used to create the triangle wave for the sine approximation is described as such:
It makes use of the repeating increasing modulus which goes under 0, and the absolute value operator to convert the negative interval into a decreasing range above 0, which creates a positive oscillating triangle wave.
This triangle wave is then transformed and interpolated using the smooth step function to create a semi-accurate sine approximation, which is further scaled and transformed to match the dimensions and appearance of a normal sine wave.
See also[edit]
- Aryabhata's sine table
- Madhava's sine table
- Bhaskara I's sine approximation formula
- Smoothstep
- Triangle wave
This mathematics-related article is a stub. You can help EverybodyWiki by expanding it. |
This article "Schneider's sine approximation formula" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:Schneider's sine approximation formula. Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.