Math FPCore C Julia Wolfram TeX \[\frac{x}{y} \cdot \left(z - t\right) + t
\]
↓
\[\begin{array}{l}
\mathbf{if}\;y \leq 10^{-280}:\\
\;\;\;\;t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{elif}\;y \leq 4.374494269814032 \cdot 10^{+67}:\\
\;\;\;\;t + \frac{\frac{x \cdot \left(z - t\right)}{\sqrt{y}}}{\sqrt{y}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - t}{y}, t\right)\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (+ (* (/ x y) (- z t)) t)) ↓
(FPCore (x y z t)
:precision binary64
(if (<= y 1e-280)
(+ t (* (/ x y) (- z t)))
(if (<= y 4.374494269814032e+67)
(+ t (/ (/ (* x (- z t)) (sqrt y)) (sqrt y)))
(fma x (/ (- z t) y) t)))) double code(double x, double y, double z, double t) {
return ((x / y) * (z - t)) + t;
}
↓
double code(double x, double y, double z, double t) {
double tmp;
if (y <= 1e-280) {
tmp = t + ((x / y) * (z - t));
} else if (y <= 4.374494269814032e+67) {
tmp = t + (((x * (z - t)) / sqrt(y)) / sqrt(y));
} else {
tmp = fma(x, ((z - t) / y), t);
}
return tmp;
}
function code(x, y, z, t)
return Float64(Float64(Float64(x / y) * Float64(z - t)) + t)
end
↓
function code(x, y, z, t)
tmp = 0.0
if (y <= 1e-280)
tmp = Float64(t + Float64(Float64(x / y) * Float64(z - t)));
elseif (y <= 4.374494269814032e+67)
tmp = Float64(t + Float64(Float64(Float64(x * Float64(z - t)) / sqrt(y)) / sqrt(y)));
else
tmp = fma(x, Float64(Float64(z - t) / y), t);
end
return tmp
end
code[x_, y_, z_, t_] := N[(N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision] + t), $MachinePrecision]
↓
code[x_, y_, z_, t_] := If[LessEqual[y, 1e-280], N[(t + N[(N[(x / y), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.374494269814032e+67], N[(t + N[(N[(N[(x * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y], $MachinePrecision]), $MachinePrecision] / N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x * N[(N[(z - t), $MachinePrecision] / y), $MachinePrecision] + t), $MachinePrecision]]]
\frac{x}{y} \cdot \left(z - t\right) + t
↓
\begin{array}{l}
\mathbf{if}\;y \leq 10^{-280}:\\
\;\;\;\;t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{elif}\;y \leq 4.374494269814032 \cdot 10^{+67}:\\
\;\;\;\;t + \frac{\frac{x \cdot \left(z - t\right)}{\sqrt{y}}}{\sqrt{y}}\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - t}{y}, t\right)\\
\end{array}
Alternatives Alternative 1 Error 2.1 Cost 7112
\[\begin{array}{l}
t_1 := t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{if}\;t \leq 4.605592088679634 \cdot 10^{-232}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.380798698040074 \cdot 10^{-152}:\\
\;\;\;\;\mathsf{fma}\left(x, \frac{z - t}{y}, t\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 22.0 Cost 2204
\[\begin{array}{l}
t_1 := \frac{x}{y} \cdot \left(-t\right)\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+169}:\\
\;\;\;\;\frac{x}{\frac{y}{z}}\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-84}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-73}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 0.005:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+120}:\\
\;\;\;\;\frac{z}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 3 Error 22.0 Cost 2204
\[\begin{array}{l}
t_1 := t - \frac{t}{\frac{y}{x}}\\
t_2 := \frac{x}{\frac{y}{z}}\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{+169}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;\frac{x}{y} \leq -2 \cdot 10^{+43}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq -5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-84}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-73}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+92}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{+120}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \left(-t\right)\\
\end{array}
\]
Alternative 4 Error 12.5 Cost 1488
\[\begin{array}{l}
t_1 := \frac{z - t}{\frac{y}{x}}\\
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{-45}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-84}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-73}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 0.005:\\
\;\;\;\;t - \frac{t}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 22.9 Cost 1360
\[\begin{array}{l}
\mathbf{if}\;\frac{x}{y} \leq -5 \cdot 10^{-45}:\\
\;\;\;\;\frac{x}{y} \cdot z\\
\mathbf{elif}\;\frac{x}{y} \leq 5 \cdot 10^{-84}:\\
\;\;\;\;t\\
\mathbf{elif}\;\frac{x}{y} \leq 10^{-73}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;\frac{x}{y} \leq 0.005:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{z}}\\
\end{array}
\]
Alternative 6 Error 29.1 Cost 1112
\[\begin{array}{l}
t_1 := \frac{x}{\frac{y}{z}}\\
\mathbf{if}\;x \leq -8 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.1034114334988113 \cdot 10^{-24}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -6.159901173418997 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.0045115587828868 \cdot 10^{-56}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 7 Error 29.1 Cost 1112
\[\begin{array}{l}
t_1 := \frac{x \cdot z}{y}\\
t_2 := \frac{x}{\frac{y}{z}}\\
\mathbf{if}\;x \leq -8 \cdot 10^{+68}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -1.1034114334988113 \cdot 10^{-24}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -6.159901173418997 \cdot 10^{-53}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.0045115587828868 \cdot 10^{-56}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-7}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 8 Error 29.1 Cost 1112
\[\begin{array}{l}
t_1 := \frac{x}{\frac{y}{z}}\\
\mathbf{if}\;x \leq -8 \cdot 10^{+68}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.1034114334988113 \cdot 10^{-24}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -6.159901173418997 \cdot 10^{-53}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;x \leq 1.0045115587828868 \cdot 10^{-56}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-7}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 9 Error 29.2 Cost 1112
\[\begin{array}{l}
\mathbf{if}\;x \leq -8 \cdot 10^{+68}:\\
\;\;\;\;\frac{z}{\frac{y}{x}}\\
\mathbf{elif}\;x \leq -1.1034114334988113 \cdot 10^{-24}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq -6.159901173418997 \cdot 10^{-53}:\\
\;\;\;\;x \cdot \frac{z}{y}\\
\mathbf{elif}\;x \leq 1.0045115587828868 \cdot 10^{-56}:\\
\;\;\;\;t\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{-7}:\\
\;\;\;\;\frac{x \cdot z}{y}\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+36}:\\
\;\;\;\;t\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\frac{y}{z}}\\
\end{array}
\]
Alternative 10 Error 4.2 Cost 968
\[\begin{array}{l}
t_1 := \frac{z - t}{\frac{y}{x}}\\
\mathbf{if}\;\frac{x}{y} \leq -100000000:\\
\;\;\;\;t_1\\
\mathbf{elif}\;\frac{x}{y} \leq 0.005:\\
\;\;\;\;t + \frac{x}{\frac{y}{z}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 2.1 Cost 840
\[\begin{array}{l}
t_1 := t + \frac{z - t}{\frac{y}{x}}\\
\mathbf{if}\;t \leq 7.736705357099387 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.4662266463294765 \cdot 10^{-46}:\\
\;\;\;\;t + \frac{x}{\frac{y}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 2.0 Cost 840
\[\begin{array}{l}
t_1 := t + \frac{x}{y} \cdot \left(z - t\right)\\
\mathbf{if}\;t \leq 7.736705357099387 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 4.952679118870386 \cdot 10^{-77}:\\
\;\;\;\;t + \frac{x}{\frac{y}{z - t}}\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 1.9 Cost 576
\[t + \frac{z - t}{\frac{y}{x}}
\]
Alternative 14 Error 31.5 Cost 64
\[t
\]