Math FPCore C Julia Wolfram TeX \[x + \frac{\left(y - x\right) \cdot z}{t}
\]
↓
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-156}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-230}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\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 -4.5e-156)
(+ x (/ (- y x) (/ t z)))
(if (<= x 5.8e-230) (+ x (/ z (/ t (- y x)))) (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 <= -4.5e-156) {
tmp = x + ((y - x) / (t / z));
} else if (x <= 5.8e-230) {
tmp = x + (z / (t / (y - x)));
} 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 <= -4.5e-156)
tmp = Float64(x + Float64(Float64(y - x) / Float64(t / z)));
elseif (x <= 5.8e-230)
tmp = Float64(x + Float64(z / Float64(t / Float64(y - x))));
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, -4.5e-156], N[(x + N[(N[(y - x), $MachinePrecision] / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 5.8e-230], N[(x + N[(z / N[(t / N[(y - x), $MachinePrecision]), $MachinePrecision]), $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 -4.5 \cdot 10^{-156}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq 5.8 \cdot 10^{-230}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{t}, x\right)\\
\end{array}
Alternatives Alternative 1 Error 0.8 Cost 1865
\[\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot z}{t}\\
\mathbf{if}\;t_1 \leq -\infty \lor \neg \left(t_1 \leq 10^{+307}\right):\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 10.7 Cost 1240
\[\begin{array}{l}
t_1 := x - x \cdot \frac{z}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;y \leq -1.7 \cdot 10^{+278}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;y \leq -1.95 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -5.2 \cdot 10^{-152}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -7.8 \cdot 10^{-174}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -4.2 \cdot 10^{-255}:\\
\;\;\;\;x - z \cdot \frac{x}{t}\\
\mathbf{elif}\;y \leq 1.62 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 3 Error 27.7 Cost 1112
\[\begin{array}{l}
t_1 := y \cdot \frac{z}{t}\\
\mathbf{if}\;x \leq -2.2 \cdot 10^{-95}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.4 \cdot 10^{-114}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 1.26 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 6.8 \cdot 10^{+32}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.32 \cdot 10^{+64}:\\
\;\;\;\;z \cdot \frac{-x}{t}\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+72}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 4 Error 24.2 Cost 1112
\[\begin{array}{l}
\mathbf{if}\;t \leq -6.5 \cdot 10^{+47}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 2.7 \cdot 10^{-13}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;t \leq 9 \cdot 10^{+115}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+149}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;t \leq 3.5 \cdot 10^{+210}:\\
\;\;\;\;x\\
\mathbf{elif}\;t \leq 1.15 \cdot 10^{+243}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 5 Error 12.8 Cost 1108
\[\begin{array}{l}
t_1 := x - z \cdot \frac{x}{t}\\
t_2 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;y \leq -2.5 \cdot 10^{+279}:\\
\;\;\;\;\frac{y}{\frac{t}{z}}\\
\mathbf{elif}\;y \leq -8 \cdot 10^{-37}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;y \leq -1.45 \cdot 10^{-131}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;y \leq -1.15 \cdot 10^{-164}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\mathbf{elif}\;y \leq 8.5 \cdot 10^{-222}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 2.0 Cost 968
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.4 \cdot 10^{-157}:\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-216}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{1}{\frac{\frac{t}{z}}{y - x}}\\
\end{array}
\]
Alternative 7 Error 26.2 Cost 849
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-30}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.7 \cdot 10^{-110} \lor \neg \left(x \leq 1.26 \cdot 10^{-88}\right) \land x \leq 3.2 \cdot 10^{-13}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 26.5 Cost 848
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-90}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 8.4 \cdot 10^{-110}:\\
\;\;\;\;\frac{z}{\frac{t}{y}}\\
\mathbf{elif}\;x \leq 1.25 \cdot 10^{-88}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.7 \cdot 10^{-14}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 9 Error 4.6 Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -8.5 \cdot 10^{+169} \lor \neg \left(x \leq 2.9 \cdot 10^{+72}\right):\\
\;\;\;\;x - x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + z \cdot \frac{y - x}{t}\\
\end{array}
\]
Alternative 10 Error 4.4 Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -9.5 \cdot 10^{+170} \lor \neg \left(x \leq 8.2 \cdot 10^{+72}\right):\\
\;\;\;\;x - x \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\end{array}
\]
Alternative 11 Error 2.0 Cost 841
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.4 \cdot 10^{-160} \lor \neg \left(x \leq 1.75 \cdot 10^{-240}\right):\\
\;\;\;\;x + \frac{y - x}{\frac{t}{z}}\\
\mathbf{else}:\\
\;\;\;\;x + \frac{z}{\frac{t}{y - x}}\\
\end{array}
\]
Alternative 12 Error 26.4 Cost 716
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.15 \cdot 10^{-93}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-262}:\\
\;\;\;\;z \cdot \frac{y}{t}\\
\mathbf{elif}\;x \leq 1.55 \cdot 10^{-13}:\\
\;\;\;\;y \cdot \frac{z}{t}\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 13 Error 13.3 Cost 713
\[\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-147} \lor \neg \left(t \leq 2.45 \cdot 10^{-191}\right):\\
\;\;\;\;x + \frac{y \cdot z}{t}\\
\mathbf{else}:\\
\;\;\;\;\left(y - x\right) \cdot \frac{z}{t}\\
\end{array}
\]
Alternative 14 Error 31.7 Cost 64
\[x
\]