Math FPCore C Julia Wolfram TeX \[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
\]
↓
\[\left(c + x \cdot y\right) - \mathsf{fma}\left(b, a \cdot 0.25, \left(z \cdot t\right) \cdot -0.0625\right)
\]
(FPCore (x y z t a b c)
:precision binary64
(+ (- (+ (* x y) (/ (* z t) 16.0)) (/ (* a b) 4.0)) c)) ↓
(FPCore (x y z t a b c)
:precision binary64
(- (+ c (* x y)) (fma b (* a 0.25) (* (* z t) -0.0625)))) double code(double x, double y, double z, double t, double a, double b, double c) {
return (((x * y) + ((z * t) / 16.0)) - ((a * b) / 4.0)) + c;
}
↓
double code(double x, double y, double z, double t, double a, double b, double c) {
return (c + (x * y)) - fma(b, (a * 0.25), ((z * t) * -0.0625));
}
function code(x, y, z, t, a, b, c)
return Float64(Float64(Float64(Float64(x * y) + Float64(Float64(z * t) / 16.0)) - Float64(Float64(a * b) / 4.0)) + c)
end
↓
function code(x, y, z, t, a, b, c)
return Float64(Float64(c + Float64(x * y)) - fma(b, Float64(a * 0.25), Float64(Float64(z * t) * -0.0625)))
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(x * y), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / 16.0), $MachinePrecision]), $MachinePrecision] - N[(N[(a * b), $MachinePrecision] / 4.0), $MachinePrecision]), $MachinePrecision] + c), $MachinePrecision]
↓
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(c + N[(x * y), $MachinePrecision]), $MachinePrecision] - N[(b * N[(a * 0.25), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] * -0.0625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \frac{a \cdot b}{4}\right) + c
↓
\left(c + x \cdot y\right) - \mathsf{fma}\left(b, a \cdot 0.25, \left(z \cdot t\right) \cdot -0.0625\right)
Alternatives Alternative 1 Error 22.6 Cost 2396
\[\begin{array}{l}
t_1 := y \cdot x - 0.25 \cdot \left(a \cdot b\right)\\
t_2 := \left(t \cdot z\right) \cdot 0.0625 + c\\
\mathbf{if}\;a \cdot b \leq -1 \cdot 10^{+122}:\\
\;\;\;\;c - \left(0.25 \cdot a\right) \cdot b\\
\mathbf{elif}\;a \cdot b \leq -1 \cdot 10^{+69}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq -3.5 \cdot 10^{-5}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-108}:\\
\;\;\;\;y \cdot x - -0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-173}:\\
\;\;\;\;y \cdot x + c\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-52}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-18}:\\
\;\;\;\;\left(a \cdot b\right) \cdot -0.25 + c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 2 Error 6.5 Cost 2132
\[\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := 0.25 \cdot \left(a \cdot b\right)\\
t_3 := \left(c + y \cdot x\right) - t_2\\
t_4 := \left(c + t_1\right) - t_2\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+150}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{+37}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;a \cdot b \leq -5 \cdot 10^{-16}:\\
\;\;\;\;t_4\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-52}:\\
\;\;\;\;\left(y \cdot x + t_1\right) + c\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{+67}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;t_4\\
\end{array}
\]
Alternative 3 Error 43.4 Cost 2036
\[\begin{array}{l}
t_1 := \left(-0.25 \cdot a\right) \cdot b\\
t_2 := \left(0.0625 \cdot t\right) \cdot z\\
\mathbf{if}\;t \leq -3.6 \cdot 10^{+118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq -1.65 \cdot 10^{-9}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -7.8 \cdot 10^{-98}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq -4.2 \cdot 10^{-200}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq -2.85 \cdot 10^{-273}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq 1.6 \cdot 10^{-286}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;t \leq 5.6 \cdot 10^{-247}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq 9.6 \cdot 10^{-208}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;t \leq 2.95 \cdot 10^{-112}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;t \leq 4.75 \cdot 10^{-35}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t \leq 2.4 \cdot 10^{-12}:\\
\;\;\;\;c\\
\mathbf{elif}\;t \leq 0.002:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;t \leq 1.2 \cdot 10^{+58}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 4 Error 21.3 Cost 2008
\[\begin{array}{l}
t_1 := \left(t \cdot z\right) \cdot 0.0625 + c\\
t_2 := y \cdot x + c\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+118}:\\
\;\;\;\;c - \left(0.25 \cdot a\right) \cdot b\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{+50}:\\
\;\;\;\;y \cdot x - -0.0625 \cdot \left(t \cdot z\right)\\
\mathbf{elif}\;a \cdot b \leq -2 \cdot 10^{-23}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-173}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-129}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{+28}:\\
\;\;\;\;t_2\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot b\right) \cdot -0.25 + c\\
\end{array}
\]
Alternative 5 Error 21.1 Cost 1488
\[\begin{array}{l}
t_1 := y \cdot x + c\\
t_2 := \left(a \cdot b\right) \cdot -0.25 + c\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+118}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-129}:\\
\;\;\;\;\left(t \cdot z\right) \cdot 0.0625 + c\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 21.1 Cost 1488
\[\begin{array}{l}
t_1 := y \cdot x + c\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+118}:\\
\;\;\;\;c - \left(0.25 \cdot a\right) \cdot b\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-173}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-129}:\\
\;\;\;\;\left(t \cdot z\right) \cdot 0.0625 + c\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{+28}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;\left(a \cdot b\right) \cdot -0.25 + c\\
\end{array}
\]
Alternative 7 Error 10.4 Cost 1224
\[\begin{array}{l}
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+118}:\\
\;\;\;\;c - \left(0.25 \cdot a\right) \cdot b\\
\mathbf{elif}\;a \cdot b \leq 5 \cdot 10^{-18}:\\
\;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\
\mathbf{else}:\\
\;\;\;\;y \cdot x - 0.25 \cdot \left(a \cdot b\right)\\
\end{array}
\]
Alternative 8 Error 9.5 Cost 1224
\[\begin{array}{l}
t_1 := 0.0625 \cdot \left(t \cdot z\right)\\
t_2 := t_1 - 0.25 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+124}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;a \cdot b \leq 10^{+32}:\\
\;\;\;\;\left(y \cdot x + t_1\right) + c\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 9 Error 6.2 Cost 1224
\[\begin{array}{l}
t_1 := \left(c + y \cdot x\right) - 0.25 \cdot \left(a \cdot b\right)\\
\mathbf{if}\;a \cdot b \leq -5 \cdot 10^{+71}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 2 \cdot 10^{-52}:\\
\;\;\;\;\left(y \cdot x + 0.0625 \cdot \left(t \cdot z\right)\right) + c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 10 Error 31.0 Cost 1112
\[\begin{array}{l}
t_1 := \left(-0.25 \cdot a\right) \cdot b\\
t_2 := y \cdot x + c\\
\mathbf{if}\;c \leq -1.1:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq -9.6 \cdot 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -3.8 \cdot 10^{-277}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;c \leq 6.5 \cdot 10^{-98}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq 8.5 \cdot 10^{-61}:\\
\;\;\;\;\left(0.0625 \cdot t\right) \cdot z\\
\mathbf{elif}\;c \leq 3700000000000:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 11 Error 0.1 Cost 1088
\[\left(\left(x \cdot y + \frac{z \cdot t}{16}\right) - \left(a \cdot 0.25\right) \cdot b\right) + c
\]
Alternative 12 Error 21.0 Cost 968
\[\begin{array}{l}
t_1 := \left(a \cdot b\right) \cdot -0.25 + c\\
\mathbf{if}\;a \cdot b \leq -2 \cdot 10^{+118}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;a \cdot b \leq 4 \cdot 10^{+28}:\\
\;\;\;\;y \cdot x + c\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
Alternative 13 Error 35.8 Cost 848
\[\begin{array}{l}
t_1 := \left(-0.25 \cdot a\right) \cdot b\\
\mathbf{if}\;c \leq -7 \cdot 10^{+42}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq -2.8 \cdot 10^{-223}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;c \leq -8.8 \cdot 10^{-278}:\\
\;\;\;\;y \cdot x\\
\mathbf{elif}\;c \leq 900:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\]
Alternative 14 Error 37.0 Cost 456
\[\begin{array}{l}
\mathbf{if}\;c \leq -1.05 \cdot 10^{+153}:\\
\;\;\;\;c\\
\mathbf{elif}\;c \leq 5.5 \cdot 10^{+40}:\\
\;\;\;\;y \cdot x\\
\mathbf{else}:\\
\;\;\;\;c\\
\end{array}
\]
Alternative 15 Error 43.9 Cost 64
\[c
\]