Math FPCore C Julia Wolfram TeX \[x + \frac{\left(y - x\right) \cdot z}{t}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-125}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-280}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (+ x (/ (* (- y x) z) t))) ↓
(FPCore (x y z t)
:precision binary64
(if (<= x -5e-125)
(+ x (/ (- y x) (/ t z)))
(if (<= x 5e-280) (+ x (/ (* (- y x) z) t)) (fma (- y x) (/ z t) x)))) double code(double x, double y, double z, double t) {
return x + (((y - x) * z) / t);
}
↓
double code(double x, double y, double z, double t) {
double tmp;
if (x <= -5e-125) {
tmp = x + ((y - x) / (t / z));
} else if (x <= 5e-280) {
tmp = x + (((y - x) * z) / t);
} else {
tmp = fma((y - x), (z / t), x);
}
return tmp;
}
function code(x, y, z, t)
return Float64(x + Float64(Float64(Float64(y - x) * z) / t))
end
↓
function code(x, y, z, t)
tmp = 0.0
if (x <= -5e-125)
tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z)));
elseif (x <= 5e-280)
tmp = Float64(x + Float64(Float64(Float64(y - x) * z) / t));
else
tmp = fma(Float64(y - x), Float64(z / t), x);
end
return tmp
end
code[x_, y_, z_, t_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := If[LessEqual[x, -5e-125], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5e-280], N[(x + N[(N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / t), $MachinePrecision] + x), $MachinePrecision]]]
x + \frac{\left(y - x\right) \cdot z}{t}
↓
\begin{array}{l}
\mathbf{if}\;x \leq -5 \cdot 10^{-125}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-280}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)\\
\end{array}
Alternatives Alternative 1 Error 44.76% Cost 1508
\[\begin{array}{l}
t_1 := \frac{-z}{\frac{t}{x}}\\
\mathbf{if}\;x \leq -1.05 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-37}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -2 \cdot 10^{-58}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-71}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-106}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.5 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -3.95 \cdot 10^{-190}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -5.7 \cdot 10^{-218}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 2 Error 44.81% Cost 1508
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{+59}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-37}:\\
\;\;\;\;\frac{-z}{\frac{t}{x}}\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-66}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.9 \cdot 10^{-72}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{elif}\;x \leq -3.1 \cdot 10^{-106}:\\
\;\;\;\;\frac{x \cdot \left(-z\right)}{t}\\
\mathbf{elif}\;x \leq -2.05 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7.8 \cdot 10^{-191}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -1.22 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.3 \cdot 10^{-62}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 3 Error 6.02% Cost 1220
\[\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq 10^{+302}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\end{array}
\]
Alternative 4 Error 42.5% Cost 1114
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-71} \lor \neg \left(x \leq -1.26 \cdot 10^{-129}\right) \land \left(x \leq -1.22 \cdot 10^{-189} \lor \neg \left(x \leq -2.85 \cdot 10^{-217}\right) \land x \leq 1.95 \cdot 10^{-54}\right):\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 42.53% Cost 1112
\[\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -1.6 \cdot 10^{+21}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -2.5 \cdot 10^{-71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.1 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -6.8 \cdot 10^{-191}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -2.9 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.15 \cdot 10^{-55}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 6 Error 42.65% Cost 1112
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7.5 \cdot 10^{-108}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq -1.6 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-189}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-217}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-55}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 7 Error 43.12% Cost 1112
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.6 \cdot 10^{+20}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -7.2 \cdot 10^{-108}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq -1.35 \cdot 10^{-129}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -4.7 \cdot 10^{-191}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -6.7 \cdot 10^{-218}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-61}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 9.83% Cost 1108
\[\begin{array}{l}
t_1 := x + z \cdot \frac{y - x}{t}\\
t_2 := x - x \cdot \frac{z}{t}\\
t_3 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -4 \cdot 10^{+206}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-166}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 8 \cdot 10^{-218}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{+100}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.95 \cdot 10^{+206}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 9 Error 29.23% Cost 977
\[\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;x \leq -7.5 \cdot 10^{-130}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.56 \cdot 10^{-189}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq -6.4 \cdot 10^{-218} \lor \neg \left(x \leq 6.3 \cdot 10^{-62}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\]
Alternative 10 Error 28.59% Cost 977
\[\begin{array}{l}
t_1 := x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{if}\;x \leq -1.06 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-190}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{elif}\;x \leq -2.4 \cdot 10^{-217} \lor \neg \left(x \leq 6.3 \cdot 10^{-62}\right):\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{t}\\
\end{array}
\]
Alternative 11 Error 14.77% Cost 976
\[\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;y \leq -3.45 \cdot 10^{-149}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-229}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-165}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-125}:\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 14.75% Cost 976
\[\begin{array}{l}
t_1 := x + y \cdot \frac{z}{t}\\
\mathbf{if}\;y \leq -5.2 \cdot 10^{-150}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq 1.05 \cdot 10^{-230}:\\
\;\;\;\;x \cdot \left(1 - \frac{z}{t}\right)\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-165}:\\
\;\;\;\;x + z \cdot \frac{y}{t}\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-125}:\\
\;\;\;\;\frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 3.28% Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.52 \cdot 10^{-125} \lor \neg \left(x \leq 3 \cdot 10^{-280}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{\left(y - x\right) \cdot z}{t}\\
\end{array}
\]
Alternative 14 Error 17.3% Cost 713
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.2 \cdot 10^{+112} \lor \neg \left(z \leq 6.8 \cdot 10^{+24}\right):\\
\;\;\;\;z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;x + y \cdot \frac{z}{t}\\
\end{array}
\]
Alternative 15 Error 49.88% Cost 64
\[x
\]