\[2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\]
↓
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot z\\
t_1 := t_0 \ne 0\\
t_2 := \sqrt{t_0}\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{+26}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(-1 \cdot \left(y + x\right)\right) + -1 \cdot \log \left(\frac{-1}{z}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+104}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(y + x\right) + \log z\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\end{array}
\]
(FPCore (x y z)
:precision binary64
(* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))
↓
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* (+ y x) z)) (t_1 (!= t_0 0.0)) (t_2 (sqrt t_0)))
(if (<= z -6.1e+26)
(*
2.0
(if t_1
(/
1.0
(exp (* -0.5 (+ (log (* -1.0 (+ y x))) (* -1.0 (log (/ -1.0 z)))))))
t_2))
(if (<= z 8.8e+104)
(* 2.0 (sqrt (+ (* (+ y z) x) (* y z))))
(*
2.0
(if t_1 (/ 1.0 (exp (* -0.5 (+ (log (+ y x)) (log z))))) t_2))))))double code(double x, double y, double z) {
return 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
}
↓
double code(double x, double y, double z) {
double t_0 = (y + x) * z;
int t_1 = t_0 != 0.0;
double t_2 = sqrt(t_0);
double tmp_1;
if (z <= -6.1e+26) {
double tmp_2;
if (t_1) {
tmp_2 = 1.0 / exp((-0.5 * (log((-1.0 * (y + x))) + (-1.0 * log((-1.0 / z))))));
} else {
tmp_2 = t_2;
}
tmp_1 = 2.0 * tmp_2;
} else if (z <= 8.8e+104) {
tmp_1 = 2.0 * sqrt((((y + z) * x) + (y * z)));
} else {
double tmp_3;
if (t_1) {
tmp_3 = 1.0 / exp((-0.5 * (log((y + x)) + log(z))));
} else {
tmp_3 = t_2;
}
tmp_1 = 2.0 * tmp_3;
}
return tmp_1;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 2.0d0 * sqrt((((x * y) + (x * z)) + (y * z)))
end function
↓
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: t_0
logical :: t_1
real(8) :: t_2
real(8) :: tmp
real(8) :: tmp_1
real(8) :: tmp_2
real(8) :: tmp_3
t_0 = (y + x) * z
t_1 = t_0 /= 0.0d0
t_2 = sqrt(t_0)
if (z <= (-6.1d+26)) then
if (t_1) then
tmp_2 = 1.0d0 / exp(((-0.5d0) * (log(((-1.0d0) * (y + x))) + ((-1.0d0) * log(((-1.0d0) / z))))))
else
tmp_2 = t_2
end if
tmp_1 = 2.0d0 * tmp_2
else if (z <= 8.8d+104) then
tmp_1 = 2.0d0 * sqrt((((y + z) * x) + (y * z)))
else
if (t_1) then
tmp_3 = 1.0d0 / exp(((-0.5d0) * (log((y + x)) + log(z))))
else
tmp_3 = t_2
end if
tmp_1 = 2.0d0 * tmp_3
end if
code = tmp_1
end function
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt((((x * y) + (x * z)) + (y * z)));
}
↓
public static double code(double x, double y, double z) {
double t_0 = (y + x) * z;
boolean t_1 = t_0 != 0.0;
double t_2 = Math.sqrt(t_0);
double tmp_1;
if (z <= -6.1e+26) {
double tmp_2;
if (t_1) {
tmp_2 = 1.0 / Math.exp((-0.5 * (Math.log((-1.0 * (y + x))) + (-1.0 * Math.log((-1.0 / z))))));
} else {
tmp_2 = t_2;
}
tmp_1 = 2.0 * tmp_2;
} else if (z <= 8.8e+104) {
tmp_1 = 2.0 * Math.sqrt((((y + z) * x) + (y * z)));
} else {
double tmp_3;
if (t_1) {
tmp_3 = 1.0 / Math.exp((-0.5 * (Math.log((y + x)) + Math.log(z))));
} else {
tmp_3 = t_2;
}
tmp_1 = 2.0 * tmp_3;
}
return tmp_1;
}
def code(x, y, z):
return 2.0 * math.sqrt((((x * y) + (x * z)) + (y * z)))
↓
def code(x, y, z):
t_0 = (y + x) * z
t_1 = t_0 != 0.0
t_2 = math.sqrt(t_0)
tmp_1 = 0
if z <= -6.1e+26:
tmp_2 = 0
if t_1:
tmp_2 = 1.0 / math.exp((-0.5 * (math.log((-1.0 * (y + x))) + (-1.0 * math.log((-1.0 / z))))))
else:
tmp_2 = t_2
tmp_1 = 2.0 * tmp_2
elif z <= 8.8e+104:
tmp_1 = 2.0 * math.sqrt((((y + z) * x) + (y * z)))
else:
tmp_3 = 0
if t_1:
tmp_3 = 1.0 / math.exp((-0.5 * (math.log((y + x)) + math.log(z))))
else:
tmp_3 = t_2
tmp_1 = 2.0 * tmp_3
return tmp_1
function code(x, y, z)
return Float64(2.0 * sqrt(Float64(Float64(Float64(x * y) + Float64(x * z)) + Float64(y * z))))
end
↓
function code(x, y, z)
t_0 = Float64(Float64(y + x) * z)
t_1 = t_0 != 0.0
t_2 = sqrt(t_0)
tmp_1 = 0.0
if (z <= -6.1e+26)
tmp_2 = 0.0
if (t_1)
tmp_2 = Float64(1.0 / exp(Float64(-0.5 * Float64(log(Float64(-1.0 * Float64(y + x))) + Float64(-1.0 * log(Float64(-1.0 / z)))))));
else
tmp_2 = t_2;
end
tmp_1 = Float64(2.0 * tmp_2);
elseif (z <= 8.8e+104)
tmp_1 = Float64(2.0 * sqrt(Float64(Float64(Float64(y + z) * x) + Float64(y * z))));
else
tmp_3 = 0.0
if (t_1)
tmp_3 = Float64(1.0 / exp(Float64(-0.5 * Float64(log(Float64(y + x)) + log(z)))));
else
tmp_3 = t_2;
end
tmp_1 = Float64(2.0 * tmp_3);
end
return tmp_1
end
function tmp = code(x, y, z)
tmp = 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
end
↓
function tmp_5 = code(x, y, z)
t_0 = (y + x) * z;
t_1 = t_0 ~= 0.0;
t_2 = sqrt(t_0);
tmp_2 = 0.0;
if (z <= -6.1e+26)
tmp_3 = 0.0;
if (t_1)
tmp_3 = 1.0 / exp((-0.5 * (log((-1.0 * (y + x))) + (-1.0 * log((-1.0 / z))))));
else
tmp_3 = t_2;
end
tmp_2 = 2.0 * tmp_3;
elseif (z <= 8.8e+104)
tmp_2 = 2.0 * sqrt((((y + z) * x) + (y * z)));
else
tmp_4 = 0.0;
if (t_1)
tmp_4 = 1.0 / exp((-0.5 * (log((y + x)) + log(z))));
else
tmp_4 = t_2;
end
tmp_2 = 2.0 * tmp_4;
end
tmp_5 = tmp_2;
end
code[x_, y_, z_] := N[(2.0 * N[Sqrt[N[(N[(N[(x * y), $MachinePrecision] + N[(x * z), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
↓
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(y + x), $MachinePrecision] * z), $MachinePrecision]}, Block[{t$95$1 = Unequal[t$95$0, 0.0]}, Block[{t$95$2 = N[Sqrt[t$95$0], $MachinePrecision]}, If[LessEqual[z, -6.1e+26], N[(2.0 * If[t$95$1, N[(1.0 / N[Exp[N[(-0.5 * N[(N[Log[N[(-1.0 * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] + N[(-1.0 * N[Log[N[(-1.0 / z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]), $MachinePrecision], If[LessEqual[z, 8.8e+104], N[(2.0 * N[Sqrt[N[(N[(N[(y + z), $MachinePrecision] * x), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * If[t$95$1, N[(1.0 / N[Exp[N[(-0.5 * N[(N[Log[N[(y + x), $MachinePrecision]], $MachinePrecision] + N[Log[z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], t$95$2]), $MachinePrecision]]]]]]
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
↓
\begin{array}{l}
t_0 := \left(y + x\right) \cdot z\\
t_1 := t_0 \ne 0\\
t_2 := \sqrt{t_0}\\
\mathbf{if}\;z \leq -6.1 \cdot 10^{+26}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(-1 \cdot \left(y + x\right)\right) + -1 \cdot \log \left(\frac{-1}{z}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\mathbf{elif}\;z \leq 8.8 \cdot 10^{+104}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(y + x\right) + \log z\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\end{array}
Alternatives
| Alternative 1 |
|---|
| Error | 14.8 |
|---|
| Cost | 21064 |
|---|
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot z\\
\mathbf{if}\;\left(x \cdot y + x \cdot z\right) + y \cdot z \leq 4 \cdot 10^{+302}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_0 \ne 0:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(y + x\right) + \log z\right)}}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_0}\\
\end{array}\\
\end{array}
\]
| Alternative 2 |
|---|
| Error | 14.8 |
|---|
| Cost | 21000 |
|---|
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot z\\
\mathbf{if}\;\left(x \cdot y + x \cdot z\right) + y \cdot z \leq 4 \cdot 10^{+302}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_0 \ne 0:\\
\;\;\;\;e^{--0.5 \cdot \left(\log z + \log \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\sqrt{t_0}\\
\end{array}\\
\end{array}
\]
| Alternative 3 |
|---|
| Error | 15.4 |
|---|
| Cost | 20680 |
|---|
\[\begin{array}{l}
t_0 := \left(y + x\right) \cdot z\\
t_1 := t_0 \ne 0\\
t_2 := \sqrt{t_0}\\
\mathbf{if}\;z \leq -1.05 \cdot 10^{+103}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(-1 \cdot \log \left(\frac{-1}{y}\right) + \log \left(-1 \cdot z\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\mathbf{elif}\;z \leq 8.2 \cdot 10^{+105}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \begin{array}{l}
\mathbf{if}\;t_1:\\
\;\;\;\;\frac{1}{e^{-0.5 \cdot \left(\log \left(y + x\right) + \log z\right)}}\\
\mathbf{else}:\\
\;\;\;\;t_2\\
\end{array}\\
\end{array}
\]
| Alternative 4 |
|---|
| Error | 40.3 |
|---|
| Cost | 7512 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{z \cdot x}\\
t_1 := 2 \cdot \sqrt{y \cdot x}\\
t_2 := 2 \cdot \sqrt{y \cdot z}\\
\mathbf{if}\;x \leq -1.62 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.9 \cdot 10^{-116}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 2.1 \cdot 10^{-58}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 1.3 \cdot 10^{-7}:\\
\;\;\;\;t_2\\
\mathbf{elif}\;x \leq 4.5 \cdot 10^{+104}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;x \leq 1.5 \cdot 10^{+293}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 5 |
|---|
| Error | 26.1 |
|---|
| Cost | 7376 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{y \cdot \left(z + x\right)}\\
t_1 := 2 \cdot \sqrt{\left(y + x\right) \cdot z}\\
\mathbf{if}\;z \leq -1.55 \cdot 10^{-80}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4.8 \cdot 10^{-145}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;z \leq 6 \cdot 10^{-59}:\\
\;\;\;\;t_1\\
\mathbf{elif}\;z \leq 4 \cdot 10^{-15}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;t_1\\
\end{array}
\]
| Alternative 6 |
|---|
| Error | 25.8 |
|---|
| Cost | 7372 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{\left(y + z\right) \cdot x}\\
\mathbf{if}\;x \leq -5.1 \cdot 10^{-76}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 3.8 \cdot 10^{-144}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot \left(z + x\right)}\\
\mathbf{elif}\;x \leq 1.1 \cdot 10^{-7}:\\
\;\;\;\;2 \cdot \sqrt{z \cdot y + z \cdot x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 7 |
|---|
| Error | 25.9 |
|---|
| Cost | 7244 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{\left(y + z\right) \cdot x}\\
\mathbf{if}\;x \leq -1.04 \cdot 10^{-78}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 6 \cdot 10^{-146}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot \left(z + x\right)}\\
\mathbf{elif}\;x \leq 3.3 \cdot 10^{-6}:\\
\;\;\;\;2 \cdot \sqrt{\left(y + x\right) \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 8 |
|---|
| Error | 27.8 |
|---|
| Cost | 7112 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{y \cdot \left(z + x\right)}\\
\mathbf{if}\;y \leq -5.7 \cdot 10^{-130}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq 1.95 \cdot 10^{-125}:\\
\;\;\;\;2 \cdot \sqrt{z \cdot x}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 9 |
|---|
| Error | 19.8 |
|---|
| Cost | 7104 |
|---|
\[2 \cdot \sqrt{\left(y + z\right) \cdot x + y \cdot z}
\]
| Alternative 10 |
|---|
| Error | 40.8 |
|---|
| Cost | 6984 |
|---|
\[\begin{array}{l}
t_0 := 2 \cdot \sqrt{y \cdot x}\\
\mathbf{if}\;x \leq -1.45 \cdot 10^{-8}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;x \leq 7.2 \cdot 10^{-6}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;t_0\\
\end{array}
\]
| Alternative 11 |
|---|
| Error | 48.3 |
|---|
| Cost | 6720 |
|---|
\[2 \cdot \sqrt{y \cdot x}
\]