Math FPCore C Julia Wolfram TeX \[x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
\]
↓
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+302}:\\
\;\;\;\;\mathsf{fma}\left(x, x, z \cdot \left(\left(y \cdot z\right) \cdot -4\right)\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(t_1, y \cdot -4, x \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + -4 \cdot \left(z \cdot \left(y \cdot z\right)\right)\\
\end{array}
\]
(FPCore (x y z t) :precision binary64 (- (* x x) (* (* y 4.0) (- (* z z) t)))) ↓
(FPCore (x y z t)
:precision binary64
(let* ((t_1 (- (* z z) t)) (t_2 (* t_1 (* y 4.0))))
(if (<= t_2 -2e+302)
(fma x x (* z (* (* y z) -4.0)))
(if (<= t_2 2e+307)
(fma t_1 (* y -4.0) (* x x))
(+ (* x x) (* -4.0 (* z (* y z)))))))) double code(double x, double y, double z, double t) {
return (x * x) - ((y * 4.0) * ((z * z) - t));
}
↓
double code(double x, double y, double z, double t) {
double t_1 = (z * z) - t;
double t_2 = t_1 * (y * 4.0);
double tmp;
if (t_2 <= -2e+302) {
tmp = fma(x, x, (z * ((y * z) * -4.0)));
} else if (t_2 <= 2e+307) {
tmp = fma(t_1, (y * -4.0), (x * x));
} else {
tmp = (x * x) + (-4.0 * (z * (y * z)));
}
return tmp;
}
function code(x, y, z, t)
return Float64(Float64(x * x) - Float64(Float64(y * 4.0) * Float64(Float64(z * z) - t)))
end
↓
function code(x, y, z, t)
t_1 = Float64(Float64(z * z) - t)
t_2 = Float64(t_1 * Float64(y * 4.0))
tmp = 0.0
if (t_2 <= -2e+302)
tmp = fma(x, x, Float64(z * Float64(Float64(y * z) * -4.0)));
elseif (t_2 <= 2e+307)
tmp = fma(t_1, Float64(y * -4.0), Float64(x * x));
else
tmp = Float64(Float64(x * x) + Float64(-4.0 * Float64(z * Float64(y * z))));
end
return tmp
end
code[x_, y_, z_, t_] := N[(N[(x * x), $MachinePrecision] - N[(N[(y * 4.0), $MachinePrecision] * N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_, t_] := Block[{t$95$1 = N[(N[(z * z), $MachinePrecision] - t), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(y * 4.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -2e+302], N[(x * x + N[(z * N[(N[(y * z), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+307], N[(t$95$1 * N[(y * -4.0), $MachinePrecision] + N[(x * x), $MachinePrecision]), $MachinePrecision], N[(N[(x * x), $MachinePrecision] + N[(-4.0 * N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
x \cdot x - \left(y \cdot 4\right) \cdot \left(z \cdot z - t\right)
↓
\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+302}:\\
\;\;\;\;\mathsf{fma}\left(x, x, z \cdot \left(\left(y \cdot z\right) \cdot -4\right)\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;\mathsf{fma}\left(t_1, y \cdot -4, x \cdot x\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + -4 \cdot \left(z \cdot \left(y \cdot z\right)\right)\\
\end{array}
Alternatives Alternative 1 Error 0.2 Cost 7620
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+302}:\\
\;\;\;\;\mathsf{fma}\left(x, x, z \cdot \left(\left(y \cdot z\right) \cdot -4\right)\right)\\
\mathbf{elif}\;t_2 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;x \cdot x + t_1 \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + -4 \cdot \left(z \cdot \left(y \cdot z\right)\right)\\
\end{array}
\]
Alternative 2 Error 12.3 Cost 3292
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot -4\right)\\
t_3 := x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{if}\;t_1 \leq 10^{-74}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{-36}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 8 \cdot 10^{+65}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+119}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+243}:\\
\;\;\;\;t_3\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+294}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+307}:\\
\;\;\;\;t_3\\
\mathbf{else}:\\
\;\;\;\;z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\end{array}
\]
Alternative 3 Error 0.2 Cost 2121
\[\begin{array}{l}
t_1 := z \cdot z - t\\
t_2 := t_1 \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;t_2 \leq -2 \cdot 10^{+302} \lor \neg \left(t_2 \leq 2 \cdot 10^{+307}\right):\\
\;\;\;\;x \cdot x + -4 \cdot \left(z \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x + t_1 \cdot \left(y \cdot -4\right)\\
\end{array}
\]
Alternative 4 Error 27.4 Cost 1488
\[\begin{array}{l}
t_1 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
t_2 := t \cdot \left(y \cdot 4\right)\\
\mathbf{if}\;x \cdot x \leq 1.4 \cdot 10^{-249}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 4.2 \cdot 10^{-194}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \cdot x \leq 3.1 \cdot 10^{-151}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \cdot x \leq 1.5 \cdot 10^{-29}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 5 Error 7.0 Cost 1232
\[\begin{array}{l}
t_1 := x \cdot x + -4 \cdot \left(y \cdot \left(z \cdot z\right)\right)\\
t_2 := z \cdot \left(z \cdot \left(y \cdot -4\right)\right)\\
\mathbf{if}\;z \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;z \leq -2600:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 120000000000:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\mathbf{elif}\;z \leq 3.3 \cdot 10^{+138}:\\
\;\;\;\;t_1\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}
\]
Alternative 6 Error 6.1 Cost 969
\[\begin{array}{l}
\mathbf{if}\;z \leq -430 \lor \neg \left(z \leq 225000000000\right):\\
\;\;\;\;x \cdot x + -4 \cdot \left(z \cdot \left(y \cdot z\right)\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x - t \cdot \left(y \cdot -4\right)\\
\end{array}
\]
Alternative 7 Error 15.1 Cost 836
\[\begin{array}{l}
\mathbf{if}\;x \cdot x \leq 1.2 \cdot 10^{-35}:\\
\;\;\;\;\left(z \cdot z - t\right) \cdot \left(y \cdot -4\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot x\\
\end{array}
\]
Alternative 8 Error 26.5 Cost 585
\[\begin{array}{l}
\mathbf{if}\;x \leq -2.45 \cdot 10^{-76} \lor \neg \left(x \leq 2.05 \cdot 10^{-9}\right):\\
\;\;\;\;x \cdot x\\
\mathbf{else}:\\
\;\;\;\;t \cdot \left(y \cdot 4\right)\\
\end{array}
\]
Alternative 9 Error 41.9 Cost 192
\[x \cdot x
\]