This post is pretty much automatically generated + copy-n-paste.

In my last post I more or less assumed everyone is at least passingly familar with polymomial approximations of sine and cosine on a narrow range. And approximating concentric square to disc is only interesting if you don’t have fast hardware sine and cosine.

## Example of approximate concentric

A straight forward implementation of concentric with approximations might look like this:

The area distortion of the approximate equal area method from the previous post:

Which almost all outside the plot range here. Now concentric with sine and cosine approximated using 2 terms, minimizing relative error and clamped to correct at end-points (sin2c and cos2c below):

and now using square root instead of cosine:

Which is a nice improvement (the approx sin squared + cos squared != 1 is corrected). Change the sine approximation to 3-terms (still root for cosine):

Using the scale of the previous plots this would be all white.

## Spewed out approximations

Here are some low rank approximations of sine and cosine. The non ‘c’ variant are minimax polynomials and the ‘c’ variants are sloppy end-point contrained. These were generated with this (script). All of the approximations are for minimizing relative error, but the error plots below are abs error (my sollya base scripts need some work). The awkward form of the functions is to be bit exact singles.

\begin{align} sin_{2c} \left(\frac{\pi x}{4}\right) & =13171413 \times 2^{-24} x-5232519 \times 2^{-26} x^{3}\\ sin_{2} \left(\frac{\pi x}{4}\right) & =13171413 \times 2^{-24} x-10503801 \times 2^{-27} x^{3}\\ sin_{3c} \left(\frac{\pi x}{4}\right) & =13176775 \times 2^{-24} x-2708675 \times 2^{-25} x^{3}+2614125 \times 2^{-30} x^{5}\\ sin_{3} \left(\frac{\pi x}{4}\right) & =13176775 \times 2^{-24} x-2708675 \times 2^{-25} x^{3}+5230543 \times 2^{-31} x^{5}\\ sin_{4c} \left(\frac{\pi x}{4}\right) & =13176795 \times 2^{-24} x-5418747 \times 2^{-26} x^{3}+668505 \times 2^{-28} x^{5}-4969345 \times 2^{-37} x^{7}\\ sin_{4} \left(\frac{\pi x}{4}\right) & =13176795 \times 2^{-24} x-5418747 \times 2^{-26} x^{3}+668505 \times 2^{-28} x^{5}-9940169 \times 2^{-38} x^{7}\\ \end{align}
\begin{align} cos_{2c} \left(\frac{\pi x}{4}\right) & =16739113 \times 2^{-24}-2437915 \times 2^{-23} x^{2}\\ cos_{2} \left(\frac{\pi x}{4}\right) & =16739113 \times 2^{-24}-9805545 \times 2^{-25} x^{2}\\ cos_{3c} \left(\frac{\pi x}{4}\right) & =8388509 \times 2^{-23}-5171259 \times 2^{-24} x^{2}+16481549 \times 2^{-30} x^{4}\\ cos_{3} \left(\frac{\pi x}{4}\right) & =8388509 \times 2^{-23}-5171259 \times 2^{-24} x^{2}+4122623 \times 2^{-28} x^{4}\\ cos_{4c} \left(\frac{\pi x}{4}\right) & =16777215 \times 2^{-24}-10348991 \times 2^{-25} x^{2}+4254515 \times 2^{-28} x^{4}-341983 \times 2^{-30} x^{6}\\ cos_{4} \left(\frac{\pi x}{4}\right) & =16777215 \times 2^{-24}-10348991 \times 2^{-25} x^{2}+4254515 \times 2^{-28} x^{4}-10944157 \times 2^{-35} x^{6}\\ \end{align}

The inline function defs generated by the script: