Math FPCore C Julia Wolfram TeX \[\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
\]
↓
\[\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -1 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right) + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
(FPCore (x y z t a b)
:precision binary64
(+ (+ (+ x (* y z)) (* t a)) (* (* a z) b))) ↓
(FPCore (x y z t a b)
:precision binary64
(let* ((t_1 (+ (+ (+ x (* y z)) (* t a)) (* (* a z) b))))
(if (<= b -1e+26)
t_1
(if (<= b 5e-58) (+ (fma z y x) (* a (+ t (* z b)))) t_1)))) double code(double x, double y, double z, double t, double a, double b) {
return ((x + (y * z)) + (t * a)) + ((a * z) * b);
}
↓
double code(double x, double y, double z, double t, double a, double b) {
double t_1 = ((x + (y * z)) + (t * a)) + ((a * z) * b);
double tmp;
if (b <= -1e+26) {
tmp = t_1;
} else if (b <= 5e-58) {
tmp = fma(z, y, x) + (a * (t + (z * b)));
} else {
tmp = t_1;
}
return tmp;
}
function code(x, y, z, t, a, b)
return Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b))
end
↓
function code(x, y, z, t, a, b)
t_1 = Float64(Float64(Float64(x + Float64(y * z)) + Float64(t * a)) + Float64(Float64(a * z) * b))
tmp = 0.0
if (b <= -1e+26)
tmp = t_1;
elseif (b <= 5e-58)
tmp = Float64(fma(z, y, x) + Float64(a * Float64(t + Float64(z * b))));
else
tmp = t_1;
end
return tmp
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision] + N[(t * a), $MachinePrecision]), $MachinePrecision] + N[(N[(a * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1e+26], t$95$1, If[LessEqual[b, 5e-58], N[(N[(z * y + x), $MachinePrecision] + N[(a * N[(t + N[(z * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
↓
\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -1 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 5 \cdot 10^{-58}:\\
\;\;\;\;\mathsf{fma}\left(z, y, x\right) + a \cdot \left(t + z \cdot b\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
Alternatives Alternative 1 Error 28.5 Cost 1376
\[\begin{array}{l}
t_1 := a \cdot t + x\\
\mathbf{if}\;t \leq -8.4 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -4.8 \cdot 10^{-246}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 1.1 \cdot 10^{-237}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 9.5 \cdot 10^{-191}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 2.2 \cdot 10^{-107}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 1.35 \cdot 10^{-87}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;t \leq 2.8 \cdot 10^{-76}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;t \leq 6.2 \cdot 10^{-23}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 19.5 Cost 1376
\[\begin{array}{l}
t_1 := y \cdot z + a \cdot t\\
t_2 := z \cdot \left(a \cdot b + y\right)\\
t_3 := y \cdot z + x\\
\mathbf{if}\;x \leq -2.1 \cdot 10^{-20}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -2.55 \cdot 10^{-250}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-293}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 1.45 \cdot 10^{-103}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-69}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 410:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 5.1 \cdot 10^{+20}:\\
\;\;\;\;\left(t + b \cdot z\right) \cdot a\\
\mathbf{elif}\;x \leq 2.5 \cdot 10^{+48}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;a \cdot t + x\\
\end{array}
\]
Alternative 3 Error 22.8 Cost 1244
\[\begin{array}{l}
t_1 := \left(t + b \cdot z\right) \cdot a\\
t_2 := y \cdot z + x\\
t_3 := z \cdot \left(a \cdot b + y\right)\\
\mathbf{if}\;x \leq -1 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -7 \cdot 10^{-123}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-223}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -1.15 \cdot 10^{-251}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.16 \cdot 10^{-71}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq 1.08 \cdot 10^{+21}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{+49}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;a \cdot t + x\\
\end{array}
\]
Alternative 4 Error 0.3 Cost 1224
\[\begin{array}{l}
t_1 := \left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b\\
\mathbf{if}\;b \leq -4 \cdot 10^{+26}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 4 \cdot 10^{-57}:\\
\;\;\;\;\left(z \cdot \left(a \cdot b + y\right) + x\right) + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 5 Error 8.9 Cost 1096
\[\begin{array}{l}
\mathbf{if}\;x \leq -1 \cdot 10^{-46}:\\
\;\;\;\;y \cdot z + \left(a \cdot t + x\right)\\
\mathbf{elif}\;x \leq 5.5 \cdot 10^{+23}:\\
\;\;\;\;\left(y \cdot z + a \cdot t\right) + \left(a \cdot z\right) \cdot b\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(z \cdot b + t\right)\\
\end{array}
\]
Alternative 6 Error 2.7 Cost 964
\[\begin{array}{l}
\mathbf{if}\;a \leq 1.56 \cdot 10^{+25}:\\
\;\;\;\;\left(z \cdot \left(a \cdot b + y\right) + x\right) + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(z \cdot b + t\right)\\
\end{array}
\]
Alternative 7 Error 34.7 Cost 852
\[\begin{array}{l}
\mathbf{if}\;x \leq -4 \cdot 10^{+102}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-223}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;x \leq 1.85 \cdot 10^{-293}:\\
\;\;\;\;\left(z \cdot a\right) \cdot b\\
\mathbf{elif}\;x \leq 2.9 \cdot 10^{-143}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+20}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 8 Error 20.4 Cost 848
\[\begin{array}{l}
t_1 := y \cdot z + x\\
t_2 := a \cdot t + x\\
\mathbf{if}\;t \leq -5.7 \cdot 10^{+62}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -4.2:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -1.35 \cdot 10^{-105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 6.1 \cdot 10^{-89}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 9 Error 22.5 Cost 844
\[\begin{array}{l}
t_1 := a \cdot t + x\\
\mathbf{if}\;x \leq -1.5 \cdot 10^{-38}:\\
\;\;\;\;y \cdot z + x\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-102}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.3 \cdot 10^{-28}:\\
\;\;\;\;z \cdot \left(a \cdot b + y\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 11.9 Cost 840
\[\begin{array}{l}
t_1 := x + a \cdot \left(z \cdot b + t\right)\\
\mathbf{if}\;a \leq -1.4 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 6.5 \cdot 10^{-113}:\\
\;\;\;\;y \cdot z + x\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 11 Error 8.0 Cost 840
\[\begin{array}{l}
t_1 := x + a \cdot \left(z \cdot b + t\right)\\
\mathbf{if}\;a \leq -2.3 \cdot 10^{+74}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 5.2 \cdot 10^{-6}:\\
\;\;\;\;y \cdot z + \left(a \cdot t + x\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 12 Error 8.0 Cost 840
\[\begin{array}{l}
\mathbf{if}\;a \leq -1.8 \cdot 10^{+73}:\\
\;\;\;\;a \cdot t + \left(a \cdot \left(z \cdot b\right) + x\right)\\
\mathbf{elif}\;a \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;y \cdot z + \left(a \cdot t + x\right)\\
\mathbf{else}:\\
\;\;\;\;x + a \cdot \left(z \cdot b + t\right)\\
\end{array}
\]
Alternative 13 Error 33.9 Cost 588
\[\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{+102}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-143}:\\
\;\;\;\;z \cdot y\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{+20}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 14 Error 32.8 Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -6.2 \cdot 10^{-7}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 3.1 \cdot 10^{+20}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 15 Error 40.1 Cost 64
\[x
\]