\[0 \leq x \land x \leq 0.5\]
\[\cos^{-1} \left(1 - x\right)
\]
↓
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
t_1 := {t_0}^{6}\\
\frac{\frac{\mathsf{fma}\left({\pi}^{6}, {\pi}^{6} \cdot 0.000244140625, t_1 \cdot \left(-t_1\right)\right)}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left(t_1 + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
(FPCore (x) :precision binary64 (acos (- 1.0 x)))
↓
(FPCore (x)
:precision binary64
(let* ((t_0 (asin (- 1.0 x))) (t_1 (pow t_0 6.0)))
(/
(/
(fma (pow PI 6.0) (* (pow PI 6.0) 0.000244140625) (* t_1 (- t_1)))
(*
(fma (pow PI 3.0) 0.125 (pow t_0 3.0))
(+ t_1 (* (pow PI 6.0) 0.015625))))
(+ (* (* PI PI) 0.25) (* t_0 (fma PI 0.5 t_0))))))double code(double x) {
return acos((1.0 - x));
}
↓
double code(double x) {
double t_0 = asin((1.0 - x));
double t_1 = pow(t_0, 6.0);
return (fma(pow(((double) M_PI), 6.0), (pow(((double) M_PI), 6.0) * 0.000244140625), (t_1 * -t_1)) / (fma(pow(((double) M_PI), 3.0), 0.125, pow(t_0, 3.0)) * (t_1 + (pow(((double) M_PI), 6.0) * 0.015625)))) / (((((double) M_PI) * ((double) M_PI)) * 0.25) + (t_0 * fma(((double) M_PI), 0.5, t_0)));
}
function code(x)
return acos(Float64(1.0 - x))
end
↓
function code(x)
t_0 = asin(Float64(1.0 - x))
t_1 = t_0 ^ 6.0
return Float64(Float64(fma((pi ^ 6.0), Float64((pi ^ 6.0) * 0.000244140625), Float64(t_1 * Float64(-t_1))) / Float64(fma((pi ^ 3.0), 0.125, (t_0 ^ 3.0)) * Float64(t_1 + Float64((pi ^ 6.0) * 0.015625)))) / Float64(Float64(Float64(pi * pi) * 0.25) + Float64(t_0 * fma(pi, 0.5, t_0))))
end
code[x_] := N[ArcCos[N[(1.0 - x), $MachinePrecision]], $MachinePrecision]
↓
code[x_] := Block[{t$95$0 = N[ArcSin[N[(1.0 - x), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 6.0], $MachinePrecision]}, N[(N[(N[(N[Power[Pi, 6.0], $MachinePrecision] * N[(N[Power[Pi, 6.0], $MachinePrecision] * 0.000244140625), $MachinePrecision] + N[(t$95$1 * (-t$95$1)), $MachinePrecision]), $MachinePrecision] / N[(N[(N[Power[Pi, 3.0], $MachinePrecision] * 0.125 + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision] * N[(t$95$1 + N[(N[Power[Pi, 6.0], $MachinePrecision] * 0.015625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(Pi * Pi), $MachinePrecision] * 0.25), $MachinePrecision] + N[(t$95$0 * N[(Pi * 0.5 + t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\cos^{-1} \left(1 - x\right)
↓
\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
t_1 := {t_0}^{6}\\
\frac{\frac{\mathsf{fma}\left({\pi}^{6}, {\pi}^{6} \cdot 0.000244140625, t_1 \cdot \left(-t_1\right)\right)}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left(t_1 + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 57.2 |
|---|
| Cost | 149632 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{\frac{\mathsf{fma}\left({\pi}^{6}, 0.000244140625 \cdot \sqrt{{\pi}^{12}}, -{t_0}^{12}\right)}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({t_0}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 2 |
|---|
| Error | 57.2 |
|---|
| Cost | 143232 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{\frac{\mathsf{fma}\left({\pi}^{6}, {\pi}^{6} \cdot 0.000244140625, -{t_0}^{12}\right)}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({t_0}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 3 |
|---|
| Error | 57.2 |
|---|
| Cost | 137024 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{\frac{0.000244140625 \cdot \left({\pi}^{6} \cdot {\pi}^{6}\right) - {t_0}^{12}}{\frac{{t_0}^{6} + {\pi}^{6} \cdot 0.015625}{\frac{1}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right)}}}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 4 |
|---|
| Error | 57.2 |
|---|
| Cost | 136896 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{\frac{0.000244140625 \cdot \left({\pi}^{6} \cdot {\pi}^{6}\right) - {t_0}^{12}}{\mathsf{fma}\left({\pi}^{3}, 0.125, {t_0}^{3}\right) \cdot \left({t_0}^{6} + {\pi}^{6} \cdot 0.015625\right)}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 5 |
|---|
| Error | 57.2 |
|---|
| Cost | 78272 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{\mathsf{fma}\left(0.25 \cdot {\pi}^{2}, \pi \cdot 0.5, -{t_0}^{3}\right)}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 6 |
|---|
| Error | 57.2 |
|---|
| Cost | 78144 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{{\pi}^{3} \cdot 0.125 - \mathsf{expm1}\left(\mathsf{log1p}\left({t_0}^{3}\right)\right)}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 7 |
|---|
| Error | 57.2 |
|---|
| Cost | 71808 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{0.125 \cdot e^{3 \cdot \log \pi} - {t_0}^{3}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 8 |
|---|
| Error | 57.2 |
|---|
| Cost | 71744 |
|---|
\[\begin{array}{l}
t_0 := \sin^{-1} \left(1 - x\right)\\
\frac{{\pi}^{3} \cdot 0.125 - {\left(\sqrt[3]{t_0}\right)}^{9}}{\left(\pi \cdot \pi\right) \cdot 0.25 + t_0 \cdot \mathsf{fma}\left(\pi, 0.5, t_0\right)}
\end{array}
\]
| Alternative 9 |
|---|
| Error | 59.4 |
|---|
| Cost | 40004 |
|---|
\[\begin{array}{l}
t_0 := \cos^{-1} \left(1 - x\right)\\
t_1 := t_0 + -1\\
\mathbf{if}\;1 - x \leq 1:\\
\;\;\;\;{\left({\left({t_0}^{0.08333333333333333}\right)}^{4}\right)}^{3}\\
\mathbf{else}:\\
\;\;\;\;\frac{1 + \sqrt{{t_1}^{6}}}{{t_1}^{2} + \left(2 - t_0\right)}\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 59.4 |
|---|
| Cost | 25984 |
|---|
\[{\left(e^{\log \cos^{-1} \left(1 - x\right) \cdot 0.3333333333333333}\right)}^{3}
\]
| Alternative 11 |
|---|
| Error | 59.4 |
|---|
| Cost | 25984 |
|---|
\[{\left({\left({\cos^{-1} \left(1 - x\right)}^{0.08333333333333333}\right)}^{4}\right)}^{3}
\]
| Alternative 12 |
|---|
| Error | 59.4 |
|---|
| Cost | 19456 |
|---|
\[{\left(\sqrt[3]{\cos^{-1} \left(1 - x\right)}\right)}^{3}
\]
| Alternative 13 |
|---|
| Error | 59.4 |
|---|
| Cost | 6592 |
|---|
\[\cos^{-1} \left(1 - x\right)
\]