\[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 | 13248 |
|---|
\[x \cdot \cos y - z \cdot \sin y
\]
| Alternative 2 |
|---|
| Error | 7.9 |
|---|
| Cost | 7625 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-6} \lor \neg \left(z \leq 1.25 \cdot 10^{-46}\right):\\
\;\;\;\;x - z \cdot \sin y\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{1}{\cos y}} - \frac{z}{\frac{1}{y} + y \cdot 0.16666666666666666}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 10.6 |
|---|
| Cost | 6985 |
|---|
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-21} \lor \neg \left(x \leq 7.2 \cdot 10^{+246}\right):\\
\;\;\;\;x \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;x - z \cdot \sin y\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 16.0 |
|---|
| Cost | 6920 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.11:\\
\;\;\;\;x \cdot \cos y\\
\mathbf{elif}\;y \leq 3.9:\\
\;\;\;\;\left(x + \left(x \cdot -0.5\right) \cdot \left(y \cdot y\right)\right) - z \cdot y\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(-\sin y\right)\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 15.7 |
|---|
| Cost | 6857 |
|---|
\[\begin{array}{l}
\mathbf{if}\;y \leq -0.38 \lor \neg \left(y \leq 0.041\right):\\
\;\;\;\;x \cdot \cos y\\
\mathbf{else}:\\
\;\;\;\;\left(x + \left(x \cdot -0.5\right) \cdot \left(y \cdot y\right)\right) - z \cdot y\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 38.8 |
|---|
| Cost | 520 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq 10^{+226}:\\
\;\;\;\;x\\
\mathbf{elif}\;z \leq 5.1 \cdot 10^{+263}:\\
\;\;\;\;z \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 30.4 |
|---|
| Cost | 320 |
|---|
\[x - z \cdot y
\]
| Alternative 8 |
|---|
| Error | 39.0 |
|---|
| Cost | 64 |
|---|
\[x
\]