
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
double code(double x, double y, double z) {
return (1.0 / x) / (y * (1.0 + (z * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (1.0d0 / x) / (y * (1.0d0 + (z * z)))
end function
public static double code(double x, double y, double z) {
return (1.0 / x) / (y * (1.0 + (z * z)));
}
def code(x, y, z): return (1.0 / x) / (y * (1.0 + (z * z)))
function code(x, y, z) return Float64(Float64(1.0 / x) / Float64(y * Float64(1.0 + Float64(z * z)))) end
function tmp = code(x, y, z) tmp = (1.0 / x) / (y * (1.0 + (z * z))); end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 11 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))
double code(double x, double y, double z) {
return (1.0 / x) / (y * (1.0 + (z * z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (1.0d0 / x) / (y * (1.0d0 + (z * z)))
end function
public static double code(double x, double y, double z) {
return (1.0 / x) / (y * (1.0 + (z * z)));
}
def code(x, y, z): return (1.0 / x) / (y * (1.0 + (z * z)))
function code(x, y, z) return Float64(Float64(1.0 / x) / Float64(y * Float64(1.0 + Float64(z * z)))) end
function tmp = code(x, y, z) tmp = (1.0 / x) / (y * (1.0 + (z * z))); end
code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{x}}{y \cdot \left(1 + z \cdot z\right)}
\end{array}
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(let* ((t_0 (* z (sqrt x_m))) (t_1 (* y_m (+ 1.0 (* z z)))))
(*
y_s
(*
x_s
(if (<= t_1 5e+307) (/ (/ 1.0 x_m) t_1) (/ (/ (/ 1.0 y_m) t_0) t_0))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = z * sqrt(x_m);
double t_1 = y_m * (1.0 + (z * z));
double tmp;
if (t_1 <= 5e+307) {
tmp = (1.0 / x_m) / t_1;
} else {
tmp = ((1.0 / y_m) / t_0) / t_0;
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: t_1
real(8) :: tmp
t_0 = z * sqrt(x_m)
t_1 = y_m * (1.0d0 + (z * z))
if (t_1 <= 5d+307) then
tmp = (1.0d0 / x_m) / t_1
else
tmp = ((1.0d0 / y_m) / t_0) / t_0
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = z * Math.sqrt(x_m);
double t_1 = y_m * (1.0 + (z * z));
double tmp;
if (t_1 <= 5e+307) {
tmp = (1.0 / x_m) / t_1;
} else {
tmp = ((1.0 / y_m) / t_0) / t_0;
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): t_0 = z * math.sqrt(x_m) t_1 = y_m * (1.0 + (z * z)) tmp = 0 if t_1 <= 5e+307: tmp = (1.0 / x_m) / t_1 else: tmp = ((1.0 / y_m) / t_0) / t_0 return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) t_0 = Float64(z * sqrt(x_m)) t_1 = Float64(y_m * Float64(1.0 + Float64(z * z))) tmp = 0.0 if (t_1 <= 5e+307) tmp = Float64(Float64(1.0 / x_m) / t_1); else tmp = Float64(Float64(Float64(1.0 / y_m) / t_0) / t_0); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
t_0 = z * sqrt(x_m);
t_1 = y_m * (1.0 + (z * z));
tmp = 0.0;
if (t_1 <= 5e+307)
tmp = (1.0 / x_m) / t_1;
else
tmp = ((1.0 / y_m) / t_0) / t_0;
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := Block[{t$95$0 = N[(z * N[Sqrt[x$95$m], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y$95$m * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$1, 5e+307], N[(N[(1.0 / x$95$m), $MachinePrecision] / t$95$1), $MachinePrecision], N[(N[(N[(1.0 / y$95$m), $MachinePrecision] / t$95$0), $MachinePrecision] / t$95$0), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
\begin{array}{l}
t_0 := z \cdot \sqrt{x\_m}\\
t_1 := y\_m \cdot \left(1 + z \cdot z\right)\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_1 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{t\_1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{y\_m}}{t\_0}}{t\_0}\\
\end{array}\right)
\end{array}
\end{array}
if (*.f64 y (+.f64 1 (*.f64 z z))) < 5e307Initial program 95.2%
if 5e307 < (*.f64 y (+.f64 1 (*.f64 z z))) Initial program 72.1%
associate-/l/72.1%
associate-*l*79.0%
*-commutative79.0%
sqr-neg79.0%
+-commutative79.0%
sqr-neg79.0%
fma-define79.0%
Simplified79.0%
associate-*r*78.5%
*-commutative78.5%
*-commutative78.5%
add-sqr-sqrt71.2%
sqrt-div26.9%
metadata-eval26.9%
sqrt-prod26.9%
fma-undefine26.9%
+-commutative26.9%
hypot-1-def26.9%
sqrt-div26.9%
metadata-eval26.9%
sqrt-prod26.9%
fma-undefine26.9%
+-commutative26.9%
hypot-1-def29.5%
Applied egg-rr29.5%
unpow-129.5%
unpow-129.5%
pow-sqr29.4%
metadata-eval29.4%
Simplified29.4%
Taylor expanded in z around inf 29.4%
metadata-eval29.4%
pow-sqr29.5%
pow-prod-down29.4%
*-commutative29.4%
*-commutative29.4%
swap-sqr26.9%
unpow226.9%
add-sqr-sqrt78.5%
associate-*l*79.0%
*-commutative79.0%
inv-pow79.0%
associate-/l/79.0%
add-sqr-sqrt27.3%
associate-/r*27.3%
Applied egg-rr36.4%
Final simplification85.8%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (/ (/ (/ (pow y_m -0.5) (hypot 1.0 z)) (* (hypot 1.0 z) x_m)) (sqrt y_m)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (((pow(y_m, -0.5) / hypot(1.0, z)) / (hypot(1.0, z) * x_m)) / sqrt(y_m)));
}
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (((Math.pow(y_m, -0.5) / Math.hypot(1.0, z)) / (Math.hypot(1.0, z) * x_m)) / Math.sqrt(y_m)));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (((math.pow(y_m, -0.5) / math.hypot(1.0, z)) / (math.hypot(1.0, z) * x_m)) / math.sqrt(y_m)))
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(Float64(Float64((y_m ^ -0.5) / hypot(1.0, z)) / Float64(hypot(1.0, z) * x_m)) / sqrt(y_m)))) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * ((((y_m ^ -0.5) / hypot(1.0, z)) / (hypot(1.0, z) * x_m)) / sqrt(y_m)));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(N[(N[(N[Power[y$95$m, -0.5], $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision] / N[Sqrt[y$95$m], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{\frac{\frac{{y\_m}^{-0.5}}{\mathsf{hypot}\left(1, z\right)}}{\mathsf{hypot}\left(1, z\right) \cdot x\_m}}{\sqrt{y\_m}}\right)
\end{array}
Initial program 91.5%
associate-/l/91.2%
associate-*l*91.3%
*-commutative91.3%
sqr-neg91.3%
+-commutative91.3%
sqr-neg91.3%
fma-define91.3%
Simplified91.3%
associate-*r*91.5%
*-commutative91.5%
*-commutative91.5%
add-sqr-sqrt60.9%
sqrt-div43.9%
metadata-eval43.9%
sqrt-prod43.9%
fma-undefine43.9%
+-commutative43.9%
hypot-1-def43.9%
sqrt-div43.8%
metadata-eval43.8%
sqrt-prod43.8%
fma-undefine43.8%
+-commutative43.8%
hypot-1-def45.1%
Applied egg-rr45.1%
unpow-145.1%
unpow-145.1%
pow-sqr45.1%
metadata-eval45.1%
Simplified45.1%
Applied egg-rr47.5%
Final simplification47.5%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (* (/ 1.0 y_m) (/ (/ 1.0 (hypot 1.0 z)) (* (hypot 1.0 z) x_m))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * ((1.0 / y_m) * ((1.0 / hypot(1.0, z)) / (hypot(1.0, z) * x_m))));
}
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * ((1.0 / y_m) * ((1.0 / Math.hypot(1.0, z)) / (Math.hypot(1.0, z) * x_m))));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * ((1.0 / y_m) * ((1.0 / math.hypot(1.0, z)) / (math.hypot(1.0, z) * x_m))))
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(Float64(1.0 / y_m) * Float64(Float64(1.0 / hypot(1.0, z)) / Float64(hypot(1.0, z) * x_m))))) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * ((1.0 / y_m) * ((1.0 / hypot(1.0, z)) / (hypot(1.0, z) * x_m))));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(N[(1.0 / y$95$m), $MachinePrecision] * N[(N[(1.0 / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision] / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \left(\frac{1}{y\_m} \cdot \frac{\frac{1}{\mathsf{hypot}\left(1, z\right)}}{\mathsf{hypot}\left(1, z\right) \cdot x\_m}\right)\right)
\end{array}
Initial program 91.5%
associate-/l/91.2%
associate-*l*91.3%
*-commutative91.3%
sqr-neg91.3%
+-commutative91.3%
sqr-neg91.3%
fma-define91.3%
Simplified91.3%
associate-*r*91.5%
*-commutative91.5%
*-commutative91.5%
add-sqr-sqrt60.9%
sqrt-div43.9%
metadata-eval43.9%
sqrt-prod43.9%
fma-undefine43.9%
+-commutative43.9%
hypot-1-def43.9%
sqrt-div43.8%
metadata-eval43.8%
sqrt-prod43.8%
fma-undefine43.8%
+-commutative43.8%
hypot-1-def45.1%
Applied egg-rr45.1%
unpow-145.1%
unpow-145.1%
pow-sqr45.1%
metadata-eval45.1%
Simplified45.1%
Applied egg-rr47.5%
associate-/l/47.9%
div-inv47.9%
times-frac46.6%
metadata-eval46.6%
pow-flip46.6%
pow1/246.6%
associate-/r*46.6%
add-sqr-sqrt96.3%
*-commutative96.3%
Applied egg-rr96.3%
Final simplification96.3%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= (* z z) 2e+211)
(* (/ 1.0 y_m) (/ 1.0 (* x_m (fma z z 1.0))))
(* (/ (/ 1.0 y_m) z) (/ (/ 1.0 x_m) z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z * z) <= 2e+211) {
tmp = (1.0 / y_m) * (1.0 / (x_m * fma(z, z, 1.0)));
} else {
tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z);
}
return y_s * (x_s * tmp);
}
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (Float64(z * z) <= 2e+211) tmp = Float64(Float64(1.0 / y_m) * Float64(1.0 / Float64(x_m * fma(z, z, 1.0)))); else tmp = Float64(Float64(Float64(1.0 / y_m) / z) * Float64(Float64(1.0 / x_m) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 2e+211], N[(N[(1.0 / y$95$m), $MachinePrecision] * N[(1.0 / N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / y$95$m), $MachinePrecision] / z), $MachinePrecision] * N[(N[(1.0 / x$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+211}:\\
\;\;\;\;\frac{1}{y\_m} \cdot \frac{1}{x\_m \cdot \mathsf{fma}\left(z, z, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{z} \cdot \frac{\frac{1}{x\_m}}{z}\\
\end{array}\right)
\end{array}
if (*.f64 z z) < 1.9999999999999999e211Initial program 97.1%
associate-/l/96.6%
associate-*l*98.8%
*-commutative98.8%
sqr-neg98.8%
+-commutative98.8%
sqr-neg98.8%
fma-define98.8%
Simplified98.8%
associate-/r*99.3%
div-inv99.2%
Applied egg-rr99.2%
if 1.9999999999999999e211 < (*.f64 z z) Initial program 77.8%
associate-/l/77.8%
associate-*l*72.9%
*-commutative72.9%
sqr-neg72.9%
+-commutative72.9%
sqr-neg72.9%
fma-define72.9%
Simplified72.9%
associate-*r*76.1%
*-commutative76.1%
*-commutative76.1%
add-sqr-sqrt72.0%
sqrt-div33.7%
metadata-eval33.7%
sqrt-prod33.7%
fma-undefine33.7%
+-commutative33.7%
hypot-1-def33.7%
sqrt-div33.7%
metadata-eval33.7%
sqrt-prod33.7%
fma-undefine33.7%
+-commutative33.7%
hypot-1-def37.9%
Applied egg-rr37.9%
unpow-137.9%
unpow-137.9%
pow-sqr38.0%
metadata-eval38.0%
Simplified38.0%
Taylor expanded in z around inf 38.0%
metadata-eval38.0%
pow-sqr37.9%
pow-prod-down37.8%
*-commutative37.8%
*-commutative37.8%
swap-sqr33.8%
unpow233.8%
add-sqr-sqrt76.1%
associate-*l*72.9%
*-commutative72.9%
inv-pow72.9%
associate-/l/72.9%
associate-/r*76.0%
associate-/r*76.1%
associate-/l/76.1%
unpow276.1%
associate-/r*85.6%
associate-/l/85.5%
Applied egg-rr85.5%
associate-/l/76.1%
metadata-eval76.1%
frac-times76.0%
times-frac99.2%
Applied egg-rr99.2%
Final simplification99.2%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= (* z z) 2e+229)
(/ 1.0 (* y_m (* x_m (fma z z 1.0))))
(* (/ (/ 1.0 y_m) z) (/ (/ 1.0 x_m) z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if ((z * z) <= 2e+229) {
tmp = 1.0 / (y_m * (x_m * fma(z, z, 1.0)));
} else {
tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z);
}
return y_s * (x_s * tmp);
}
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (Float64(z * z) <= 2e+229) tmp = Float64(1.0 / Float64(y_m * Float64(x_m * fma(z, z, 1.0)))); else tmp = Float64(Float64(Float64(1.0 / y_m) / z) * Float64(Float64(1.0 / x_m) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[N[(z * z), $MachinePrecision], 2e+229], N[(1.0 / N[(y$95$m * N[(x$95$m * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / y$95$m), $MachinePrecision] / z), $MachinePrecision] * N[(N[(1.0 / x$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+229}:\\
\;\;\;\;\frac{1}{y\_m \cdot \left(x\_m \cdot \mathsf{fma}\left(z, z, 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{z} \cdot \frac{\frac{1}{x\_m}}{z}\\
\end{array}\right)
\end{array}
if (*.f64 z z) < 2e229Initial program 97.1%
associate-/l/96.7%
associate-*l*98.2%
*-commutative98.2%
sqr-neg98.2%
+-commutative98.2%
sqr-neg98.2%
fma-define98.2%
Simplified98.2%
if 2e229 < (*.f64 z z) Initial program 77.2%
associate-/l/77.2%
associate-*l*73.5%
*-commutative73.5%
sqr-neg73.5%
+-commutative73.5%
sqr-neg73.5%
fma-define73.5%
Simplified73.5%
associate-*r*75.4%
*-commutative75.4%
*-commutative75.4%
add-sqr-sqrt71.2%
sqrt-div31.9%
metadata-eval31.9%
sqrt-prod31.9%
fma-undefine31.9%
+-commutative31.9%
hypot-1-def31.9%
sqrt-div31.9%
metadata-eval31.9%
sqrt-prod31.9%
fma-undefine31.9%
+-commutative31.9%
hypot-1-def36.2%
Applied egg-rr36.2%
unpow-136.2%
unpow-136.2%
pow-sqr36.3%
metadata-eval36.3%
Simplified36.3%
Taylor expanded in z around inf 36.3%
metadata-eval36.3%
pow-sqr36.2%
pow-prod-down36.1%
*-commutative36.1%
*-commutative36.1%
swap-sqr31.9%
unpow231.9%
add-sqr-sqrt75.4%
associate-*l*73.5%
*-commutative73.5%
inv-pow73.5%
associate-/l/73.5%
associate-/r*75.4%
associate-/r*75.4%
associate-/l/75.4%
unpow275.4%
associate-/r*85.2%
associate-/l/85.1%
Applied egg-rr85.1%
associate-/l/75.4%
metadata-eval75.4%
frac-times75.4%
times-frac99.2%
Applied egg-rr99.2%
Final simplification98.5%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(let* ((t_0 (* y_m (+ 1.0 (* z z)))))
(*
y_s
(*
x_s
(if (<= t_0 5e+307)
(/ (/ 1.0 x_m) t_0)
(/ (/ 1.0 (* y_m (* z x_m))) z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = y_m * (1.0 + (z * z));
double tmp;
if (t_0 <= 5e+307) {
tmp = (1.0 / x_m) / t_0;
} else {
tmp = (1.0 / (y_m * (z * x_m))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: t_0
real(8) :: tmp
t_0 = y_m * (1.0d0 + (z * z))
if (t_0 <= 5d+307) then
tmp = (1.0d0 / x_m) / t_0
else
tmp = (1.0d0 / (y_m * (z * x_m))) / z
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double t_0 = y_m * (1.0 + (z * z));
double tmp;
if (t_0 <= 5e+307) {
tmp = (1.0 / x_m) / t_0;
} else {
tmp = (1.0 / (y_m * (z * x_m))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): t_0 = y_m * (1.0 + (z * z)) tmp = 0 if t_0 <= 5e+307: tmp = (1.0 / x_m) / t_0 else: tmp = (1.0 / (y_m * (z * x_m))) / z return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) t_0 = Float64(y_m * Float64(1.0 + Float64(z * z))) tmp = 0.0 if (t_0 <= 5e+307) tmp = Float64(Float64(1.0 / x_m) / t_0); else tmp = Float64(Float64(1.0 / Float64(y_m * Float64(z * x_m))) / z); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
t_0 = y_m * (1.0 + (z * z));
tmp = 0.0;
if (t_0 <= 5e+307)
tmp = (1.0 / x_m) / t_0;
else
tmp = (1.0 / (y_m * (z * x_m))) / z;
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := Block[{t$95$0 = N[(y$95$m * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(y$95$s * N[(x$95$s * If[LessEqual[t$95$0, 5e+307], N[(N[(1.0 / x$95$m), $MachinePrecision] / t$95$0), $MachinePrecision], N[(N[(1.0 / N[(y$95$m * N[(z * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
\begin{array}{l}
t_0 := y\_m \cdot \left(1 + z \cdot z\right)\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq 5 \cdot 10^{+307}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{t\_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y\_m \cdot \left(z \cdot x\_m\right)}}{z}\\
\end{array}\right)
\end{array}
\end{array}
if (*.f64 y (+.f64 1 (*.f64 z z))) < 5e307Initial program 95.2%
if 5e307 < (*.f64 y (+.f64 1 (*.f64 z z))) Initial program 72.1%
associate-/l/72.1%
associate-*l*79.0%
*-commutative79.0%
sqr-neg79.0%
+-commutative79.0%
sqr-neg79.0%
fma-define79.0%
Simplified79.0%
associate-*r*78.5%
*-commutative78.5%
*-commutative78.5%
add-sqr-sqrt71.2%
sqrt-div26.9%
metadata-eval26.9%
sqrt-prod26.9%
fma-undefine26.9%
+-commutative26.9%
hypot-1-def26.9%
sqrt-div26.9%
metadata-eval26.9%
sqrt-prod26.9%
fma-undefine26.9%
+-commutative26.9%
hypot-1-def29.5%
Applied egg-rr29.5%
unpow-129.5%
unpow-129.5%
pow-sqr29.4%
metadata-eval29.4%
Simplified29.4%
Taylor expanded in z around inf 29.4%
metadata-eval29.4%
pow-sqr29.5%
pow-prod-down29.4%
*-commutative29.4%
*-commutative29.4%
swap-sqr26.9%
unpow226.9%
add-sqr-sqrt78.5%
associate-*l*79.0%
*-commutative79.0%
inv-pow79.0%
associate-/l/79.0%
associate-/r*78.5%
associate-/r*78.5%
associate-/l/78.5%
unpow278.5%
associate-/r*88.1%
associate-/l/88.0%
Applied egg-rr88.0%
Taylor expanded in y around 0 95.2%
*-commutative95.2%
associate-*r*97.6%
associate-/r*97.5%
associate-/l/97.6%
Simplified97.6%
Final simplification95.6%
x\_m = (fabs.f64 x)
x\_s = (copysign.f64 1 x)
y\_m = (fabs.f64 y)
y\_s = (copysign.f64 1 y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
(FPCore (y_s x_s x_m y_m z)
:precision binary64
(*
y_s
(*
x_s
(if (<= z 7e-5)
(/ (/ 1.0 x_m) y_m)
(* (/ (/ 1.0 y_m) z) (/ (/ 1.0 x_m) z))))))x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z);
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 7d-5) then
tmp = (1.0d0 / x_m) / y_m
else
tmp = ((1.0d0 / y_m) / z) * ((1.0d0 / x_m) / z)
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z);
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= 7e-5: tmp = (1.0 / x_m) / y_m else: tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z) return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= 7e-5) tmp = Float64(Float64(1.0 / x_m) / y_m); else tmp = Float64(Float64(Float64(1.0 / y_m) / z) * Float64(Float64(1.0 / x_m) / z)); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= 7e-5)
tmp = (1.0 / x_m) / y_m;
else
tmp = ((1.0 / y_m) / z) * ((1.0 / x_m) / z);
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, 7e-5], N[(N[(1.0 / x$95$m), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(N[(1.0 / y$95$m), $MachinePrecision] / z), $MachinePrecision] * N[(N[(1.0 / x$95$m), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y\_m}}{z} \cdot \frac{\frac{1}{x\_m}}{z}\\
\end{array}\right)
\end{array}
if z < 6.9999999999999994e-5Initial program 94.3%
Taylor expanded in z around 0 69.9%
if 6.9999999999999994e-5 < z Initial program 82.1%
associate-/l/81.8%
associate-*l*80.5%
*-commutative80.5%
sqr-neg80.5%
+-commutative80.5%
sqr-neg80.5%
fma-define80.5%
Simplified80.5%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
add-sqr-sqrt66.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.2%
fma-undefine37.2%
+-commutative37.2%
hypot-1-def37.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.3%
fma-undefine37.3%
+-commutative37.3%
hypot-1-def39.0%
Applied egg-rr39.0%
unpow-139.0%
unpow-139.0%
pow-sqr39.1%
metadata-eval39.1%
Simplified39.1%
Taylor expanded in z around inf 37.5%
metadata-eval37.5%
pow-sqr37.5%
pow-prod-down37.3%
*-commutative37.3%
*-commutative37.3%
swap-sqr35.5%
unpow235.5%
add-sqr-sqrt78.1%
associate-*l*78.7%
*-commutative78.7%
inv-pow78.7%
associate-/l/79.1%
associate-/r*78.4%
associate-/r*78.4%
associate-/l/78.4%
unpow278.4%
associate-/r*83.3%
associate-/l/83.3%
Applied egg-rr83.3%
associate-/l/78.4%
metadata-eval78.4%
frac-times78.4%
times-frac95.7%
Applied egg-rr95.7%
Final simplification75.8%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (if (<= z 7e-5) (/ (/ 1.0 x_m) y_m) (/ (/ 1.0 x_m) (* z (* y_m z)))))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / x_m) / (z * (y_m * z));
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 7d-5) then
tmp = (1.0d0 / x_m) / y_m
else
tmp = (1.0d0 / x_m) / (z * (y_m * z))
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / x_m) / (z * (y_m * z));
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= 7e-5: tmp = (1.0 / x_m) / y_m else: tmp = (1.0 / x_m) / (z * (y_m * z)) return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= 7e-5) tmp = Float64(Float64(1.0 / x_m) / y_m); else tmp = Float64(Float64(1.0 / x_m) / Float64(z * Float64(y_m * z))); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= 7e-5)
tmp = (1.0 / x_m) / y_m;
else
tmp = (1.0 / x_m) / (z * (y_m * z));
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, 7e-5], N[(N[(1.0 / x$95$m), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(1.0 / x$95$m), $MachinePrecision] / N[(z * N[(y$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{z \cdot \left(y\_m \cdot z\right)}\\
\end{array}\right)
\end{array}
if z < 6.9999999999999994e-5Initial program 94.3%
Taylor expanded in z around 0 69.9%
if 6.9999999999999994e-5 < z Initial program 82.1%
add-sqr-sqrt37.5%
pow237.5%
+-commutative37.5%
fma-undefine37.5%
*-commutative37.5%
sqrt-prod37.5%
fma-undefine37.5%
+-commutative37.5%
hypot-1-def39.1%
Applied egg-rr39.1%
Taylor expanded in z around inf 38.5%
unpow238.5%
associate-*r*38.5%
*-commutative38.5%
associate-*r*38.5%
add-sqr-sqrt89.9%
Applied egg-rr89.9%
Final simplification74.5%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (if (<= z 7e-5) (/ (/ 1.0 x_m) y_m) (/ (/ 1.0 (* x_m (* y_m z))) z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / (x_m * (y_m * z))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 7d-5) then
tmp = (1.0d0 / x_m) / y_m
else
tmp = (1.0d0 / (x_m * (y_m * z))) / z
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / (x_m * (y_m * z))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= 7e-5: tmp = (1.0 / x_m) / y_m else: tmp = (1.0 / (x_m * (y_m * z))) / z return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= 7e-5) tmp = Float64(Float64(1.0 / x_m) / y_m); else tmp = Float64(Float64(1.0 / Float64(x_m * Float64(y_m * z))) / z); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= 7e-5)
tmp = (1.0 / x_m) / y_m;
else
tmp = (1.0 / (x_m * (y_m * z))) / z;
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, 7e-5], N[(N[(1.0 / x$95$m), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(1.0 / N[(x$95$m * N[(y$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{x\_m \cdot \left(y\_m \cdot z\right)}}{z}\\
\end{array}\right)
\end{array}
if z < 6.9999999999999994e-5Initial program 94.3%
Taylor expanded in z around 0 69.9%
if 6.9999999999999994e-5 < z Initial program 82.1%
associate-/l/81.8%
associate-*l*80.5%
*-commutative80.5%
sqr-neg80.5%
+-commutative80.5%
sqr-neg80.5%
fma-define80.5%
Simplified80.5%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
add-sqr-sqrt66.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.2%
fma-undefine37.2%
+-commutative37.2%
hypot-1-def37.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.3%
fma-undefine37.3%
+-commutative37.3%
hypot-1-def39.0%
Applied egg-rr39.0%
unpow-139.0%
unpow-139.0%
pow-sqr39.1%
metadata-eval39.1%
Simplified39.1%
Taylor expanded in z around inf 37.5%
metadata-eval37.5%
pow-sqr37.5%
pow-prod-down37.3%
*-commutative37.3%
*-commutative37.3%
swap-sqr35.5%
unpow235.5%
add-sqr-sqrt78.1%
associate-*l*78.7%
*-commutative78.7%
inv-pow78.7%
associate-/l/79.1%
associate-/r*78.4%
associate-/r*78.4%
associate-/l/78.4%
unpow278.4%
associate-/r*83.3%
associate-/l/83.3%
Applied egg-rr83.3%
Taylor expanded in y around 0 94.8%
Final simplification75.6%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (if (<= z 7e-5) (/ (/ 1.0 x_m) y_m) (/ (/ 1.0 (* y_m (* z x_m))) z)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / (y_m * (z * x_m))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
real(8) :: tmp
if (z <= 7d-5) then
tmp = (1.0d0 / x_m) / y_m
else
tmp = (1.0d0 / (y_m * (z * x_m))) / z
end if
code = y_s * (x_s * tmp)
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
double tmp;
if (z <= 7e-5) {
tmp = (1.0 / x_m) / y_m;
} else {
tmp = (1.0 / (y_m * (z * x_m))) / z;
}
return y_s * (x_s * tmp);
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): tmp = 0 if z <= 7e-5: tmp = (1.0 / x_m) / y_m else: tmp = (1.0 / (y_m * (z * x_m))) / z return y_s * (x_s * tmp)
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) tmp = 0.0 if (z <= 7e-5) tmp = Float64(Float64(1.0 / x_m) / y_m); else tmp = Float64(Float64(1.0 / Float64(y_m * Float64(z * x_m))) / z); end return Float64(y_s * Float64(x_s * tmp)) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp_2 = code(y_s, x_s, x_m, y_m, z)
tmp = 0.0;
if (z <= 7e-5)
tmp = (1.0 / x_m) / y_m;
else
tmp = (1.0 / (y_m * (z * x_m))) / z;
end
tmp_2 = y_s * (x_s * tmp);
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * If[LessEqual[z, 7e-5], N[(N[(1.0 / x$95$m), $MachinePrecision] / y$95$m), $MachinePrecision], N[(N[(1.0 / N[(y$95$m * N[(z * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \begin{array}{l}
\mathbf{if}\;z \leq 7 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{1}{x\_m}}{y\_m}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{1}{y\_m \cdot \left(z \cdot x\_m\right)}}{z}\\
\end{array}\right)
\end{array}
if z < 6.9999999999999994e-5Initial program 94.3%
Taylor expanded in z around 0 69.9%
if 6.9999999999999994e-5 < z Initial program 82.1%
associate-/l/81.8%
associate-*l*80.5%
*-commutative80.5%
sqr-neg80.5%
+-commutative80.5%
sqr-neg80.5%
fma-define80.5%
Simplified80.5%
associate-*r*79.9%
*-commutative79.9%
*-commutative79.9%
add-sqr-sqrt66.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.2%
fma-undefine37.2%
+-commutative37.2%
hypot-1-def37.2%
sqrt-div37.1%
metadata-eval37.1%
sqrt-prod37.3%
fma-undefine37.3%
+-commutative37.3%
hypot-1-def39.0%
Applied egg-rr39.0%
unpow-139.0%
unpow-139.0%
pow-sqr39.1%
metadata-eval39.1%
Simplified39.1%
Taylor expanded in z around inf 37.5%
metadata-eval37.5%
pow-sqr37.5%
pow-prod-down37.3%
*-commutative37.3%
*-commutative37.3%
swap-sqr35.5%
unpow235.5%
add-sqr-sqrt78.1%
associate-*l*78.7%
*-commutative78.7%
inv-pow78.7%
associate-/l/79.1%
associate-/r*78.4%
associate-/r*78.4%
associate-/l/78.4%
unpow278.4%
associate-/r*83.3%
associate-/l/83.3%
Applied egg-rr83.3%
Taylor expanded in y around 0 94.8%
*-commutative94.8%
associate-*r*94.9%
associate-/r*94.9%
associate-/l/94.9%
Simplified94.9%
Final simplification75.6%
x\_m = (fabs.f64 x) x\_s = (copysign.f64 1 x) y\_m = (fabs.f64 y) y\_s = (copysign.f64 1 y) NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function. (FPCore (y_s x_s x_m y_m z) :precision binary64 (* y_s (* x_s (/ 1.0 (* y_m x_m)))))
x\_m = fabs(x);
x\_s = copysign(1.0, x);
y\_m = fabs(y);
y\_s = copysign(1.0, y);
assert(x_m < y_m && y_m < z);
double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (1.0 / (y_m * x_m)));
}
x\_m = abs(x)
x\_s = copysign(1.0d0, x)
y\_m = abs(y)
y\_s = copysign(1.0d0, y)
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
real(8) function code(y_s, x_s, x_m, y_m, z)
real(8), intent (in) :: y_s
real(8), intent (in) :: x_s
real(8), intent (in) :: x_m
real(8), intent (in) :: y_m
real(8), intent (in) :: z
code = y_s * (x_s * (1.0d0 / (y_m * x_m)))
end function
x\_m = Math.abs(x);
x\_s = Math.copySign(1.0, x);
y\_m = Math.abs(y);
y\_s = Math.copySign(1.0, y);
assert x_m < y_m && y_m < z;
public static double code(double y_s, double x_s, double x_m, double y_m, double z) {
return y_s * (x_s * (1.0 / (y_m * x_m)));
}
x\_m = math.fabs(x) x\_s = math.copysign(1.0, x) y\_m = math.fabs(y) y\_s = math.copysign(1.0, y) [x_m, y_m, z] = sort([x_m, y_m, z]) def code(y_s, x_s, x_m, y_m, z): return y_s * (x_s * (1.0 / (y_m * x_m)))
x\_m = abs(x) x\_s = copysign(1.0, x) y\_m = abs(y) y\_s = copysign(1.0, y) x_m, y_m, z = sort([x_m, y_m, z]) function code(y_s, x_s, x_m, y_m, z) return Float64(y_s * Float64(x_s * Float64(1.0 / Float64(y_m * x_m)))) end
x\_m = abs(x);
x\_s = sign(x) * abs(1.0);
y\_m = abs(y);
y\_s = sign(y) * abs(1.0);
x_m, y_m, z = num2cell(sort([x_m, y_m, z])){:}
function tmp = code(y_s, x_s, x_m, y_m, z)
tmp = y_s * (x_s * (1.0 / (y_m * x_m)));
end
x\_m = N[Abs[x], $MachinePrecision]
x\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
y\_m = N[Abs[y], $MachinePrecision]
y\_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[y]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y_m, and z should be sorted in increasing order before calling this function.
code[y$95$s_, x$95$s_, x$95$m_, y$95$m_, z_] := N[(y$95$s * N[(x$95$s * N[(1.0 / N[(y$95$m * x$95$m), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
x\_m = \left|x\right|
\\
x\_s = \mathsf{copysign}\left(1, x\right)
\\
y\_m = \left|y\right|
\\
y\_s = \mathsf{copysign}\left(1, y\right)
\\
[x_m, y_m, z] = \mathsf{sort}([x_m, y_m, z])\\
\\
y\_s \cdot \left(x\_s \cdot \frac{1}{y\_m \cdot x\_m}\right)
\end{array}
Initial program 91.5%
associate-/l/91.2%
associate-*l*91.3%
*-commutative91.3%
sqr-neg91.3%
+-commutative91.3%
sqr-neg91.3%
fma-define91.3%
Simplified91.3%
Taylor expanded in z around 0 59.7%
Final simplification59.7%
(FPCore (x y z)
:precision binary64
(let* ((t_0 (+ 1.0 (* z z))) (t_1 (* y t_0)) (t_2 (/ (/ 1.0 y) (* t_0 x))))
(if (< t_1 (- INFINITY))
t_2
(if (< t_1 8.680743250567252e+305) (/ (/ 1.0 x) (* t_0 y)) t_2))))
double code(double x, double y, double z) {
double t_0 = 1.0 + (z * z);
double t_1 = y * t_0;
double t_2 = (1.0 / y) / (t_0 * x);
double tmp;
if (t_1 < -((double) INFINITY)) {
tmp = t_2;
} else if (t_1 < 8.680743250567252e+305) {
tmp = (1.0 / x) / (t_0 * y);
} else {
tmp = t_2;
}
return tmp;
}
public static double code(double x, double y, double z) {
double t_0 = 1.0 + (z * z);
double t_1 = y * t_0;
double t_2 = (1.0 / y) / (t_0 * x);
double tmp;
if (t_1 < -Double.POSITIVE_INFINITY) {
tmp = t_2;
} else if (t_1 < 8.680743250567252e+305) {
tmp = (1.0 / x) / (t_0 * y);
} else {
tmp = t_2;
}
return tmp;
}
def code(x, y, z): t_0 = 1.0 + (z * z) t_1 = y * t_0 t_2 = (1.0 / y) / (t_0 * x) tmp = 0 if t_1 < -math.inf: tmp = t_2 elif t_1 < 8.680743250567252e+305: tmp = (1.0 / x) / (t_0 * y) else: tmp = t_2 return tmp
function code(x, y, z) t_0 = Float64(1.0 + Float64(z * z)) t_1 = Float64(y * t_0) t_2 = Float64(Float64(1.0 / y) / Float64(t_0 * x)) tmp = 0.0 if (t_1 < Float64(-Inf)) tmp = t_2; elseif (t_1 < 8.680743250567252e+305) tmp = Float64(Float64(1.0 / x) / Float64(t_0 * y)); else tmp = t_2; end return tmp end
function tmp_2 = code(x, y, z) t_0 = 1.0 + (z * z); t_1 = y * t_0; t_2 = (1.0 / y) / (t_0 * x); tmp = 0.0; if (t_1 < -Inf) tmp = t_2; elseif (t_1 < 8.680743250567252e+305) tmp = (1.0 / x) / (t_0 * y); else tmp = t_2; end tmp_2 = tmp; end
code[x_, y_, z_] := Block[{t$95$0 = N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(y * t$95$0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(1.0 / y), $MachinePrecision] / N[(t$95$0 * x), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$1, (-Infinity)], t$95$2, If[Less[t$95$1, 8.680743250567252e+305], N[(N[(1.0 / x), $MachinePrecision] / N[(t$95$0 * y), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := 1 + z \cdot z\\
t_1 := y \cdot t\_0\\
t_2 := \frac{\frac{1}{y}}{t\_0 \cdot x}\\
\mathbf{if}\;t\_1 < -\infty:\\
\;\;\;\;t\_2\\
\mathbf{elif}\;t\_1 < 8.680743250567252 \cdot 10^{+305}:\\
\;\;\;\;\frac{\frac{1}{x}}{t\_0 \cdot y}\\
\mathbf{else}:\\
\;\;\;\;t\_2\\
\end{array}
\end{array}
herbie shell --seed 2024053
(FPCore (x y z)
:name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
:precision binary64
:alt
(if (< (* y (+ 1.0 (* z z))) (- INFINITY)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x)) (if (< (* y (+ 1.0 (* z z))) 8.680743250567252e+305) (/ (/ 1.0 x) (* (+ 1.0 (* z z)) y)) (/ (/ 1.0 y) (* (+ 1.0 (* z z)) x))))
(/ (/ 1.0 x) (* y (+ 1.0 (* z z)))))