
(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 5 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}
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 1.6e+185) (/ (/ -1.0 (* y x)) (- -1.0 (pow z 2.0))) (/ (/ (/ 1.0 x) (* z y)) z)))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1.6e+185) {
tmp = (-1.0 / (y * x)) / (-1.0 - pow(z, 2.0));
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
NOTE: x and y 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 ((z * z) <= 1.6d+185) then
tmp = ((-1.0d0) / (y * x)) / ((-1.0d0) - (z ** 2.0d0))
else
tmp = ((1.0d0 / x) / (z * y)) / z
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1.6e+185) {
tmp = (-1.0 / (y * x)) / (-1.0 - Math.pow(z, 2.0));
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 1.6e+185: tmp = (-1.0 / (y * x)) / (-1.0 - math.pow(z, 2.0)) else: tmp = ((1.0 / x) / (z * y)) / z return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 1.6e+185) tmp = Float64(Float64(-1.0 / Float64(y * x)) / Float64(-1.0 - (z ^ 2.0))); else tmp = Float64(Float64(Float64(1.0 / x) / Float64(z * y)) / z); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 1.6e+185)
tmp = (-1.0 / (y * x)) / (-1.0 - (z ^ 2.0));
else
tmp = ((1.0 / x) / (z * y)) / z;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 1.6e+185], N[(N[(-1.0 / N[(y * x), $MachinePrecision]), $MachinePrecision] / N[(-1.0 - N[Power[z, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / x), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 1.6 \cdot 10^{+185}:\\
\;\;\;\;\frac{\frac{-1}{y \cdot x}}{-1 - {z}^{2}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{z \cdot y}}{z}\\
\end{array}
\end{array}
if (*.f64 z z) < 1.60000000000000003e185Initial program 98.4%
frac-2neg98.4%
div-inv98.2%
distribute-neg-frac98.2%
metadata-eval98.2%
distribute-rgt-neg-in98.2%
+-commutative98.2%
fma-udef98.2%
Applied egg-rr98.2%
associate-*r/98.4%
*-rgt-identity98.4%
associate-/r*99.6%
metadata-eval99.6%
distribute-neg-frac99.6%
distribute-frac-neg99.6%
associate-/r*99.6%
distribute-neg-frac99.6%
metadata-eval99.6%
*-commutative99.6%
neg-sub099.6%
fma-udef99.6%
unpow299.6%
+-commutative99.6%
associate--r+99.6%
metadata-eval99.6%
Simplified99.6%
if 1.60000000000000003e185 < (*.f64 z z) Initial program 78.9%
associate-/r*78.8%
associate-/l/79.0%
associate-/r*79.0%
associate-/l/76.9%
sqr-neg76.9%
+-commutative76.9%
sqr-neg76.9%
fma-def76.9%
Simplified76.9%
Taylor expanded in z around inf 76.9%
*-commutative76.9%
Simplified76.9%
*-un-lft-identity76.9%
add-sqr-sqrt33.8%
times-frac33.8%
sqrt-prod33.8%
unpow233.8%
sqrt-prod9.8%
add-sqr-sqrt25.5%
sqrt-prod26.4%
unpow226.4%
sqrt-prod18.3%
add-sqr-sqrt46.4%
Applied egg-rr46.4%
associate-*l/46.5%
*-lft-identity46.5%
associate-/l/46.4%
associate-*l*42.2%
Simplified42.2%
div-inv42.2%
associate-*r*46.4%
associate-/r*46.4%
*-commutative46.4%
associate-/r*46.4%
metadata-eval46.4%
sqrt-div46.5%
inv-pow46.5%
sqrt-pow146.5%
metadata-eval46.5%
*-commutative46.5%
associate-/r*46.5%
metadata-eval46.5%
sqrt-div46.5%
inv-pow46.5%
sqrt-pow146.5%
metadata-eval46.5%
Applied egg-rr46.5%
associate-*r/44.5%
associate-/l/44.1%
associate-*l/44.2%
pow-sqr95.4%
metadata-eval95.4%
unpow-195.4%
*-commutative95.4%
Simplified95.4%
Final simplification98.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 4e+86) (/ (/ 1.0 y) (* x (fma z z 1.0))) (/ (/ (/ 1.0 x) (* z y)) z)))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 4e+86) {
tmp = (1.0 / y) / (x * fma(z, z, 1.0));
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 4e+86) tmp = Float64(Float64(1.0 / y) / Float64(x * fma(z, z, 1.0))); else tmp = Float64(Float64(Float64(1.0 / x) / Float64(z * y)) / z); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 4e+86], N[(N[(1.0 / y), $MachinePrecision] / N[(x * N[(z * z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / x), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 4 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{1}{y}}{x \cdot \mathsf{fma}\left(z, z, 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{z \cdot y}}{z}\\
\end{array}
\end{array}
if (*.f64 z z) < 4.0000000000000001e86Initial program 98.4%
associate-/r*98.4%
associate-/l/98.3%
associate-/r*98.4%
associate-/l/99.0%
sqr-neg99.0%
+-commutative99.0%
sqr-neg99.0%
fma-def99.0%
Simplified99.0%
if 4.0000000000000001e86 < (*.f64 z z) Initial program 81.8%
associate-/r*81.7%
associate-/l/81.8%
associate-/r*82.0%
associate-/l/75.1%
sqr-neg75.1%
+-commutative75.1%
sqr-neg75.1%
fma-def75.1%
Simplified75.1%
Taylor expanded in z around inf 75.1%
*-commutative75.1%
Simplified75.1%
*-un-lft-identity75.1%
add-sqr-sqrt34.5%
times-frac34.5%
sqrt-prod34.5%
unpow234.5%
sqrt-prod12.2%
add-sqr-sqrt25.6%
sqrt-prod28.1%
unpow228.1%
sqrt-prod21.1%
add-sqr-sqrt46.9%
Applied egg-rr46.9%
associate-*l/46.9%
*-lft-identity46.9%
associate-/l/46.9%
associate-*l*43.3%
Simplified43.3%
div-inv43.3%
associate-*r*46.9%
associate-/r*46.9%
*-commutative46.9%
associate-/r*46.9%
metadata-eval46.9%
sqrt-div47.0%
inv-pow47.0%
sqrt-pow147.0%
metadata-eval47.0%
*-commutative47.0%
associate-/r*47.0%
metadata-eval47.0%
sqrt-div47.0%
inv-pow47.0%
sqrt-pow147.0%
metadata-eval47.0%
Applied egg-rr47.0%
associate-*r/45.3%
associate-/l/45.0%
associate-*l/45.0%
pow-sqr96.0%
metadata-eval96.0%
unpow-196.0%
*-commutative96.0%
Simplified96.0%
Final simplification97.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 1e+50) (/ (/ 1.0 x) (* y (+ (* z z) 1.0))) (/ (/ (/ 1.0 x) (* z y)) z)))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+50) {
tmp = (1.0 / x) / (y * ((z * z) + 1.0));
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
NOTE: x and y 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 ((z * z) <= 1d+50) then
tmp = (1.0d0 / x) / (y * ((z * z) + 1.0d0))
else
tmp = ((1.0d0 / x) / (z * y)) / z
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+50) {
tmp = (1.0 / x) / (y * ((z * z) + 1.0));
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 1e+50: tmp = (1.0 / x) / (y * ((z * z) + 1.0)) else: tmp = ((1.0 / x) / (z * y)) / z return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 1e+50) tmp = Float64(Float64(1.0 / x) / Float64(y * Float64(Float64(z * z) + 1.0))); else tmp = Float64(Float64(Float64(1.0 / x) / Float64(z * y)) / z); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 1e+50)
tmp = (1.0 / x) / (y * ((z * z) + 1.0));
else
tmp = ((1.0 / x) / (z * y)) / z;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 1e+50], N[(N[(1.0 / x), $MachinePrecision] / N[(y * N[(N[(z * z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(1.0 / x), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+50}:\\
\;\;\;\;\frac{\frac{1}{x}}{y \cdot \left(z \cdot z + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{z \cdot y}}{z}\\
\end{array}
\end{array}
if (*.f64 z z) < 1.0000000000000001e50Initial program 99.7%
if 1.0000000000000001e50 < (*.f64 z z) Initial program 81.9%
associate-/r*81.8%
associate-/l/81.9%
associate-/r*82.0%
associate-/l/76.6%
sqr-neg76.6%
+-commutative76.6%
sqr-neg76.6%
fma-def76.6%
Simplified76.6%
Taylor expanded in z around inf 76.6%
*-commutative76.6%
Simplified76.6%
*-un-lft-identity76.6%
add-sqr-sqrt34.6%
times-frac34.7%
sqrt-prod34.7%
unpow234.7%
sqrt-prod13.6%
add-sqr-sqrt25.7%
sqrt-prod28.8%
unpow228.8%
sqrt-prod22.5%
add-sqr-sqrt46.8%
Applied egg-rr46.8%
associate-*l/46.8%
*-lft-identity46.8%
associate-/l/46.8%
associate-*l*43.5%
Simplified43.5%
div-inv43.5%
associate-*r*46.8%
associate-/r*46.7%
*-commutative46.7%
associate-/r*46.7%
metadata-eval46.7%
sqrt-div46.8%
inv-pow46.8%
sqrt-pow146.9%
metadata-eval46.9%
*-commutative46.9%
associate-/r*46.8%
metadata-eval46.8%
sqrt-div46.8%
inv-pow46.8%
sqrt-pow146.8%
metadata-eval46.8%
Applied egg-rr46.8%
associate-*r/45.3%
associate-/l/45.0%
associate-*l/45.0%
pow-sqr96.3%
metadata-eval96.3%
unpow-196.3%
*-commutative96.3%
Simplified96.3%
Final simplification98.1%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= z 1.0) (/ (/ 1.0 y) x) (/ (/ (/ 1.0 x) (* z y)) z)))
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if (z <= 1.0) {
tmp = (1.0 / y) / x;
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
NOTE: x and y 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 (z <= 1.0d0) then
tmp = (1.0d0 / y) / x
else
tmp = ((1.0d0 / x) / (z * y)) / z
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if (z <= 1.0) {
tmp = (1.0 / y) / x;
} else {
tmp = ((1.0 / x) / (z * y)) / z;
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if z <= 1.0: tmp = (1.0 / y) / x else: tmp = ((1.0 / x) / (z * y)) / z return tmp
x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (z <= 1.0) tmp = Float64(Float64(1.0 / y) / x); else tmp = Float64(Float64(Float64(1.0 / x) / Float64(z * y)) / z); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (z <= 1.0)
tmp = (1.0 / y) / x;
else
tmp = ((1.0 / x) / (z * y)) / z;
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[z, 1.0], N[(N[(1.0 / y), $MachinePrecision] / x), $MachinePrecision], N[(N[(N[(1.0 / x), $MachinePrecision] / N[(z * y), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 1:\\
\;\;\;\;\frac{\frac{1}{y}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{z \cdot y}}{z}\\
\end{array}
\end{array}
if z < 1Initial program 94.9%
associate-/r*94.9%
associate-/l/94.9%
associate-/r*94.9%
associate-/l/94.8%
sqr-neg94.8%
+-commutative94.8%
sqr-neg94.8%
fma-def94.8%
Simplified94.8%
Taylor expanded in z around 0 68.8%
if 1 < z Initial program 80.2%
associate-/r*80.1%
associate-/l/80.2%
associate-/r*80.6%
associate-/l/70.1%
sqr-neg70.1%
+-commutative70.1%
sqr-neg70.1%
fma-def70.1%
Simplified70.1%
Taylor expanded in z around inf 69.0%
*-commutative69.0%
Simplified69.0%
*-un-lft-identity69.0%
add-sqr-sqrt29.8%
times-frac29.8%
sqrt-prod29.8%
unpow229.8%
sqrt-prod29.7%
add-sqr-sqrt29.8%
sqrt-prod35.8%
unpow235.8%
sqrt-prod47.2%
add-sqr-sqrt47.3%
Applied egg-rr47.3%
associate-*l/47.3%
*-lft-identity47.3%
associate-/l/47.3%
associate-*l*42.3%
Simplified42.3%
div-inv42.3%
associate-*r*47.3%
associate-/r*47.3%
*-commutative47.3%
associate-/r*47.2%
metadata-eval47.2%
sqrt-div47.4%
inv-pow47.4%
sqrt-pow147.3%
metadata-eval47.3%
*-commutative47.3%
associate-/r*47.3%
metadata-eval47.3%
sqrt-div47.3%
inv-pow47.3%
sqrt-pow147.2%
metadata-eval47.2%
Applied egg-rr47.2%
associate-*r/45.7%
associate-/l/45.2%
associate-*l/45.1%
pow-sqr96.4%
metadata-eval96.4%
unpow-196.4%
*-commutative96.4%
Simplified96.4%
Final simplification75.4%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (/ 1.0 (* y x)))
assert(x < y);
double code(double x, double y, double z) {
return 1.0 / (y * x);
}
NOTE: x and y 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 = 1.0d0 / (y * x)
end function
assert x < y;
public static double code(double x, double y, double z) {
return 1.0 / (y * x);
}
[x, y] = sort([x, y]) def code(x, y, z): return 1.0 / (y * x)
x, y = sort([x, y]) function code(x, y, z) return Float64(1.0 / Float64(y * x)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = 1.0 / (y * x);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(1.0 / N[(y * x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{1}{y \cdot x}
\end{array}
Initial program 91.4%
Taylor expanded in z around 0 55.7%
*-commutative55.7%
Simplified55.7%
Final simplification55.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 2023308
(FPCore (x y z)
:name "Statistics.Distribution.CauchyLorentz:$cdensity from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(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)))))