\[\left(\left(\left(x = 0 \lor 0.5884142 \leq x \land x \leq 505.5909\right) \land \left(-1.796658 \cdot 10^{+308} \leq y \land y \leq -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \leq y \land y \leq 1.751224 \cdot 10^{+308}\right)\right) \land \left(-1.776707 \cdot 10^{+308} \leq z \land z \leq -8.599796 \cdot 10^{-310} \lor 3.293145 \cdot 10^{-311} \leq z \land z \leq 1.725154 \cdot 10^{+308}\right)\right) \land \left(-1.796658 \cdot 10^{+308} \leq a \land a \leq -9.425585 \cdot 10^{-310} \lor 1.284938 \cdot 10^{-309} \leq a \land a \leq 1.751224 \cdot 10^{+308}\right)\]
\[x + \left(\tan \left(y + z\right) - \tan a\right)
\]
↓
\[x + \left(\frac{-\left(\tan y + \tan z\right)}{\mathsf{fma}\left(\tan y, \tan z, -1\right)} - \tan a\right)
\]
(FPCore (x y z a) :precision binary64 (+ x (- (tan (+ y z)) (tan a))))
↓
(FPCore (x y z a)
:precision binary64
(+ x (- (/ (- (+ (tan y) (tan z))) (fma (tan y) (tan z) -1.0)) (tan a))))
double code(double x, double y, double z, double a) {
return x + (tan((y + z)) - tan(a));
}
↓
double code(double x, double y, double z, double a) {
return x + ((-(tan(y) + tan(z)) / fma(tan(y), tan(z), -1.0)) - tan(a));
}
function code(x, y, z, a)
return Float64(x + Float64(tan(Float64(y + z)) - tan(a)))
end
↓
function code(x, y, z, a)
return Float64(x + Float64(Float64(Float64(-Float64(tan(y) + tan(z))) / fma(tan(y), tan(z), -1.0)) - tan(a)))
end
code[x_, y_, z_, a_] := N[(x + N[(N[Tan[N[(y + z), $MachinePrecision]], $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, a_] := N[(x + N[(N[((-N[(N[Tan[y], $MachinePrecision] + N[Tan[z], $MachinePrecision]), $MachinePrecision]) / N[(N[Tan[y], $MachinePrecision] * N[Tan[z], $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision] - N[Tan[a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \left(\tan \left(y + z\right) - \tan a\right)
↓
x + \left(\frac{-\left(\tan y + \tan z\right)}{\mathsf{fma}\left(\tan y, \tan z, -1\right)} - \tan a\right)
Alternatives
| Alternative 1 |
|---|
| Error | 7.0 |
|---|
| Cost | 45768 |
|---|
\[\begin{array}{l}
t_0 := x + \left(\tan \left(y + z\right) - \tan a\right)\\
\mathbf{if}\;\tan a \leq -0.002:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\tan a \leq 5 \cdot 10^{-6}:\\
\;\;\;\;\left(x - a\right) - \frac{\tan y + \tan z}{\mathsf{fma}\left(\tan y, \tan z, -1\right)}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 0.2 |
|---|
| Cost | 32832 |
|---|
\[x + \left(\frac{\tan y + \tan z}{1 - \tan y \cdot \tan z} - \tan a\right)
\]
| Alternative 3 |
|---|
| Error | 7.9 |
|---|
| Cost | 26568 |
|---|
\[\begin{array}{l}
t_0 := x + \left(\tan \left(y + z\right) - \tan a\right)\\
\mathbf{if}\;a \leq -2.95 \cdot 10^{+26}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 6.2 \cdot 10^{-8}:\\
\;\;\;\;\frac{\tan z + \tan y}{1 - \tan z \cdot \tan y} + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 26.1 |
|---|
| Cost | 19784 |
|---|
\[\begin{array}{l}
t_0 := x - \tan a\\
\mathbf{if}\;\tan a \leq -0.05:\\
\;\;\;\;t_0\\
\mathbf{elif}\;\tan a \leq 2.5 \cdot 10^{-6}:\\
\;\;\;\;\tan \left(z + y\right) + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 20.3 |
|---|
| Cost | 13384 |
|---|
\[\begin{array}{l}
\mathbf{if}\;z \leq -5 \cdot 10^{-10}:\\
\;\;\;\;\tan \left(z + y\right) + x\\
\mathbf{elif}\;z \leq 0.003:\\
\;\;\;\;x + \left(\tan y - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;\tan z + x\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 13.9 |
|---|
| Cost | 13384 |
|---|
\[\begin{array}{l}
t_0 := x + \left(\tan y - \tan a\right)\\
\mathbf{if}\;y \leq -13:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 2.2 \cdot 10^{-8}:\\
\;\;\;\;x + \left(\tan z - \tan a\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 13.6 |
|---|
| Cost | 13248 |
|---|
\[x + \left(\tan \left(y + z\right) - \tan a\right)
\]
| Alternative 8 |
|---|
| Error | 26.0 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := x - \tan a\\
\mathbf{if}\;a \leq -3.5 \cdot 10^{-9}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;a \leq 62:\\
\;\;\;\;x + \left(\tan \left(z + y\right) - a\right)\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 32.2 |
|---|
| Cost | 6988 |
|---|
\[\begin{array}{l}
t_0 := \tan z + x\\
\mathbf{if}\;z \leq -1300:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 5.8 \cdot 10^{-303}:\\
\;\;\;\;x - \tan a\\
\mathbf{elif}\;z \leq 0.00052:\\
\;\;\;\;\tan y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 10 |
|---|
| Error | 32.0 |
|---|
| Cost | 6856 |
|---|
\[\begin{array}{l}
t_0 := \tan z + x\\
\mathbf{if}\;z \leq -3.2 \cdot 10^{-6}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 0.00052:\\
\;\;\;\;\tan y + x\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 38.0 |
|---|
| Cost | 6592 |
|---|
\[\tan y + x
\]
| Alternative 12 |
|---|
| Error | 43.8 |
|---|
| Cost | 64 |
|---|
\[x
\]