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}
\mathbf{if}\;b \leq -5 \cdot 10^{+194} \lor \neg \left(b \leq 10^{+105}\right):\\
\;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t + b \cdot z, \mathsf{fma}\left(y, z, x\right)\right)\\
\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
(if (or (<= b -5e+194) (not (<= b 1e+105)))
(+ (+ (* t a) (+ x (* y z))) (* b (* z a)))
(fma a (+ t (* b z)) (fma y z x)))) 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 tmp;
if ((b <= -5e+194) || !(b <= 1e+105)) {
tmp = ((t * a) + (x + (y * z))) + (b * (z * a));
} else {
tmp = fma(a, (t + (b * z)), fma(y, z, x));
}
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)
tmp = 0.0
if ((b <= -5e+194) || !(b <= 1e+105))
tmp = Float64(Float64(Float64(t * a) + Float64(x + Float64(y * z))) + Float64(b * Float64(z * a)));
else
tmp = fma(a, Float64(t + Float64(b * z)), fma(y, z, x));
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_] := If[Or[LessEqual[b, -5e+194], N[Not[LessEqual[b, 1e+105]], $MachinePrecision]], N[(N[(N[(t * a), $MachinePrecision] + N[(x + N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(b * N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(a * N[(t + N[(b * z), $MachinePrecision]), $MachinePrecision] + N[(y * z + x), $MachinePrecision]), $MachinePrecision]]
\left(\left(x + y \cdot z\right) + t \cdot a\right) + \left(a \cdot z\right) \cdot b
↓
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+194} \lor \neg \left(b \leq 10^{+105}\right):\\
\;\;\;\;\left(t \cdot a + \left(x + y \cdot z\right)\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, t + b \cdot z, \mathsf{fma}\left(y, z, x\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 25.0 Cost 1376
\[\begin{array}{l}
t_1 := z \cdot \left(y + b \cdot a\right)\\
t_2 := a \cdot \left(t + b \cdot z\right)\\
t_3 := x + y \cdot z\\
\mathbf{if}\;x \leq -1.55 \cdot 10^{+118}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -55:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -9.2 \cdot 10^{-40}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;x \leq -2.3 \cdot 10^{-183}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq -4 \cdot 10^{-266}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2.35 \cdot 10^{-294}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 5.4 \cdot 10^{-217}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 2 \cdot 10^{+43}:\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;t_3\\
\end{array}
\]
Alternative 2 Error 34.3 Cost 1248
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq -145000000000:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;x \leq -8 \cdot 10^{-38}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;x \leq -2.8 \cdot 10^{-183}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;x \leq -1.3 \cdot 10^{-264}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;x \leq 3.4 \cdot 10^{-290}:\\
\;\;\;\;t \cdot a\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-218}:\\
\;\;\;\;y \cdot z\\
\mathbf{elif}\;x \leq 2.15 \cdot 10^{-10}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 3 Error 20.8 Cost 1241
\[\begin{array}{l}
t_1 := x + t \cdot a\\
t_2 := x + y \cdot z\\
\mathbf{if}\;z \leq -7.5 \cdot 10^{+40}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -3.4 \cdot 10^{-48}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq -1.8 \cdot 10^{-105}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq 1.7 \cdot 10^{-6}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 8 \cdot 10^{+68} \lor \neg \left(z \leq 4.2 \cdot 10^{+220}\right):\\
\;\;\;\;z \cdot \left(y + b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 20.8 Cost 1241
\[\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := a \cdot \left(t + b \cdot z\right)\\
\mathbf{if}\;a \leq -8300000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 8.2 \cdot 10^{-124}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 7.1 \cdot 10^{+47} \lor \neg \left(a \leq 7 \cdot 10^{+163}\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\
\end{array}
\]
Alternative 5 Error 21.3 Cost 1240
\[\begin{array}{l}
t_1 := x + y \cdot z\\
t_2 := a \cdot \left(t + b \cdot z\right)\\
\mathbf{if}\;a \leq -7000000:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq -3.8 \cdot 10^{-87}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq -3.6 \cdot 10^{-118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \leq 1.4 \cdot 10^{-61}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \leq 2.3 \cdot 10^{+33}:\\
\;\;\;\;y \cdot z + t \cdot a\\
\mathbf{elif}\;a \leq 6.6 \cdot 10^{+163}:\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\]
Alternative 6 Error 1.0 Cost 1225
\[\begin{array}{l}
t_1 := x + y \cdot z\\
\mathbf{if}\;b \leq -1.3 \cdot 10^{+227} \lor \neg \left(b \leq 2 \cdot 10^{+52}\right):\\
\;\;\;\;\left(t \cdot a + t_1\right) + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot \left(b \cdot z\right) + t \cdot a\right) + t_1\\
\end{array}
\]
Alternative 7 Error 10.0 Cost 1105
\[\begin{array}{l}
t_1 := x + b \cdot \left(z \cdot a\right)\\
\mathbf{if}\;b \leq -3.75 \cdot 10^{+84}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;b \leq 1.12 \cdot 10^{+58}:\\
\;\;\;\;y \cdot z + \left(x + t \cdot a\right)\\
\mathbf{elif}\;b \leq 2 \cdot 10^{+195} \lor \neg \left(b \leq 4.5 \cdot 10^{+266}\right):\\
\;\;\;\;x + z \cdot \left(y + b \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 8 Error 2.8 Cost 960
\[\left(a \cdot \left(b \cdot z\right) + t \cdot a\right) + \left(x + y \cdot z\right)
\]
Alternative 9 Error 26.5 Cost 850
\[\begin{array}{l}
\mathbf{if}\;x \leq -6900000000 \lor \neg \left(x \leq -2.05 \cdot 10^{-39}\right) \land \left(x \leq -2.7 \cdot 10^{-183} \lor \neg \left(x \leq -2.45 \cdot 10^{-265}\right)\right):\\
\;\;\;\;x + t \cdot a\\
\mathbf{else}:\\
\;\;\;\;y \cdot z\\
\end{array}
\]
Alternative 10 Error 20.6 Cost 850
\[\begin{array}{l}
\mathbf{if}\;z \leq -1.6 \cdot 10^{+41} \lor \neg \left(z \leq -3.9 \cdot 10^{-48} \lor \neg \left(z \leq -1.2 \cdot 10^{-101}\right) \land z \leq 3.4 \cdot 10^{-5}\right):\\
\;\;\;\;x + y \cdot z\\
\mathbf{else}:\\
\;\;\;\;x + t \cdot a\\
\end{array}
\]
Alternative 11 Error 10.8 Cost 841
\[\begin{array}{l}
\mathbf{if}\;b \leq -3.6 \cdot 10^{+87} \lor \neg \left(b \leq 1.15 \cdot 10^{+72}\right):\\
\;\;\;\;x + b \cdot \left(z \cdot a\right)\\
\mathbf{else}:\\
\;\;\;\;y \cdot z + \left(x + t \cdot a\right)\\
\end{array}
\]
Alternative 12 Error 34.3 Cost 456
\[\begin{array}{l}
\mathbf{if}\;x \leq -1.85 \cdot 10^{+118}:\\
\;\;\;\;x\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{-10}:\\
\;\;\;\;t \cdot a\\
\mathbf{else}:\\
\;\;\;\;x\\
\end{array}
\]
Alternative 13 Error 40.1 Cost 64
\[x
\]