
(FPCore (x y z) :precision binary64 (* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))
double code(double x, double y, double z) {
return 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
}
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
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt((((x * y) + (x * z)) + (y * z)));
}
def code(x, y, z): return 2.0 * math.sqrt((((x * y) + (x * z)) + (y * z)))
function code(x, y, z) return Float64(2.0 * sqrt(Float64(Float64(Float64(x * y) + Float64(x * z)) + Float64(y * z)))) end
function tmp = code(x, y, z) tmp = 2.0 * sqrt((((x * y) + (x * z)) + (y * z))); 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]
\begin{array}{l}
\\
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 14 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))
double code(double x, double y, double z) {
return 2.0 * sqrt((((x * y) + (x * z)) + (y * z)));
}
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
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt((((x * y) + (x * z)) + (y * z)));
}
def code(x, y, z): return 2.0 * math.sqrt((((x * y) + (x * z)) + (y * z)))
function code(x, y, z) return Float64(2.0 * sqrt(Float64(Float64(Float64(x * y) + Float64(x * z)) + Float64(y * z)))) end
function tmp = code(x, y, z) tmp = 2.0 * sqrt((((x * y) + (x * z)) + (y * z))); 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]
\begin{array}{l}
\\
2 \cdot \sqrt{\left(x \cdot y + x \cdot z\right) + y \cdot z}
\end{array}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (- (- x) z))
(t_1 (pow (exp -0.5) (fma -1.0 (log (/ -1.0 y)) (log t_0))))
(t_2 (log (cbrt (/ -1.0 x)))))
(if (<= y -7.5e+50)
(* 2.0 (/ 1.0 (fma 0.5 (* (/ z y) (/ (* x t_1) t_0)) t_1)))
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y 6.8e-275)
(* 2.0 (exp (* 0.5 (- (log (- (- y) z)) (+ t_2 (* 2.0 t_2))))))
(* 2.0 (* (sqrt z) (sqrt y))))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double t_0 = -x - z;
double t_1 = pow(exp(-0.5), fma(-1.0, log((-1.0 / y)), log(t_0)));
double t_2 = log(cbrt((-1.0 / x)));
double tmp;
if (y <= -7.5e+50) {
tmp = 2.0 * (1.0 / fma(0.5, ((z / y) * ((x * t_1) / t_0)), t_1));
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= 6.8e-275) {
tmp = 2.0 * exp((0.5 * (log((-y - z)) - (t_2 + (2.0 * t_2)))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
x, y, z = sort([x, y, z]) function code(x, y, z) t_0 = Float64(Float64(-x) - z) t_1 = exp(-0.5) ^ fma(-1.0, log(Float64(-1.0 / y)), log(t_0)) t_2 = log(cbrt(Float64(-1.0 / x))) tmp = 0.0 if (y <= -7.5e+50) tmp = Float64(2.0 * Float64(1.0 / fma(0.5, Float64(Float64(z / y) * Float64(Float64(x * t_1) / t_0)), t_1))); elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= 6.8e-275) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(Float64(-y) - z)) - Float64(t_2 + Float64(2.0 * t_2)))))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[((-x) - z), $MachinePrecision]}, Block[{t$95$1 = N[Power[N[Exp[-0.5], $MachinePrecision], N[(-1.0 * N[Log[N[(-1.0 / y), $MachinePrecision]], $MachinePrecision] + N[Log[t$95$0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, Block[{t$95$2 = N[Log[N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -7.5e+50], N[(2.0 * N[(1.0 / N[(0.5 * N[(N[(z / y), $MachinePrecision] * N[(N[(x * t$95$1), $MachinePrecision] / t$95$0), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.8e-275], N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[N[((-y) - z), $MachinePrecision]], $MachinePrecision] - N[(t$95$2 + N[(2.0 * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
t_0 := \left(-x\right) - z\\
t_1 := {\left(e^{-0.5}\right)}^{\left(\mathsf{fma}\left(-1, \log \left(\frac{-1}{y}\right), \log t_0\right)\right)}\\
t_2 := \log \left(\sqrt[3]{\frac{-1}{x}}\right)\\
\mathbf{if}\;y \leq -7.5 \cdot 10^{+50}:\\
\;\;\;\;2 \cdot \frac{1}{\mathsf{fma}\left(0.5, \frac{z}{y} \cdot \frac{x \cdot t_1}{t_0}, t_1\right)}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq 6.8 \cdot 10^{-275}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(\log \left(\left(-y\right) - z\right) - \left(t_2 + 2 \cdot t_2\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -7.4999999999999999e50Initial program 55.9%
distribute-lft-out55.9%
Simplified55.9%
flip-+18.4%
clear-num18.3%
pow218.3%
pow218.3%
Applied egg-rr18.3%
inv-pow18.3%
sqrt-pow118.3%
clear-num18.4%
unpow218.4%
unpow218.4%
flip-+55.9%
fma-udef56.2%
+-commutative56.2%
*-commutative56.2%
metadata-eval56.2%
Applied egg-rr56.2%
fma-def55.9%
distribute-rgt-in55.9%
+-commutative55.9%
associate-+r+55.9%
distribute-lft-out56.0%
+-commutative56.0%
*-commutative56.0%
fma-def56.2%
Simplified56.2%
add-sqr-sqrt56.1%
unpow-prod-down55.9%
inv-pow55.9%
sqrt-pow155.9%
metadata-eval55.9%
inv-pow55.9%
sqrt-pow155.9%
metadata-eval55.9%
Applied egg-rr55.9%
pow-sqr56.1%
metadata-eval56.1%
unpow-156.1%
*-commutative56.1%
+-commutative56.1%
Simplified56.1%
Taylor expanded in y around -inf 85.0%
fma-def85.0%
Simplified85.0%
if -7.4999999999999999e50 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -3.5000000000000001e-180 < y < 6.79999999999999936e-275Initial program 70.8%
distribute-lft-out70.8%
Simplified70.8%
Taylor expanded in x around inf 68.5%
pow1/268.5%
metadata-eval68.5%
*-commutative68.5%
pow-to-exp63.4%
+-commutative63.4%
metadata-eval63.4%
Applied egg-rr63.4%
Taylor expanded in x around -inf 46.1%
+-commutative46.1%
mul-1-neg46.1%
unsub-neg46.1%
distribute-lft-in46.1%
mul-1-neg46.1%
unsub-neg46.1%
mul-1-neg46.1%
Simplified46.1%
add-cube-cbrt46.1%
log-prod46.1%
pow246.1%
Applied egg-rr46.1%
log-pow46.1%
Simplified46.1%
if 6.79999999999999936e-275 < y Initial program 69.7%
distribute-lft-out69.8%
Simplified69.8%
Taylor expanded in x around 0 22.7%
*-commutative22.7%
sqrt-prod29.9%
Applied egg-rr29.9%
Final simplification50.7%
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (log (cbrt (/ -1.0 x)))) (t_1 (log (- (- y) z))))
(if (<= y -2.3e+50)
(* 2.0 (exp (* 0.5 (- t_1 (log (/ -1.0 x))))))
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y 3.4e-275)
(* 2.0 (exp (* 0.5 (- t_1 (+ t_0 (* 2.0 t_0))))))
(* 2.0 (* (sqrt z) (sqrt y))))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double t_0 = log(cbrt((-1.0 / x)));
double t_1 = log((-y - z));
double tmp;
if (y <= -2.3e+50) {
tmp = 2.0 * exp((0.5 * (t_1 - log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= 3.4e-275) {
tmp = 2.0 * exp((0.5 * (t_1 - (t_0 + (2.0 * t_0)))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
assert x < y && y < z;
public static double code(double x, double y, double z) {
double t_0 = Math.log(Math.cbrt((-1.0 / x)));
double t_1 = Math.log((-y - z));
double tmp;
if (y <= -2.3e+50) {
tmp = 2.0 * Math.exp((0.5 * (t_1 - Math.log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else if (y <= 3.4e-275) {
tmp = 2.0 * Math.exp((0.5 * (t_1 - (t_0 + (2.0 * t_0)))));
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
x, y, z = sort([x, y, z]) function code(x, y, z) t_0 = log(cbrt(Float64(-1.0 / x))) t_1 = log(Float64(Float64(-y) - z)) tmp = 0.0 if (y <= -2.3e+50) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(t_1 - log(Float64(-1.0 / x)))))); elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= 3.4e-275) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(t_1 - Float64(t_0 + Float64(2.0 * t_0)))))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[Log[N[Power[N[(-1.0 / x), $MachinePrecision], 1/3], $MachinePrecision]], $MachinePrecision]}, Block[{t$95$1 = N[Log[N[((-y) - z), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[y, -2.3e+50], N[(2.0 * N[Exp[N[(0.5 * N[(t$95$1 - N[Log[N[(-1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-275], N[(2.0 * N[Exp[N[(0.5 * N[(t$95$1 - N[(t$95$0 + N[(2.0 * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
t_0 := \log \left(\sqrt[3]{\frac{-1}{x}}\right)\\
t_1 := \log \left(\left(-y\right) - z\right)\\
\mathbf{if}\;y \leq -2.3 \cdot 10^{+50}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(t_1 - \log \left(\frac{-1}{x}\right)\right)}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq 3.4 \cdot 10^{-275}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(t_1 - \left(t_0 + 2 \cdot t_0\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -2.29999999999999997e50Initial program 55.9%
distribute-lft-out55.9%
Simplified55.9%
Taylor expanded in x around inf 33.4%
pow1/233.4%
metadata-eval33.4%
*-commutative33.4%
pow-to-exp31.1%
+-commutative31.1%
metadata-eval31.1%
Applied egg-rr31.1%
Taylor expanded in x around -inf 48.6%
+-commutative48.6%
mul-1-neg48.6%
unsub-neg48.6%
distribute-lft-in48.6%
mul-1-neg48.6%
unsub-neg48.6%
mul-1-neg48.6%
Simplified48.6%
if -2.29999999999999997e50 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -3.5000000000000001e-180 < y < 3.39999999999999968e-275Initial program 70.8%
distribute-lft-out70.8%
Simplified70.8%
Taylor expanded in x around inf 68.5%
pow1/268.5%
metadata-eval68.5%
*-commutative68.5%
pow-to-exp63.4%
+-commutative63.4%
metadata-eval63.4%
Applied egg-rr63.4%
Taylor expanded in x around -inf 46.1%
+-commutative46.1%
mul-1-neg46.1%
unsub-neg46.1%
distribute-lft-in46.1%
mul-1-neg46.1%
unsub-neg46.1%
mul-1-neg46.1%
Simplified46.1%
add-cube-cbrt46.1%
log-prod46.1%
pow246.1%
Applied egg-rr46.1%
log-pow46.1%
Simplified46.1%
if 3.39999999999999968e-275 < y Initial program 69.7%
distribute-lft-out69.8%
Simplified69.8%
Taylor expanded in x around 0 22.7%
*-commutative22.7%
sqrt-prod29.9%
Applied egg-rr29.9%
Final simplification40.9%
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(if (<= y -2.25e+50)
(* 2.0 (exp (* 0.5 (- (log (- (- y) z)) (log (/ -1.0 x))))))
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y -2e-310)
(* 2.0 (pow (exp (* 0.25 (- (log (- x)) (log (/ -1.0 y))))) 2.0))
(* 2.0 (* (sqrt z) (sqrt y)))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -2.25e+50) {
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * pow(exp((0.25 * (log(-x) - log((-1.0 / y))))), 2.0);
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-2.25d+50)) then
tmp = 2.0d0 * exp((0.5d0 * (log((-y - z)) - log(((-1.0d0) / x)))))
else if (y <= (-3.5d-180)) then
tmp = 2.0d0 * sqrt((x * (y + z)))
else if (y <= (-2d-310)) then
tmp = 2.0d0 * (exp((0.25d0 * (log(-x) - log(((-1.0d0) / y))))) ** 2.0d0)
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2.25e+50) {
tmp = 2.0 * Math.exp((0.5 * (Math.log((-y - z)) - Math.log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * Math.pow(Math.exp((0.25 * (Math.log(-x) - Math.log((-1.0 / y))))), 2.0);
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -2.25e+50: tmp = 2.0 * math.exp((0.5 * (math.log((-y - z)) - math.log((-1.0 / x))))) elif y <= -3.5e-180: tmp = 2.0 * math.sqrt((x * (y + z))) elif y <= -2e-310: tmp = 2.0 * math.pow(math.exp((0.25 * (math.log(-x) - math.log((-1.0 / y))))), 2.0) else: tmp = 2.0 * (math.sqrt(z) * math.sqrt(y)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -2.25e+50) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(Float64(-y) - z)) - log(Float64(-1.0 / x)))))); elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= -2e-310) tmp = Float64(2.0 * (exp(Float64(0.25 * Float64(log(Float64(-x)) - log(Float64(-1.0 / y))))) ^ 2.0)); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -2.25e+50)
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
elseif (y <= -3.5e-180)
tmp = 2.0 * sqrt((x * (y + z)));
elseif (y <= -2e-310)
tmp = 2.0 * (exp((0.25 * (log(-x) - log((-1.0 / y))))) ^ 2.0);
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -2.25e+50], N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[N[((-y) - z), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-310], N[(2.0 * N[Power[N[Exp[N[(0.25 * N[(N[Log[(-x)], $MachinePrecision] - N[Log[N[(-1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.25 \cdot 10^{+50}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(\log \left(\left(-y\right) - z\right) - \log \left(\frac{-1}{x}\right)\right)}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-310}:\\
\;\;\;\;2 \cdot {\left(e^{0.25 \cdot \left(\log \left(-x\right) - \log \left(\frac{-1}{y}\right)\right)}\right)}^{2}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -2.25000000000000007e50Initial program 55.9%
distribute-lft-out55.9%
Simplified55.9%
Taylor expanded in x around inf 33.4%
pow1/233.4%
metadata-eval33.4%
*-commutative33.4%
pow-to-exp31.1%
+-commutative31.1%
metadata-eval31.1%
Applied egg-rr31.1%
Taylor expanded in x around -inf 48.6%
+-commutative48.6%
mul-1-neg48.6%
unsub-neg48.6%
distribute-lft-in48.6%
mul-1-neg48.6%
unsub-neg48.6%
mul-1-neg48.6%
Simplified48.6%
if -2.25000000000000007e50 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -3.5000000000000001e-180 < y < -1.999999999999994e-310Initial program 67.0%
distribute-lft-out67.0%
Simplified67.0%
add-sqr-sqrt66.7%
pow266.7%
pow1/266.7%
sqrt-pow166.7%
fma-def66.7%
metadata-eval66.7%
Applied egg-rr66.7%
Taylor expanded in z around 0 8.1%
Taylor expanded in y around -inf 7.1%
if -1.999999999999994e-310 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in x around 0 22.2%
*-commutative22.2%
sqrt-prod29.2%
Applied egg-rr29.2%
Final simplification36.9%
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(if (<= y -5.6e+52)
(* 2.0 (exp (* 0.5 (- (log (- (- y) z)) (log (/ -1.0 x))))))
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y -2e-310)
(* 2.0 (/ 1.0 (exp (* -0.5 (- (log (- (- x) z)) (log (/ -1.0 y)))))))
(* 2.0 (* (sqrt z) (sqrt y)))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -5.6e+52) {
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * (1.0 / exp((-0.5 * (log((-x - z)) - log((-1.0 / y))))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-5.6d+52)) then
tmp = 2.0d0 * exp((0.5d0 * (log((-y - z)) - log(((-1.0d0) / x)))))
else if (y <= (-3.5d-180)) then
tmp = 2.0d0 * sqrt((x * (y + z)))
else if (y <= (-2d-310)) then
tmp = 2.0d0 * (1.0d0 / exp(((-0.5d0) * (log((-x - z)) - log(((-1.0d0) / y))))))
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -5.6e+52) {
tmp = 2.0 * Math.exp((0.5 * (Math.log((-y - z)) - Math.log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * (1.0 / Math.exp((-0.5 * (Math.log((-x - z)) - Math.log((-1.0 / y))))));
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -5.6e+52: tmp = 2.0 * math.exp((0.5 * (math.log((-y - z)) - math.log((-1.0 / x))))) elif y <= -3.5e-180: tmp = 2.0 * math.sqrt((x * (y + z))) elif y <= -2e-310: tmp = 2.0 * (1.0 / math.exp((-0.5 * (math.log((-x - z)) - math.log((-1.0 / y)))))) else: tmp = 2.0 * (math.sqrt(z) * math.sqrt(y)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -5.6e+52) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(Float64(-y) - z)) - log(Float64(-1.0 / x)))))); elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= -2e-310) tmp = Float64(2.0 * Float64(1.0 / exp(Float64(-0.5 * Float64(log(Float64(Float64(-x) - z)) - log(Float64(-1.0 / y))))))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -5.6e+52)
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
elseif (y <= -3.5e-180)
tmp = 2.0 * sqrt((x * (y + z)));
elseif (y <= -2e-310)
tmp = 2.0 * (1.0 / exp((-0.5 * (log((-x - z)) - log((-1.0 / y))))));
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -5.6e+52], N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[N[((-y) - z), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-310], N[(2.0 * N[(1.0 / N[Exp[N[(-0.5 * N[(N[Log[N[((-x) - z), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.6 \cdot 10^{+52}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(\log \left(\left(-y\right) - z\right) - \log \left(\frac{-1}{x}\right)\right)}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-310}:\\
\;\;\;\;2 \cdot \frac{1}{e^{-0.5 \cdot \left(\log \left(\left(-x\right) - z\right) - \log \left(\frac{-1}{y}\right)\right)}}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -5.6e52Initial program 55.9%
distribute-lft-out55.9%
Simplified55.9%
Taylor expanded in x around inf 33.4%
pow1/233.4%
metadata-eval33.4%
*-commutative33.4%
pow-to-exp31.1%
+-commutative31.1%
metadata-eval31.1%
Applied egg-rr31.1%
Taylor expanded in x around -inf 48.6%
+-commutative48.6%
mul-1-neg48.6%
unsub-neg48.6%
distribute-lft-in48.6%
mul-1-neg48.6%
unsub-neg48.6%
mul-1-neg48.6%
Simplified48.6%
if -5.6e52 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -3.5000000000000001e-180 < y < -1.999999999999994e-310Initial program 67.0%
distribute-lft-out67.0%
Simplified67.0%
flip-+48.6%
clear-num48.4%
pow248.4%
pow248.4%
Applied egg-rr48.4%
inv-pow48.4%
sqrt-pow148.5%
clear-num48.5%
unpow248.5%
unpow248.5%
flip-+67.0%
fma-udef67.0%
+-commutative67.0%
*-commutative67.0%
metadata-eval67.0%
Applied egg-rr67.0%
fma-def67.0%
distribute-rgt-in67.0%
+-commutative67.0%
associate-+r+67.0%
distribute-lft-out67.0%
+-commutative67.0%
*-commutative67.0%
fma-def67.0%
Simplified67.0%
add-sqr-sqrt66.2%
unpow-prod-down66.1%
inv-pow66.1%
sqrt-pow166.2%
metadata-eval66.2%
inv-pow66.2%
sqrt-pow166.6%
metadata-eval66.6%
Applied egg-rr66.6%
pow-sqr66.8%
metadata-eval66.8%
unpow-166.8%
*-commutative66.8%
+-commutative66.8%
Simplified66.8%
Taylor expanded in y around -inf 18.4%
if -1.999999999999994e-310 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in x around 0 22.2%
*-commutative22.2%
sqrt-prod29.2%
Applied egg-rr29.2%
Final simplification38.0%
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* 2.0 (exp (* 0.5 (- (log (- x)) (log (/ -1.0 y))))))))
(if (<= y -7e+50)
t_0
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y -2e-310) t_0 (* 2.0 (* (sqrt z) (sqrt y))))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double t_0 = 2.0 * exp((0.5 * (log(-x) - log((-1.0 / y)))));
double tmp;
if (y <= -7e+50) {
tmp = t_0;
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = t_0;
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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
real(8) :: tmp
t_0 = 2.0d0 * exp((0.5d0 * (log(-x) - log(((-1.0d0) / y)))))
if (y <= (-7d+50)) then
tmp = t_0
else if (y <= (-3.5d-180)) then
tmp = 2.0d0 * sqrt((x * (y + z)))
else if (y <= (-2d-310)) then
tmp = t_0
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double t_0 = 2.0 * Math.exp((0.5 * (Math.log(-x) - Math.log((-1.0 / y)))));
double tmp;
if (y <= -7e+50) {
tmp = t_0;
} else if (y <= -3.5e-180) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = t_0;
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): t_0 = 2.0 * math.exp((0.5 * (math.log(-x) - math.log((-1.0 / y))))) tmp = 0 if y <= -7e+50: tmp = t_0 elif y <= -3.5e-180: tmp = 2.0 * math.sqrt((x * (y + z))) elif y <= -2e-310: tmp = t_0 else: tmp = 2.0 * (math.sqrt(z) * math.sqrt(y)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) t_0 = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(-x)) - log(Float64(-1.0 / y)))))) tmp = 0.0 if (y <= -7e+50) tmp = t_0; elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= -2e-310) tmp = t_0; else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
t_0 = 2.0 * exp((0.5 * (log(-x) - log((-1.0 / y)))));
tmp = 0.0;
if (y <= -7e+50)
tmp = t_0;
elseif (y <= -3.5e-180)
tmp = 2.0 * sqrt((x * (y + z)));
elseif (y <= -2e-310)
tmp = t_0;
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[(-x)], $MachinePrecision] - N[Log[N[(-1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7e+50], t$95$0, If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-310], t$95$0, N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
t_0 := 2 \cdot e^{0.5 \cdot \left(\log \left(-x\right) - \log \left(\frac{-1}{y}\right)\right)}\\
\mathbf{if}\;y \leq -7 \cdot 10^{+50}:\\
\;\;\;\;t_0\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-310}:\\
\;\;\;\;t_0\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -7.00000000000000012e50 or -3.5000000000000001e-180 < y < -1.999999999999994e-310Initial program 58.7%
distribute-lft-out58.7%
Simplified58.7%
Taylor expanded in x around inf 41.1%
pow1/241.2%
metadata-eval41.2%
*-commutative41.2%
pow-to-exp38.3%
+-commutative38.3%
metadata-eval38.3%
Applied egg-rr38.3%
Taylor expanded in y around -inf 35.5%
+-commutative35.5%
mul-1-neg35.5%
unsub-neg35.5%
mul-1-neg35.5%
Simplified35.5%
if -7.00000000000000012e50 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -1.999999999999994e-310 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in x around 0 22.2%
*-commutative22.2%
sqrt-prod29.2%
Applied egg-rr29.2%
Final simplification36.0%
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(if (<= y -1e+51)
(* 2.0 (exp (* 0.5 (- (log (- (- y) z)) (log (/ -1.0 x))))))
(if (<= y -3.5e-180)
(* 2.0 (sqrt (* x (+ y z))))
(if (<= y -2e-310)
(* 2.0 (exp (* 0.5 (- (log (- x)) (log (/ -1.0 y))))))
(* 2.0 (* (sqrt z) (sqrt y)))))))assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -1e+51) {
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * exp((0.5 * (log(-x) - log((-1.0 / y)))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-1d+51)) then
tmp = 2.0d0 * exp((0.5d0 * (log((-y - z)) - log(((-1.0d0) / x)))))
else if (y <= (-3.5d-180)) then
tmp = 2.0d0 * sqrt((x * (y + z)))
else if (y <= (-2d-310)) then
tmp = 2.0d0 * exp((0.5d0 * (log(-x) - log(((-1.0d0) / y)))))
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -1e+51) {
tmp = 2.0 * Math.exp((0.5 * (Math.log((-y - z)) - Math.log((-1.0 / x)))));
} else if (y <= -3.5e-180) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else if (y <= -2e-310) {
tmp = 2.0 * Math.exp((0.5 * (Math.log(-x) - Math.log((-1.0 / y)))));
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -1e+51: tmp = 2.0 * math.exp((0.5 * (math.log((-y - z)) - math.log((-1.0 / x))))) elif y <= -3.5e-180: tmp = 2.0 * math.sqrt((x * (y + z))) elif y <= -2e-310: tmp = 2.0 * math.exp((0.5 * (math.log(-x) - math.log((-1.0 / y))))) else: tmp = 2.0 * (math.sqrt(z) * math.sqrt(y)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -1e+51) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(Float64(-y) - z)) - log(Float64(-1.0 / x)))))); elseif (y <= -3.5e-180) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); elseif (y <= -2e-310) tmp = Float64(2.0 * exp(Float64(0.5 * Float64(log(Float64(-x)) - log(Float64(-1.0 / y)))))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -1e+51)
tmp = 2.0 * exp((0.5 * (log((-y - z)) - log((-1.0 / x)))));
elseif (y <= -3.5e-180)
tmp = 2.0 * sqrt((x * (y + z)));
elseif (y <= -2e-310)
tmp = 2.0 * exp((0.5 * (log(-x) - log((-1.0 / y)))));
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -1e+51], N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[N[((-y) - z), $MachinePrecision]], $MachinePrecision] - N[Log[N[(-1.0 / x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -3.5e-180], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-310], N[(2.0 * N[Exp[N[(0.5 * N[(N[Log[(-x)], $MachinePrecision] - N[Log[N[(-1.0 / y), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{+51}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(\log \left(\left(-y\right) - z\right) - \log \left(\frac{-1}{x}\right)\right)}\\
\mathbf{elif}\;y \leq -3.5 \cdot 10^{-180}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{elif}\;y \leq -2 \cdot 10^{-310}:\\
\;\;\;\;2 \cdot e^{0.5 \cdot \left(\log \left(-x\right) - \log \left(\frac{-1}{y}\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < -1e51Initial program 55.9%
distribute-lft-out55.9%
Simplified55.9%
Taylor expanded in x around inf 33.4%
pow1/233.4%
metadata-eval33.4%
*-commutative33.4%
pow-to-exp31.1%
+-commutative31.1%
metadata-eval31.1%
Applied egg-rr31.1%
Taylor expanded in x around -inf 48.6%
+-commutative48.6%
mul-1-neg48.6%
unsub-neg48.6%
distribute-lft-in48.6%
mul-1-neg48.6%
unsub-neg48.6%
mul-1-neg48.6%
Simplified48.6%
if -1e51 < y < -3.5000000000000001e-180Initial program 86.7%
distribute-lft-out86.7%
Simplified86.7%
Taylor expanded in x around inf 55.8%
if -3.5000000000000001e-180 < y < -1.999999999999994e-310Initial program 67.0%
distribute-lft-out67.0%
Simplified67.0%
Taylor expanded in x around inf 64.4%
pow1/264.4%
metadata-eval64.4%
*-commutative64.4%
pow-to-exp59.7%
+-commutative59.7%
metadata-eval59.7%
Applied egg-rr59.7%
Taylor expanded in y around -inf 7.1%
+-commutative7.1%
mul-1-neg7.1%
unsub-neg7.1%
mul-1-neg7.1%
Simplified7.1%
if -1.999999999999994e-310 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in x around 0 22.2%
*-commutative22.2%
sqrt-prod29.2%
Applied egg-rr29.2%
Final simplification36.9%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= y 210000000000.0) (* 2.0 (sqrt (fma z y (* x (+ y z))))) (* 2.0 (* (sqrt z) (sqrt y)))))
assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= 210000000000.0) {
tmp = 2.0 * sqrt(fma(z, y, (x * (y + z))));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= 210000000000.0) tmp = Float64(2.0 * sqrt(fma(z, y, Float64(x * Float64(y + z))))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, 210000000000.0], N[(2.0 * N[Sqrt[N[(z * y + N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 210000000000:\\
\;\;\;\;2 \cdot \sqrt{\mathsf{fma}\left(z, y, x \cdot \left(y + z\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < 2.1e11Initial program 74.2%
distribute-lft-out74.2%
Simplified74.2%
+-commutative74.2%
*-commutative74.2%
fma-def74.3%
Applied egg-rr74.3%
if 2.1e11 < y Initial program 51.1%
distribute-lft-out51.2%
Simplified51.2%
Taylor expanded in x around 0 25.0%
*-commutative25.0%
sqrt-prod40.1%
Applied egg-rr40.1%
Final simplification66.5%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= y 530000000000.0) (* 2.0 (sqrt (+ (* x (+ y z)) (* y z)))) (* 2.0 (* (sqrt z) (sqrt y)))))
assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= 530000000000.0) {
tmp = 2.0 * sqrt(((x * (y + z)) + (y * z)));
} else {
tmp = 2.0 * (sqrt(z) * sqrt(y));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= 530000000000.0d0) then
tmp = 2.0d0 * sqrt(((x * (y + z)) + (y * z)))
else
tmp = 2.0d0 * (sqrt(z) * sqrt(y))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= 530000000000.0) {
tmp = 2.0 * Math.sqrt(((x * (y + z)) + (y * z)));
} else {
tmp = 2.0 * (Math.sqrt(z) * Math.sqrt(y));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= 530000000000.0: tmp = 2.0 * math.sqrt(((x * (y + z)) + (y * z))) else: tmp = 2.0 * (math.sqrt(z) * math.sqrt(y)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= 530000000000.0) tmp = Float64(2.0 * sqrt(Float64(Float64(x * Float64(y + z)) + Float64(y * z)))); else tmp = Float64(2.0 * Float64(sqrt(z) * sqrt(y))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= 530000000000.0)
tmp = 2.0 * sqrt(((x * (y + z)) + (y * z)));
else
tmp = 2.0 * (sqrt(z) * sqrt(y));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, 530000000000.0], N[(2.0 * N[Sqrt[N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[(N[Sqrt[z], $MachinePrecision] * N[Sqrt[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 530000000000:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right) + y \cdot z}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \left(\sqrt{z} \cdot \sqrt{y}\right)\\
\end{array}
\end{array}
if y < 5.3e11Initial program 74.2%
distribute-lft-out74.2%
Simplified74.2%
if 5.3e11 < y Initial program 51.1%
distribute-lft-out51.2%
Simplified51.2%
Taylor expanded in x around 0 25.0%
*-commutative25.0%
sqrt-prod40.1%
Applied egg-rr40.1%
Final simplification66.5%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (* 2.0 (sqrt (+ (* x (+ y z)) (* y z)))))
assert(x < y && y < z);
double code(double x, double y, double z) {
return 2.0 * sqrt(((x * (y + z)) + (y * z)));
}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
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 + z)) + (y * z)))
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt(((x * (y + z)) + (y * z)));
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): return 2.0 * math.sqrt(((x * (y + z)) + (y * z)))
x, y, z = sort([x, y, z]) function code(x, y, z) return Float64(2.0 * sqrt(Float64(Float64(x * Float64(y + z)) + Float64(y * z)))) end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp = code(x, y, z)
tmp = 2.0 * sqrt(((x * (y + z)) + (y * z)));
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(2.0 * N[Sqrt[N[(N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision] + N[(y * z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
2 \cdot \sqrt{x \cdot \left(y + z\right) + y \cdot z}
\end{array}
Initial program 69.0%
distribute-lft-out69.0%
Simplified69.0%
Final simplification69.0%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (* 2.0 (pow (/ (/ 1.0 y) (+ z x)) -0.5)))
assert(x < y && y < z);
double code(double x, double y, double z) {
return 2.0 * pow(((1.0 / y) / (z + x)), -0.5);
}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
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 * (((1.0d0 / y) / (z + x)) ** (-0.5d0))
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
return 2.0 * Math.pow(((1.0 / y) / (z + x)), -0.5);
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): return 2.0 * math.pow(((1.0 / y) / (z + x)), -0.5)
x, y, z = sort([x, y, z]) function code(x, y, z) return Float64(2.0 * (Float64(Float64(1.0 / y) / Float64(z + x)) ^ -0.5)) end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp = code(x, y, z)
tmp = 2.0 * (((1.0 / y) / (z + x)) ^ -0.5);
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(2.0 * N[Power[N[(N[(1.0 / y), $MachinePrecision] / N[(z + x), $MachinePrecision]), $MachinePrecision], -0.5], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
2 \cdot {\left(\frac{\frac{1}{y}}{z + x}\right)}^{-0.5}
\end{array}
Initial program 69.0%
distribute-lft-out69.0%
Simplified69.0%
flip-+34.7%
clear-num34.7%
pow234.7%
pow234.7%
Applied egg-rr34.7%
inv-pow34.7%
sqrt-pow134.7%
clear-num34.6%
unpow234.6%
unpow234.6%
flip-+68.8%
fma-udef69.0%
+-commutative69.0%
*-commutative69.0%
metadata-eval69.0%
Applied egg-rr69.0%
fma-def68.8%
distribute-rgt-in68.8%
+-commutative68.8%
associate-+r+68.8%
distribute-lft-out68.8%
+-commutative68.8%
*-commutative68.8%
fma-def69.0%
Simplified69.0%
Taylor expanded in y around inf 44.9%
associate-/r*45.6%
Simplified45.6%
Final simplification45.6%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= y -4.8e-264) (* 2.0 (sqrt (* y x))) (* 2.0 (sqrt (* z (+ y x))))))
assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -4.8e-264) {
tmp = 2.0 * sqrt((y * x));
} else {
tmp = 2.0 * sqrt((z * (y + x)));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-4.8d-264)) then
tmp = 2.0d0 * sqrt((y * x))
else
tmp = 2.0d0 * sqrt((z * (y + x)))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -4.8e-264) {
tmp = 2.0 * Math.sqrt((y * x));
} else {
tmp = 2.0 * Math.sqrt((z * (y + x)));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -4.8e-264: tmp = 2.0 * math.sqrt((y * x)) else: tmp = 2.0 * math.sqrt((z * (y + x))) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -4.8e-264) tmp = Float64(2.0 * sqrt(Float64(y * x))); else tmp = Float64(2.0 * sqrt(Float64(z * Float64(y + x)))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -4.8e-264)
tmp = 2.0 * sqrt((y * x));
else
tmp = 2.0 * sqrt((z * (y + x)));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -4.8e-264], N[(2.0 * N[Sqrt[N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Sqrt[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-264}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot x}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \sqrt{z \cdot \left(y + x\right)}\\
\end{array}
\end{array}
if y < -4.7999999999999997e-264Initial program 68.3%
distribute-lft-out68.3%
Simplified68.3%
Taylor expanded in z around 0 28.6%
if -4.7999999999999997e-264 < y Initial program 69.6%
distribute-lft-out69.6%
Simplified69.6%
Taylor expanded in z around inf 52.1%
Final simplification40.5%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= y -2e-303) (* 2.0 (sqrt (* x (+ y z)))) (* 2.0 (sqrt (* z (+ y x))))))
assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -2e-303) {
tmp = 2.0 * sqrt((x * (y + z)));
} else {
tmp = 2.0 * sqrt((z * (y + x)));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-2d-303)) then
tmp = 2.0d0 * sqrt((x * (y + z)))
else
tmp = 2.0d0 * sqrt((z * (y + x)))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2e-303) {
tmp = 2.0 * Math.sqrt((x * (y + z)));
} else {
tmp = 2.0 * Math.sqrt((z * (y + x)));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -2e-303: tmp = 2.0 * math.sqrt((x * (y + z))) else: tmp = 2.0 * math.sqrt((z * (y + x))) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -2e-303) tmp = Float64(2.0 * sqrt(Float64(x * Float64(y + z)))); else tmp = Float64(2.0 * sqrt(Float64(z * Float64(y + x)))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -2e-303)
tmp = 2.0 * sqrt((x * (y + z)));
else
tmp = 2.0 * sqrt((z * (y + x)));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -2e-303], N[(2.0 * N[Sqrt[N[(x * N[(y + z), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Sqrt[N[(z * N[(y + x), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-303}:\\
\;\;\;\;2 \cdot \sqrt{x \cdot \left(y + z\right)}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \sqrt{z \cdot \left(y + x\right)}\\
\end{array}
\end{array}
if y < -1.99999999999999986e-303Initial program 67.6%
distribute-lft-out67.6%
Simplified67.6%
Taylor expanded in x around inf 45.8%
if -1.99999999999999986e-303 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in z around inf 51.6%
Final simplification48.6%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= y -2e-310) (* 2.0 (sqrt (* y x))) (* 2.0 (sqrt (* y z)))))
assert(x < y && y < z);
double code(double x, double y, double z) {
double tmp;
if (y <= -2e-310) {
tmp = 2.0 * sqrt((y * x));
} else {
tmp = 2.0 * sqrt((y * z));
}
return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this 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) :: tmp
if (y <= (-2d-310)) then
tmp = 2.0d0 * sqrt((y * x))
else
tmp = 2.0d0 * sqrt((y * z))
end if
code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
double tmp;
if (y <= -2e-310) {
tmp = 2.0 * Math.sqrt((y * x));
} else {
tmp = 2.0 * Math.sqrt((y * z));
}
return tmp;
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): tmp = 0 if y <= -2e-310: tmp = 2.0 * math.sqrt((y * x)) else: tmp = 2.0 * math.sqrt((y * z)) return tmp
x, y, z = sort([x, y, z]) function code(x, y, z) tmp = 0.0 if (y <= -2e-310) tmp = Float64(2.0 * sqrt(Float64(y * x))); else tmp = Float64(2.0 * sqrt(Float64(y * z))); end return tmp end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (y <= -2e-310)
tmp = 2.0 * sqrt((y * x));
else
tmp = 2.0 * sqrt((y * z));
end
tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[y, -2e-310], N[(2.0 * N[Sqrt[N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(2.0 * N[Sqrt[N[(y * z), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -2 \cdot 10^{-310}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot x}\\
\mathbf{else}:\\
\;\;\;\;2 \cdot \sqrt{y \cdot z}\\
\end{array}
\end{array}
if y < -1.999999999999994e-310Initial program 67.6%
distribute-lft-out67.6%
Simplified67.6%
Taylor expanded in z around 0 26.9%
if -1.999999999999994e-310 < y Initial program 70.5%
distribute-lft-out70.5%
Simplified70.5%
Taylor expanded in x around 0 22.2%
Final simplification24.7%
NOTE: x, y, and z should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (* 2.0 (sqrt (* y x))))
assert(x < y && y < z);
double code(double x, double y, double z) {
return 2.0 * sqrt((y * x));
}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
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((y * x))
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
return 2.0 * Math.sqrt((y * x));
}
[x, y, z] = sort([x, y, z]) def code(x, y, z): return 2.0 * math.sqrt((y * x))
x, y, z = sort([x, y, z]) function code(x, y, z) return Float64(2.0 * sqrt(Float64(y * x))) end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp = code(x, y, z)
tmp = 2.0 * sqrt((y * x));
end
NOTE: x, y, and z should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(2.0 * N[Sqrt[N[(y * x), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
2 \cdot \sqrt{y \cdot x}
\end{array}
Initial program 69.0%
distribute-lft-out69.0%
Simplified69.0%
Taylor expanded in z around 0 24.5%
Final simplification24.5%
(FPCore (x y z)
:precision binary64
(let* ((t_0
(+
(* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z)))
(* (pow z 0.25) (pow y 0.25)))))
(if (< z 7.636950090573675e+176)
(* 2.0 (sqrt (+ (* (+ x y) z) (* x y))))
(* (* t_0 t_0) 2.0))))
double code(double x, double y, double z) {
double t_0 = (0.25 * ((pow(y, -0.75) * (pow(z, -0.75) * x)) * (y + z))) + (pow(z, 0.25) * pow(y, 0.25));
double tmp;
if (z < 7.636950090573675e+176) {
tmp = 2.0 * sqrt((((x + y) * z) + (x * y)));
} else {
tmp = (t_0 * t_0) * 2.0;
}
return tmp;
}
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
real(8) :: tmp
t_0 = (0.25d0 * (((y ** (-0.75d0)) * ((z ** (-0.75d0)) * x)) * (y + z))) + ((z ** 0.25d0) * (y ** 0.25d0))
if (z < 7.636950090573675d+176) then
tmp = 2.0d0 * sqrt((((x + y) * z) + (x * y)))
else
tmp = (t_0 * t_0) * 2.0d0
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double t_0 = (0.25 * ((Math.pow(y, -0.75) * (Math.pow(z, -0.75) * x)) * (y + z))) + (Math.pow(z, 0.25) * Math.pow(y, 0.25));
double tmp;
if (z < 7.636950090573675e+176) {
tmp = 2.0 * Math.sqrt((((x + y) * z) + (x * y)));
} else {
tmp = (t_0 * t_0) * 2.0;
}
return tmp;
}
def code(x, y, z): t_0 = (0.25 * ((math.pow(y, -0.75) * (math.pow(z, -0.75) * x)) * (y + z))) + (math.pow(z, 0.25) * math.pow(y, 0.25)) tmp = 0 if z < 7.636950090573675e+176: tmp = 2.0 * math.sqrt((((x + y) * z) + (x * y))) else: tmp = (t_0 * t_0) * 2.0 return tmp
function code(x, y, z) t_0 = Float64(Float64(0.25 * Float64(Float64((y ^ -0.75) * Float64((z ^ -0.75) * x)) * Float64(y + z))) + Float64((z ^ 0.25) * (y ^ 0.25))) tmp = 0.0 if (z < 7.636950090573675e+176) tmp = Float64(2.0 * sqrt(Float64(Float64(Float64(x + y) * z) + Float64(x * y)))); else tmp = Float64(Float64(t_0 * t_0) * 2.0); end return tmp end
function tmp_2 = code(x, y, z) t_0 = (0.25 * (((y ^ -0.75) * ((z ^ -0.75) * x)) * (y + z))) + ((z ^ 0.25) * (y ^ 0.25)); tmp = 0.0; if (z < 7.636950090573675e+176) tmp = 2.0 * sqrt((((x + y) * z) + (x * y))); else tmp = (t_0 * t_0) * 2.0; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(0.25 * N[(N[(N[Power[y, -0.75], $MachinePrecision] * N[(N[Power[z, -0.75], $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] * N[(y + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[z, 0.25], $MachinePrecision] * N[Power[y, 0.25], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, 7.636950090573675e+176], N[(2.0 * N[Sqrt[N[(N[(N[(x + y), $MachinePrecision] * z), $MachinePrecision] + N[(x * y), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 * t$95$0), $MachinePrecision] * 2.0), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 0.25 \cdot \left(\left({y}^{-0.75} \cdot \left({z}^{-0.75} \cdot x\right)\right) \cdot \left(y + z\right)\right) + {z}^{0.25} \cdot {y}^{0.25}\\
\mathbf{if}\;z < 7.636950090573675 \cdot 10^{+176}:\\
\;\;\;\;2 \cdot \sqrt{\left(x + y\right) \cdot z + x \cdot y}\\
\mathbf{else}:\\
\;\;\;\;\left(t_0 \cdot t_0\right) \cdot 2\\
\end{array}
\end{array}
herbie shell --seed 2023229
(FPCore (x y z)
:name "Diagrams.TwoD.Apollonian:descartes from diagrams-contrib-1.3.0.5"
:precision binary64
:herbie-target
(if (< z 7.636950090573675e+176) (* 2.0 (sqrt (+ (* (+ x y) z) (* x y)))) (* (* (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25))) (+ (* 0.25 (* (* (pow y -0.75) (* (pow z -0.75) x)) (+ y z))) (* (pow z 0.25) (pow y 0.25)))) 2.0))
(* 2.0 (sqrt (+ (+ (* x y) (* x z)) (* y z)))))