\[\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
\]
↓
\[\begin{array}{l}
t_0 := {\left(\sqrt{\sqrt[3]{\mathsf{log1p}\left(\cos^{-1} \left(\frac{\mathsf{fma}\left(v, v \cdot -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)\right)}}\right)}^{3}\\
\mathsf{expm1}\left(t_0 \cdot t_0\right)
\end{array}
\]
(FPCore (v)
:precision binary64
(acos (/ (- 1.0 (* 5.0 (* v v))) (- (* v v) 1.0))))
↓
(FPCore (v)
:precision binary64
(let* ((t_0
(pow
(sqrt
(cbrt (log1p (acos (/ (fma v (* v -5.0) 1.0) (fma v v -1.0))))))
3.0)))
(expm1 (* t_0 t_0))))double code(double v) {
return acos(((1.0 - (5.0 * (v * v))) / ((v * v) - 1.0)));
}
↓
double code(double v) {
double t_0 = pow(sqrt(cbrt(log1p(acos((fma(v, (v * -5.0), 1.0) / fma(v, v, -1.0)))))), 3.0);
return expm1((t_0 * t_0));
}
function code(v)
return acos(Float64(Float64(1.0 - Float64(5.0 * Float64(v * v))) / Float64(Float64(v * v) - 1.0)))
end
↓
function code(v)
t_0 = sqrt(cbrt(log1p(acos(Float64(fma(v, Float64(v * -5.0), 1.0) / fma(v, v, -1.0)))))) ^ 3.0
return expm1(Float64(t_0 * t_0))
end
code[v_] := N[ArcCos[N[(N[(1.0 - N[(5.0 * N[(v * v), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(v * v), $MachinePrecision] - 1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]
↓
code[v_] := Block[{t$95$0 = N[Power[N[Sqrt[N[Power[N[Log[1 + N[ArcCos[N[(N[(v * N[(v * -5.0), $MachinePrecision] + 1.0), $MachinePrecision] / N[(v * v + -1.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]], $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision], 3.0], $MachinePrecision]}, N[(Exp[N[(t$95$0 * t$95$0), $MachinePrecision]] - 1), $MachinePrecision]]
\cos^{-1} \left(\frac{1 - 5 \cdot \left(v \cdot v\right)}{v \cdot v - 1}\right)
↓
\begin{array}{l}
t_0 := {\left(\sqrt{\sqrt[3]{\mathsf{log1p}\left(\cos^{-1} \left(\frac{\mathsf{fma}\left(v, v \cdot -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)\right)}}\right)}^{3}\\
\mathsf{expm1}\left(t_0 \cdot t_0\right)
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.6 |
|---|
| Cost | 84608 |
|---|
\[\begin{array}{l}
t_0 := \cos^{-1} \left(\frac{\mathsf{fma}\left(v, v \cdot -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)\\
\mathsf{expm1}\left({\left(\sqrt{\sqrt[3]{\mathsf{log1p}\left(t_0\right)}}\right)}^{3} \cdot \sqrt{\log \left(1 + t_0\right)}\right)
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.6 |
|---|
| Cost | 51968 |
|---|
\[\sqrt[3]{{\left(e^{3 \cdot \log \left(\sqrt[3]{\cos^{-1} \left(\frac{\mathsf{fma}\left(v, v \cdot -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)}\right)}\right)}^{3}}
\]
| Alternative 3 |
|---|
| Error | 0.6 |
|---|
| Cost | 32704 |
|---|
\[\mathsf{expm1}\left(\log \left(1 + \cos^{-1} \left(\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)\right)\right)
\]
| Alternative 4 |
|---|
| Error | 0.6 |
|---|
| Cost | 32576 |
|---|
\[\mathsf{expm1}\left(\mathsf{log1p}\left(\cos^{-1} \left(\frac{\mathsf{fma}\left(v \cdot v, -5, 1\right)}{\mathsf{fma}\left(v, v, -1\right)}\right)\right)\right)
\]
| Alternative 5 |
|---|
| Error | 0.8 |
|---|
| Cost | 7232 |
|---|
\[\cos^{-1} \left(-1 + 4 \cdot \left(\left(v \cdot v\right) \cdot \left(1 + v \cdot v\right)\right)\right)
\]
| Alternative 6 |
|---|
| Error | 0.6 |
|---|
| Cost | 7232 |
|---|
\[\cos^{-1} \left(\frac{1 + -5 \cdot \left(v \cdot v\right)}{-1 + v \cdot v}\right)
\]
| Alternative 7 |
|---|
| Error | 0.9 |
|---|
| Cost | 6848 |
|---|
\[\cos^{-1} \left(-1 + \left(v \cdot v\right) \cdot 4\right)
\]
| Alternative 8 |
|---|
| Error | 1.4 |
|---|
| Cost | 6464 |
|---|
\[\cos^{-1} -1
\]