\[x \cdot \cos y - z \cdot \sin y
\]
↓
\[\begin{array}{l}
t_0 := z \cdot \sin y\\
\left(\mathsf{fma}\left(-z, \sin y, t_0\right) + x \cdot \cos y\right) - t_0
\end{array}
\]
(FPCore (x y z) :precision binary64 (- (* x (cos y)) (* z (sin y))))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* z (sin y))))
(- (+ (fma (- z) (sin y) t_0) (* x (cos y))) t_0)))
double code(double x, double y, double z) {
return (x * cos(y)) - (z * sin(y));
}
↓
double code(double x, double y, double z) {
double t_0 = z * sin(y);
return (fma(-z, sin(y), t_0) + (x * cos(y))) - t_0;
}
function code(x, y, z)
return Float64(Float64(x * cos(y)) - Float64(z * sin(y)))
end
↓
function code(x, y, z)
t_0 = Float64(z * sin(y))
return Float64(Float64(fma(Float64(-z), sin(y), t_0) + Float64(x * cos(y))) - t_0)
end
code[x_, y_, z_] := N[(N[(x * N[Cos[y], $MachinePrecision]), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, N[(N[(N[((-z) * N[Sin[y], $MachinePrecision] + t$95$0), $MachinePrecision] + N[(x * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]]
x \cdot \cos y - z \cdot \sin y
↓
\begin{array}{l}
t_0 := z \cdot \sin y\\
\left(\mathsf{fma}\left(-z, \sin y, t_0\right) + x \cdot \cos y\right) - t_0
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 0.1 |
|---|
| Cost | 32896 |
|---|
\[\begin{array}{l}
t_0 := z \cdot \sin y\\
\mathsf{fma}\left(-z, \sin y, t_0\right) + \left(x \cdot \cos y - t_0\right)
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.1 |
|---|
| Cost | 19584 |
|---|
\[\mathsf{fma}\left(\cos y, x, z \cdot \left(-\sin y\right)\right)
\]
| Alternative 3 |
|---|
| Error | 0.1 |
|---|
| Cost | 13248 |
|---|
\[x \cdot \cos y - z \cdot \sin y
\]
| Alternative 4 |
|---|
| Error | 9.6 |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.45 \cdot 10^{-15} \lor \neg \left(x \leq 8.2 \cdot 10^{-51}\right):\\
\;\;\;\;x \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \sin y\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 17.1 |
|---|
| Cost | 6921 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -5.1 \cdot 10^{-172} \lor \neg \left(x \leq 8.5 \cdot 10^{-56}\right):\\
\;\;\;\;x \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-\sin y\right)\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 16.4 |
|---|
| Cost | 6857 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.00105 \lor \neg \left(y \leq 2.6 \cdot 10^{-12}\right):\\
\;\;\;\;x \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot y\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 38.2 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.35 \cdot 10^{-178}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-102}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 31.4 |
|---|
| Cost | 320 |
|---|
\[x - z \cdot y
\]
| Alternative 9 |
|---|
| Error | 39.4 |
|---|
| Cost | 64 |
|---|
\[x
\]