
(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 16 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: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 1e+112) (/ (/ (/ -1.0 x) (- -1.0 (* z z))) y) (/ (/ (/ (pow z -1.0) x) y) (hypot 1.0 z))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+112) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = ((pow(z, -1.0) / x) / y) / hypot(1.0, z);
}
return tmp;
}
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+112) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = ((Math.pow(z, -1.0) / x) / y) / Math.hypot(1.0, z);
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 1e+112: tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y else: tmp = ((math.pow(z, -1.0) / x) / y) / math.hypot(1.0, z) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 1e+112) tmp = Float64(Float64(Float64(-1.0 / x) / Float64(-1.0 - Float64(z * z))) / y); else tmp = Float64(Float64(Float64((z ^ -1.0) / x) / y) / hypot(1.0, z)); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 1e+112)
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
else
tmp = (((z ^ -1.0) / x) / y) / hypot(1.0, z);
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function 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+112], N[(N[(N[(-1.0 / x), $MachinePrecision] / N[(-1.0 - N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(N[(N[Power[z, -1.0], $MachinePrecision] / x), $MachinePrecision] / y), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+112}:\\
\;\;\;\;\frac{\frac{\frac{-1}{x}}{-1 - z \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{{z}^{-1}}{x}}{y}}{\mathsf{hypot}\left(1, z\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 9.9999999999999993e111Initial program 97.9%
associate-/r*97.5%
+-commutative97.5%
fma-def97.5%
Simplified97.5%
fma-udef97.5%
+-commutative97.5%
associate-/r*97.9%
associate-/r*99.7%
add-sqr-sqrt99.7%
*-un-lft-identity99.7%
times-frac99.7%
hypot-1-def99.7%
associate-/l/99.3%
hypot-1-def99.3%
Applied egg-rr99.3%
associate-*l/99.3%
*-lft-identity99.3%
associate-/r*99.6%
associate-/l/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in y around 0 98.1%
*-commutative98.1%
unpow298.1%
fma-udef98.1%
associate-*l*98.8%
associate-/l/99.3%
*-rgt-identity99.3%
times-frac97.7%
*-commutative97.7%
associate-*r/99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
frac-2neg99.0%
div-inv99.0%
distribute-neg-frac99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
neg-sub099.0%
fma-udef99.0%
unpow299.0%
+-commutative99.0%
associate--r+99.0%
metadata-eval99.0%
unpow299.0%
Simplified99.0%
if 9.9999999999999993e111 < (*.f64 z z) Initial program 70.7%
associate-/r*70.7%
+-commutative70.7%
fma-def70.7%
Simplified70.7%
associate-/r*70.7%
*-un-lft-identity70.7%
fma-udef70.7%
+-commutative70.7%
*-commutative70.7%
times-frac72.6%
+-commutative72.6%
fma-udef72.6%
associate-/l/72.6%
Applied egg-rr72.6%
associate-*l/72.6%
frac-2neg72.6%
metadata-eval72.6%
*-commutative72.6%
distribute-rgt-neg-out72.6%
fma-udef72.6%
+-commutative72.6%
add-sqr-sqrt72.6%
hypot-1-def72.6%
hypot-1-def72.6%
times-frac86.4%
metadata-eval86.4%
distribute-rgt-neg-out86.4%
*-commutative86.4%
frac-2neg86.4%
associate-/r*86.4%
associate-/r*95.8%
times-frac86.0%
*-un-lft-identity86.0%
associate-/l/95.8%
Applied egg-rr86.4%
Taylor expanded in z around inf 72.4%
*-commutative72.4%
*-commutative72.4%
associate-/r*72.4%
*-commutative72.4%
associate-/r*72.4%
unpow-172.4%
Simplified72.4%
Final simplification87.0%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (/ (/ (/ 1.0 y) (* x (hypot 1.0 z))) (hypot 1.0 z)))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
return ((1.0 / y) / (x * hypot(1.0, z))) / hypot(1.0, z);
}
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
return ((1.0 / y) / (x * Math.hypot(1.0, z))) / Math.hypot(1.0, z);
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): return ((1.0 / y) / (x * math.hypot(1.0, z))) / math.hypot(1.0, z)
z = abs(z) x, y = sort([x, y]) function code(x, y, z) return Float64(Float64(Float64(1.0 / y) / Float64(x * hypot(1.0, z))) / hypot(1.0, z)) end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = ((1.0 / y) / (x * hypot(1.0, z))) / hypot(1.0, z);
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(N[(N[(1.0 / y), $MachinePrecision] / N[(x * N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{\frac{1}{y}}{x \cdot \mathsf{hypot}\left(1, z\right)}}{\mathsf{hypot}\left(1, z\right)}
\end{array}
Initial program 85.7%
associate-/r*85.5%
+-commutative85.5%
fma-def85.5%
Simplified85.5%
fma-udef85.5%
+-commutative85.5%
associate-/r*85.7%
associate-/r*87.5%
add-sqr-sqrt87.5%
*-un-lft-identity87.5%
times-frac87.5%
hypot-1-def87.5%
associate-/l/87.3%
hypot-1-def93.5%
Applied egg-rr93.5%
associate-*l/93.5%
*-lft-identity93.5%
associate-/r*93.7%
associate-/l/97.5%
*-commutative97.5%
Simplified97.5%
Final simplification97.5%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (/ 1.0 (* (hypot 1.0 z) (* y (* x (hypot 1.0 z))))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
return 1.0 / (hypot(1.0, z) * (y * (x * hypot(1.0, z))));
}
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
return 1.0 / (Math.hypot(1.0, z) * (y * (x * Math.hypot(1.0, z))));
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): return 1.0 / (math.hypot(1.0, z) * (y * (x * math.hypot(1.0, z))))
z = abs(z) x, y = sort([x, y]) function code(x, y, z) return Float64(1.0 / Float64(hypot(1.0, z) * Float64(y * Float64(x * hypot(1.0, z))))) end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = 1.0 / (hypot(1.0, z) * (y * (x * hypot(1.0, z))));
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(1.0 / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[(y * N[(x * N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \left(y \cdot \left(x \cdot \mathsf{hypot}\left(1, z\right)\right)\right)}
\end{array}
Initial program 85.7%
associate-/r*85.5%
+-commutative85.5%
fma-def85.5%
Simplified85.5%
associate-/r*85.7%
*-un-lft-identity85.7%
fma-udef85.7%
+-commutative85.7%
*-commutative85.7%
times-frac87.5%
+-commutative87.5%
fma-udef87.5%
associate-/l/87.3%
Applied egg-rr87.3%
associate-*l/87.3%
frac-2neg87.3%
metadata-eval87.3%
*-commutative87.3%
distribute-rgt-neg-out87.3%
fma-udef87.3%
+-commutative87.3%
add-sqr-sqrt87.3%
hypot-1-def87.3%
hypot-1-def87.3%
times-frac93.5%
metadata-eval93.5%
distribute-rgt-neg-out93.5%
*-commutative93.5%
frac-2neg93.5%
associate-/r*93.7%
associate-/r*97.5%
times-frac93.2%
*-un-lft-identity93.2%
associate-/l/97.5%
Applied egg-rr97.1%
Final simplification97.1%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 1e+121) (/ (/ (/ -1.0 x) (- -1.0 (* z z))) y) (* (/ 1.0 z) (/ (pow y -1.0) (* x z)))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+121) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = (1.0 / z) * (pow(y, -1.0) / (x * z));
}
return tmp;
}
NOTE: z should be positive before calling this function
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+121) then
tmp = (((-1.0d0) / x) / ((-1.0d0) - (z * z))) / y
else
tmp = (1.0d0 / z) * ((y ** (-1.0d0)) / (x * z))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 1e+121) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = (1.0 / z) * (Math.pow(y, -1.0) / (x * z));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 1e+121: tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y else: tmp = (1.0 / z) * (math.pow(y, -1.0) / (x * z)) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 1e+121) tmp = Float64(Float64(Float64(-1.0 / x) / Float64(-1.0 - Float64(z * z))) / y); else tmp = Float64(Float64(1.0 / z) * Float64((y ^ -1.0) / Float64(x * z))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 1e+121)
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
else
tmp = (1.0 / z) * ((y ^ -1.0) / (x * z));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function 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+121], N[(N[(N[(-1.0 / x), $MachinePrecision] / N[(-1.0 - N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(N[(1.0 / z), $MachinePrecision] * N[(N[Power[y, -1.0], $MachinePrecision] / N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 10^{+121}:\\
\;\;\;\;\frac{\frac{\frac{-1}{x}}{-1 - z \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z} \cdot \frac{{y}^{-1}}{x \cdot z}\\
\end{array}
\end{array}
if (*.f64 z z) < 1.00000000000000004e121Initial program 97.9%
associate-/r*97.6%
+-commutative97.6%
fma-def97.6%
Simplified97.6%
fma-udef97.6%
+-commutative97.6%
associate-/r*97.9%
associate-/r*99.0%
add-sqr-sqrt99.0%
*-un-lft-identity99.0%
times-frac99.0%
hypot-1-def99.0%
associate-/l/98.6%
hypot-1-def98.6%
Applied egg-rr98.6%
associate-*l/98.6%
*-lft-identity98.6%
associate-/r*99.0%
associate-/l/98.4%
*-commutative98.4%
Simplified98.4%
Taylor expanded in y around 0 97.6%
*-commutative97.6%
unpow297.6%
fma-udef97.6%
associate-*l*98.2%
associate-/l/98.7%
*-rgt-identity98.7%
times-frac97.8%
*-commutative97.8%
associate-*r/98.4%
associate-*r/98.4%
*-rgt-identity98.4%
Simplified98.4%
frac-2neg98.4%
div-inv98.4%
distribute-neg-frac98.4%
metadata-eval98.4%
Applied egg-rr98.4%
associate-*r/98.4%
*-rgt-identity98.4%
neg-sub098.4%
fma-udef98.4%
unpow298.4%
+-commutative98.4%
associate--r+98.4%
metadata-eval98.4%
unpow298.4%
Simplified98.4%
if 1.00000000000000004e121 < (*.f64 z z) Initial program 69.4%
associate-/r*69.4%
+-commutative69.4%
fma-def69.4%
Simplified69.4%
fma-udef69.4%
+-commutative69.4%
associate-/r*69.4%
associate-/r*72.2%
add-sqr-sqrt72.2%
*-un-lft-identity72.2%
times-frac72.2%
hypot-1-def72.2%
associate-/l/72.2%
hypot-1-def86.6%
Applied egg-rr86.6%
associate-*l/86.7%
*-lft-identity86.7%
associate-/r*86.6%
associate-/l/96.4%
*-commutative96.4%
Simplified96.4%
Taylor expanded in z around inf 76.0%
unpow276.0%
Simplified76.0%
associate-/r*76.0%
*-un-lft-identity76.0%
associate-*l*86.3%
times-frac96.4%
inv-pow96.4%
*-commutative96.4%
Applied egg-rr96.4%
Final simplification97.5%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 5e+94) (/ (/ (/ -1.0 x) (- -1.0 (* z z))) y) (/ 1.0 (* (hypot 1.0 z) (* y (* x z))))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 5e+94) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = 1.0 / (hypot(1.0, z) * (y * (x * z)));
}
return tmp;
}
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 5e+94) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = 1.0 / (Math.hypot(1.0, z) * (y * (x * z)));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 5e+94: tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y else: tmp = 1.0 / (math.hypot(1.0, z) * (y * (x * z))) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 5e+94) tmp = Float64(Float64(Float64(-1.0 / x) / Float64(-1.0 - Float64(z * z))) / y); else tmp = Float64(1.0 / Float64(hypot(1.0, z) * Float64(y * Float64(x * z)))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 5e+94)
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
else
tmp = 1.0 / (hypot(1.0, z) * (y * (x * z)));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 5e+94], N[(N[(N[(-1.0 / x), $MachinePrecision] / N[(-1.0 - N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(N[Sqrt[1.0 ^ 2 + z ^ 2], $MachinePrecision] * N[(y * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+94}:\\
\;\;\;\;\frac{\frac{\frac{-1}{x}}{-1 - z \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{hypot}\left(1, z\right) \cdot \left(y \cdot \left(x \cdot z\right)\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 5.0000000000000001e94Initial program 98.5%
associate-/r*98.1%
+-commutative98.1%
fma-def98.1%
Simplified98.1%
fma-udef98.1%
+-commutative98.1%
associate-/r*98.5%
associate-/r*99.7%
add-sqr-sqrt99.7%
*-un-lft-identity99.7%
times-frac99.7%
hypot-1-def99.7%
associate-/l/99.2%
hypot-1-def99.2%
Applied egg-rr99.2%
associate-*l/99.2%
*-lft-identity99.2%
associate-/r*99.6%
associate-/l/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in y around 0 98.1%
*-commutative98.1%
unpow298.1%
fma-udef98.1%
associate-*l*98.8%
associate-/l/99.3%
*-rgt-identity99.3%
times-frac98.4%
*-commutative98.4%
associate-*r/99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
frac-2neg99.0%
div-inv99.0%
distribute-neg-frac99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
neg-sub099.0%
fma-udef99.0%
unpow299.0%
+-commutative99.0%
associate--r+99.0%
metadata-eval99.0%
unpow299.0%
Simplified99.0%
if 5.0000000000000001e94 < (*.f64 z z) Initial program 70.6%
associate-/r*70.6%
+-commutative70.6%
fma-def70.6%
Simplified70.6%
associate-/r*70.6%
*-un-lft-identity70.6%
fma-udef70.6%
+-commutative70.6%
*-commutative70.6%
times-frac73.2%
+-commutative73.2%
fma-udef73.2%
associate-/l/73.3%
Applied egg-rr73.3%
associate-*l/73.3%
frac-2neg73.3%
metadata-eval73.3%
*-commutative73.3%
distribute-rgt-neg-out73.3%
fma-udef73.3%
+-commutative73.3%
add-sqr-sqrt73.3%
hypot-1-def73.3%
hypot-1-def73.3%
times-frac86.7%
metadata-eval86.7%
distribute-rgt-neg-out86.7%
*-commutative86.7%
frac-2neg86.7%
associate-/r*86.7%
associate-/r*95.9%
times-frac86.4%
*-un-lft-identity86.4%
associate-/l/95.9%
Applied egg-rr96.0%
Taylor expanded in z around inf 73.1%
Final simplification87.1%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e+151) (/ (/ (/ 1.0 y) x) (+ 1.0 (* z z))) (/ (/ (pow z -1.0) x) (* y z))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
} else {
tmp = (pow(z, -1.0) / x) / (y * z);
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d+151) then
tmp = ((1.0d0 / y) / x) / (1.0d0 + (z * z))
else
tmp = ((z ** (-1.0d0)) / x) / (y * z)
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
} else {
tmp = (Math.pow(z, -1.0) / x) / (y * z);
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e+151: tmp = ((1.0 / y) / x) / (1.0 + (z * z)) else: tmp = (math.pow(z, -1.0) / x) / (y * z) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e+151) tmp = Float64(Float64(Float64(1.0 / y) / x) / Float64(1.0 + Float64(z * z))); else tmp = Float64(Float64((z ^ -1.0) / x) / Float64(y * z)); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e+151)
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
else
tmp = ((z ^ -1.0) / x) / (y * z);
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+151], N[(N[(N[(1.0 / y), $MachinePrecision] / x), $MachinePrecision] / N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[Power[z, -1.0], $MachinePrecision] / x), $MachinePrecision] / N[(y * z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{{z}^{-1}}{x}}{y \cdot z}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000003e151Initial program 96.8%
associate-/r*99.0%
Simplified99.0%
*-un-lft-identity99.0%
add-sqr-sqrt49.3%
times-frac49.3%
Applied egg-rr49.3%
frac-times49.3%
*-un-lft-identity49.3%
add-sqr-sqrt99.0%
div-inv98.8%
inv-pow98.8%
inv-pow98.8%
unpow-prod-down98.7%
*-commutative98.7%
inv-pow98.7%
associate-/r*99.0%
Applied egg-rr99.0%
if 2.00000000000000003e151 < (*.f64 z z) Initial program 69.1%
associate-/r*69.1%
+-commutative69.1%
fma-def69.1%
Simplified69.1%
associate-/r*69.1%
*-un-lft-identity69.1%
fma-udef69.1%
+-commutative69.1%
*-commutative69.1%
times-frac70.4%
+-commutative70.4%
fma-udef70.4%
associate-/l/70.3%
Applied egg-rr70.3%
associate-*l/70.4%
frac-2neg70.4%
metadata-eval70.4%
*-commutative70.4%
distribute-rgt-neg-out70.4%
fma-udef70.4%
+-commutative70.4%
add-sqr-sqrt70.4%
hypot-1-def70.4%
hypot-1-def70.4%
times-frac85.8%
metadata-eval85.8%
distribute-rgt-neg-out85.8%
*-commutative85.8%
frac-2neg85.8%
associate-/r*85.8%
associate-/r*96.2%
times-frac85.3%
*-un-lft-identity85.3%
associate-/l/96.2%
Applied egg-rr85.8%
Taylor expanded in z around inf 74.4%
*-commutative74.4%
*-commutative74.4%
unpow274.4%
associate-*r*85.4%
associate-*r*95.6%
associate-/r*95.6%
*-commutative95.6%
associate-/r*95.5%
unpow-195.5%
Simplified95.5%
Final simplification97.6%
NOTE: z should be positive before calling this function
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y z)
:precision binary64
(let* ((t_0 (* y (+ 1.0 (* z z)))))
(if (<= t_0 (- INFINITY))
(/ 1.0 (* x (* z (* y z))))
(if (<= t_0 2e+302) (/ (/ 1.0 x) t_0) (/ 1.0 (* y (* z (* x z))))))))z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double t_0 = y * (1.0 + (z * z));
double tmp;
if (t_0 <= -((double) INFINITY)) {
tmp = 1.0 / (x * (z * (y * z)));
} else if (t_0 <= 2e+302) {
tmp = (1.0 / x) / t_0;
} else {
tmp = 1.0 / (y * (z * (x * z)));
}
return tmp;
}
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double t_0 = y * (1.0 + (z * z));
double tmp;
if (t_0 <= -Double.POSITIVE_INFINITY) {
tmp = 1.0 / (x * (z * (y * z)));
} else if (t_0 <= 2e+302) {
tmp = (1.0 / x) / t_0;
} else {
tmp = 1.0 / (y * (z * (x * z)));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): t_0 = y * (1.0 + (z * z)) tmp = 0 if t_0 <= -math.inf: tmp = 1.0 / (x * (z * (y * z))) elif t_0 <= 2e+302: tmp = (1.0 / x) / t_0 else: tmp = 1.0 / (y * (z * (x * z))) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) t_0 = Float64(y * Float64(1.0 + Float64(z * z))) tmp = 0.0 if (t_0 <= Float64(-Inf)) tmp = Float64(1.0 / Float64(x * Float64(z * Float64(y * z)))); elseif (t_0 <= 2e+302) tmp = Float64(Float64(1.0 / x) / t_0); else tmp = Float64(1.0 / Float64(y * Float64(z * Float64(x * z)))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
t_0 = y * (1.0 + (z * z));
tmp = 0.0;
if (t_0 <= -Inf)
tmp = 1.0 / (x * (z * (y * z)));
elseif (t_0 <= 2e+302)
tmp = (1.0 / x) / t_0;
else
tmp = 1.0 / (y * (z * (x * z)));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function
NOTE: x and y should be sorted in increasing order before calling this function.
code[x_, y_, z_] := Block[{t$95$0 = N[(y * N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, (-Infinity)], N[(1.0 / N[(x * N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 2e+302], N[(N[(1.0 / x), $MachinePrecision] / t$95$0), $MachinePrecision], N[(1.0 / N[(y * N[(z * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
t_0 := y \cdot \left(1 + z \cdot z\right)\\
\mathbf{if}\;t_0 \leq -\infty:\\
\;\;\;\;\frac{1}{x \cdot \left(z \cdot \left(y \cdot z\right)\right)}\\
\mathbf{elif}\;t_0 \leq 2 \cdot 10^{+302}:\\
\;\;\;\;\frac{\frac{1}{x}}{t_0}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot \left(x \cdot z\right)\right)}\\
\end{array}
\end{array}
if (*.f64 y (+.f64 1 (*.f64 z z))) < -inf.0Initial program 58.1%
associate-/r*58.1%
+-commutative58.1%
fma-def58.1%
Simplified58.1%
Taylor expanded in z around inf 58.1%
unpow258.1%
associate-*r*83.6%
*-commutative83.6%
Simplified83.6%
if -inf.0 < (*.f64 y (+.f64 1 (*.f64 z z))) < 2.0000000000000002e302Initial program 99.6%
if 2.0000000000000002e302 < (*.f64 y (+.f64 1 (*.f64 z z))) Initial program 64.0%
associate-/r*64.0%
+-commutative64.0%
fma-def64.0%
Simplified64.0%
associate-/r*64.0%
*-un-lft-identity64.0%
fma-udef64.0%
+-commutative64.0%
*-commutative64.0%
times-frac81.0%
+-commutative81.0%
fma-udef81.0%
associate-/l/81.0%
Applied egg-rr81.0%
associate-*l/81.1%
frac-2neg81.1%
metadata-eval81.1%
*-commutative81.1%
distribute-rgt-neg-out81.1%
fma-udef81.1%
+-commutative81.1%
add-sqr-sqrt81.1%
hypot-1-def81.1%
hypot-1-def81.1%
times-frac90.4%
metadata-eval90.4%
distribute-rgt-neg-out90.4%
*-commutative90.4%
frac-2neg90.4%
associate-/r*90.3%
associate-/r*99.6%
times-frac92.9%
*-un-lft-identity92.9%
associate-/l/99.7%
Applied egg-rr98.3%
Taylor expanded in z around inf 79.9%
unpow279.9%
*-commutative79.9%
associate-*r*91.4%
*-commutative91.4%
Simplified91.4%
Final simplification95.1%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 5e+86) (/ (/ (/ -1.0 x) (- -1.0 (* z z))) y) (/ 1.0 (* (* x z) (* y z)))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 5e+86) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 5d+86) then
tmp = (((-1.0d0) / x) / ((-1.0d0) - (z * z))) / y
else
tmp = 1.0d0 / ((x * z) * (y * z))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 5e+86) {
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 5e+86: tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y else: tmp = 1.0 / ((x * z) * (y * z)) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 5e+86) tmp = Float64(Float64(Float64(-1.0 / x) / Float64(-1.0 - Float64(z * z))) / y); else tmp = Float64(1.0 / Float64(Float64(x * z) * Float64(y * z))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 5e+86)
tmp = ((-1.0 / x) / (-1.0 - (z * z))) / y;
else
tmp = 1.0 / ((x * z) * (y * z));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 5e+86], N[(N[(N[(-1.0 / x), $MachinePrecision] / N[(-1.0 - N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(N[(x * z), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 5 \cdot 10^{+86}:\\
\;\;\;\;\frac{\frac{\frac{-1}{x}}{-1 - z \cdot z}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot z\right) \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 4.9999999999999998e86Initial program 98.5%
associate-/r*98.1%
+-commutative98.1%
fma-def98.1%
Simplified98.1%
fma-udef98.1%
+-commutative98.1%
associate-/r*98.5%
associate-/r*99.7%
add-sqr-sqrt99.7%
*-un-lft-identity99.7%
times-frac99.7%
hypot-1-def99.7%
associate-/l/99.3%
hypot-1-def99.3%
Applied egg-rr99.3%
associate-*l/99.2%
*-lft-identity99.2%
associate-/r*99.6%
associate-/l/99.0%
*-commutative99.0%
Simplified99.0%
Taylor expanded in y around 0 98.1%
*-commutative98.1%
unpow298.1%
fma-udef98.1%
associate-*l*98.8%
associate-/l/99.3%
*-rgt-identity99.3%
times-frac98.4%
*-commutative98.4%
associate-*r/99.0%
associate-*r/99.0%
*-rgt-identity99.0%
Simplified99.0%
frac-2neg99.0%
div-inv99.0%
distribute-neg-frac99.0%
metadata-eval99.0%
Applied egg-rr99.0%
associate-*r/99.0%
*-rgt-identity99.0%
neg-sub099.0%
fma-udef99.0%
unpow299.0%
+-commutative99.0%
associate--r+99.0%
metadata-eval99.0%
unpow299.0%
Simplified99.0%
if 4.9999999999999998e86 < (*.f64 z z) Initial program 70.9%
associate-/r*70.9%
+-commutative70.9%
fma-def70.9%
Simplified70.9%
associate-/r*70.9%
*-un-lft-identity70.9%
fma-udef70.9%
+-commutative70.9%
*-commutative70.9%
times-frac73.5%
+-commutative73.5%
fma-udef73.5%
associate-/l/73.5%
Applied egg-rr73.5%
associate-*l/73.5%
frac-2neg73.5%
metadata-eval73.5%
*-commutative73.5%
distribute-rgt-neg-out73.5%
fma-udef73.5%
+-commutative73.5%
add-sqr-sqrt73.5%
hypot-1-def73.5%
hypot-1-def73.5%
times-frac86.8%
metadata-eval86.8%
distribute-rgt-neg-out86.8%
*-commutative86.8%
frac-2neg86.8%
associate-/r*86.8%
associate-/r*95.9%
times-frac86.5%
*-un-lft-identity86.5%
associate-/l/95.9%
Applied egg-rr96.0%
Taylor expanded in z around inf 77.0%
unpow277.0%
*-commutative77.0%
associate-*r*86.5%
*-commutative86.5%
Simplified86.5%
/-rgt-identity86.5%
*-commutative86.5%
associate-*l*94.6%
*-commutative94.6%
Applied egg-rr94.6%
Final simplification96.9%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e+151) (/ (/ (/ 1.0 x) y) (+ 1.0 (* z z))) (/ 1.0 (* (* x z) (* y z)))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / x) / y) / (1.0 + (z * z));
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d+151) then
tmp = ((1.0d0 / x) / y) / (1.0d0 + (z * z))
else
tmp = 1.0d0 / ((x * z) * (y * z))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / x) / y) / (1.0 + (z * z));
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e+151: tmp = ((1.0 / x) / y) / (1.0 + (z * z)) else: tmp = 1.0 / ((x * z) * (y * z)) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e+151) tmp = Float64(Float64(Float64(1.0 / x) / y) / Float64(1.0 + Float64(z * z))); else tmp = Float64(1.0 / Float64(Float64(x * z) * Float64(y * z))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e+151)
tmp = ((1.0 / x) / y) / (1.0 + (z * z));
else
tmp = 1.0 / ((x * z) * (y * z));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+151], N[(N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision] / N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(x * z), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{\frac{1}{x}}{y}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot z\right) \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000003e151Initial program 96.8%
associate-/r*99.0%
Simplified99.0%
if 2.00000000000000003e151 < (*.f64 z z) Initial program 69.1%
associate-/r*69.1%
+-commutative69.1%
fma-def69.1%
Simplified69.1%
associate-/r*69.1%
*-un-lft-identity69.1%
fma-udef69.1%
+-commutative69.1%
*-commutative69.1%
times-frac70.4%
+-commutative70.4%
fma-udef70.4%
associate-/l/70.3%
Applied egg-rr70.3%
associate-*l/70.4%
frac-2neg70.4%
metadata-eval70.4%
*-commutative70.4%
distribute-rgt-neg-out70.4%
fma-udef70.4%
+-commutative70.4%
add-sqr-sqrt70.4%
hypot-1-def70.4%
hypot-1-def70.4%
times-frac85.8%
metadata-eval85.8%
distribute-rgt-neg-out85.8%
*-commutative85.8%
frac-2neg85.8%
associate-/r*85.8%
associate-/r*96.2%
times-frac85.3%
*-un-lft-identity85.3%
associate-/l/96.2%
Applied egg-rr96.3%
Taylor expanded in z around inf 74.4%
unpow274.4%
*-commutative74.4%
associate-*r*85.4%
*-commutative85.4%
Simplified85.4%
/-rgt-identity85.4%
*-commutative85.4%
associate-*l*95.6%
*-commutative95.6%
Applied egg-rr95.6%
Final simplification97.7%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e+151) (/ (/ (/ 1.0 y) x) (+ 1.0 (* z z))) (/ 1.0 (* (* x z) (* y z)))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d+151) then
tmp = ((1.0d0 / y) / x) / (1.0d0 + (z * z))
else
tmp = 1.0d0 / ((x * z) * (y * z))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e+151) {
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e+151: tmp = ((1.0 / y) / x) / (1.0 + (z * z)) else: tmp = 1.0 / ((x * z) * (y * z)) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e+151) tmp = Float64(Float64(Float64(1.0 / y) / x) / Float64(1.0 + Float64(z * z))); else tmp = Float64(1.0 / Float64(Float64(x * z) * Float64(y * z))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e+151)
tmp = ((1.0 / y) / x) / (1.0 + (z * z));
else
tmp = 1.0 / ((x * z) * (y * z));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e+151], N[(N[(N[(1.0 / y), $MachinePrecision] / x), $MachinePrecision] / N[(1.0 + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(N[(x * z), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{+151}:\\
\;\;\;\;\frac{\frac{\frac{1}{y}}{x}}{1 + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot z\right) \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000003e151Initial program 96.8%
associate-/r*99.0%
Simplified99.0%
*-un-lft-identity99.0%
add-sqr-sqrt49.3%
times-frac49.3%
Applied egg-rr49.3%
frac-times49.3%
*-un-lft-identity49.3%
add-sqr-sqrt99.0%
div-inv98.8%
inv-pow98.8%
inv-pow98.8%
unpow-prod-down98.7%
*-commutative98.7%
inv-pow98.7%
associate-/r*99.0%
Applied egg-rr99.0%
if 2.00000000000000003e151 < (*.f64 z z) Initial program 69.1%
associate-/r*69.1%
+-commutative69.1%
fma-def69.1%
Simplified69.1%
associate-/r*69.1%
*-un-lft-identity69.1%
fma-udef69.1%
+-commutative69.1%
*-commutative69.1%
times-frac70.4%
+-commutative70.4%
fma-udef70.4%
associate-/l/70.3%
Applied egg-rr70.3%
associate-*l/70.4%
frac-2neg70.4%
metadata-eval70.4%
*-commutative70.4%
distribute-rgt-neg-out70.4%
fma-udef70.4%
+-commutative70.4%
add-sqr-sqrt70.4%
hypot-1-def70.4%
hypot-1-def70.4%
times-frac85.8%
metadata-eval85.8%
distribute-rgt-neg-out85.8%
*-commutative85.8%
frac-2neg85.8%
associate-/r*85.8%
associate-/r*96.2%
times-frac85.3%
*-un-lft-identity85.3%
associate-/l/96.2%
Applied egg-rr96.3%
Taylor expanded in z around inf 74.4%
unpow274.4%
*-commutative74.4%
associate-*r*85.4%
*-commutative85.4%
Simplified85.4%
/-rgt-identity85.4%
*-commutative85.4%
associate-*l*95.6%
*-commutative95.6%
Applied egg-rr95.6%
Final simplification97.6%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e-17) (/ (/ 1.0 x) y) (/ 1.0 (* y (* z (* x z))))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (y * (z * (x * z)));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d-17) then
tmp = (1.0d0 / x) / y
else
tmp = 1.0d0 / (y * (z * (x * z)))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (y * (z * (x * z)));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e-17: tmp = (1.0 / x) / y else: tmp = 1.0 / (y * (z * (x * z))) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e-17) tmp = Float64(Float64(1.0 / x) / y); else tmp = Float64(1.0 / Float64(y * Float64(z * Float64(x * z)))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e-17)
tmp = (1.0 / x) / y;
else
tmp = 1.0 / (y * (z * (x * z)));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e-17], N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(y * N[(z * N[(x * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{1}{x}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y \cdot \left(z \cdot \left(x \cdot z\right)\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000014e-17Initial program 99.7%
associate-/r*99.2%
+-commutative99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in z around 0 99.2%
frac-2neg99.2%
metadata-eval99.2%
*-commutative99.2%
distribute-rgt-neg-out99.2%
add-sqr-sqrt50.2%
pow250.2%
metadata-eval50.2%
distribute-rgt-neg-out50.2%
*-commutative50.2%
frac-2neg50.2%
inv-pow50.2%
sqrt-pow150.2%
metadata-eval50.2%
Applied egg-rr50.2%
pow-pow99.2%
metadata-eval99.2%
inv-pow99.2%
*-commutative99.2%
associate-/r*99.7%
Applied egg-rr99.7%
if 2.00000000000000014e-17 < (*.f64 z z) Initial program 74.1%
associate-/r*74.1%
+-commutative74.1%
fma-def74.1%
Simplified74.1%
associate-/r*74.1%
*-un-lft-identity74.1%
fma-udef74.1%
+-commutative74.1%
*-commutative74.1%
times-frac77.4%
+-commutative77.4%
fma-udef77.4%
associate-/l/77.5%
Applied egg-rr77.5%
associate-*l/77.4%
frac-2neg77.4%
metadata-eval77.4%
*-commutative77.4%
distribute-rgt-neg-out77.4%
fma-udef77.4%
+-commutative77.4%
add-sqr-sqrt77.4%
hypot-1-def77.4%
hypot-1-def77.4%
times-frac88.7%
metadata-eval88.7%
distribute-rgt-neg-out88.7%
*-commutative88.7%
frac-2neg88.7%
associate-/r*88.8%
associate-/r*95.8%
times-frac87.8%
*-un-lft-identity87.8%
associate-/l/95.8%
Applied egg-rr95.4%
Taylor expanded in z around inf 79.3%
unpow279.3%
*-commutative79.3%
associate-*r*87.3%
*-commutative87.3%
Simplified87.3%
Final simplification92.9%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e-17) (/ (/ 1.0 x) y) (/ 1.0 (* z (* z (* y x))))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (z * (z * (y * x)));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d-17) then
tmp = (1.0d0 / x) / y
else
tmp = 1.0d0 / (z * (z * (y * x)))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (z * (z * (y * x)));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e-17: tmp = (1.0 / x) / y else: tmp = 1.0 / (z * (z * (y * x))) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e-17) tmp = Float64(Float64(1.0 / x) / y); else tmp = Float64(1.0 / Float64(z * Float64(z * Float64(y * x)))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e-17)
tmp = (1.0 / x) / y;
else
tmp = 1.0 / (z * (z * (y * x)));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e-17], N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(z * N[(z * N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{1}{x}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{z \cdot \left(z \cdot \left(y \cdot x\right)\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000014e-17Initial program 99.7%
associate-/r*99.2%
+-commutative99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in z around 0 99.2%
frac-2neg99.2%
metadata-eval99.2%
*-commutative99.2%
distribute-rgt-neg-out99.2%
add-sqr-sqrt50.2%
pow250.2%
metadata-eval50.2%
distribute-rgt-neg-out50.2%
*-commutative50.2%
frac-2neg50.2%
inv-pow50.2%
sqrt-pow150.2%
metadata-eval50.2%
Applied egg-rr50.2%
pow-pow99.2%
metadata-eval99.2%
inv-pow99.2%
*-commutative99.2%
associate-/r*99.7%
Applied egg-rr99.7%
if 2.00000000000000014e-17 < (*.f64 z z) Initial program 74.1%
associate-/r*74.1%
+-commutative74.1%
fma-def74.1%
Simplified74.1%
Taylor expanded in z around inf 79.3%
unpow279.3%
*-commutative79.3%
associate-*l*77.4%
*-commutative77.4%
associate-*l*89.4%
Simplified89.4%
Final simplification94.0%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= (* z z) 2e-17) (/ (/ 1.0 x) y) (/ 1.0 (* (* x z) (* y z)))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
NOTE: z should be positive before calling this function
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) <= 2d-17) then
tmp = (1.0d0 / x) / y
else
tmp = 1.0d0 / ((x * z) * (y * z))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if ((z * z) <= 2e-17) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / ((x * z) * (y * z));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if (z * z) <= 2e-17: tmp = (1.0 / x) / y else: tmp = 1.0 / ((x * z) * (y * z)) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (Float64(z * z) <= 2e-17) tmp = Float64(Float64(1.0 / x) / y); else tmp = Float64(1.0 / Float64(Float64(x * z) * Float64(y * z))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if ((z * z) <= 2e-17)
tmp = (1.0 / x) / y;
else
tmp = 1.0 / ((x * z) * (y * z));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[N[(z * z), $MachinePrecision], 2e-17], N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(N[(x * z), $MachinePrecision] * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \cdot z \leq 2 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{1}{x}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\left(x \cdot z\right) \cdot \left(y \cdot z\right)}\\
\end{array}
\end{array}
if (*.f64 z z) < 2.00000000000000014e-17Initial program 99.7%
associate-/r*99.2%
+-commutative99.2%
fma-def99.2%
Simplified99.2%
Taylor expanded in z around 0 99.2%
frac-2neg99.2%
metadata-eval99.2%
*-commutative99.2%
distribute-rgt-neg-out99.2%
add-sqr-sqrt50.2%
pow250.2%
metadata-eval50.2%
distribute-rgt-neg-out50.2%
*-commutative50.2%
frac-2neg50.2%
inv-pow50.2%
sqrt-pow150.2%
metadata-eval50.2%
Applied egg-rr50.2%
pow-pow99.2%
metadata-eval99.2%
inv-pow99.2%
*-commutative99.2%
associate-/r*99.7%
Applied egg-rr99.7%
if 2.00000000000000014e-17 < (*.f64 z z) Initial program 74.1%
associate-/r*74.1%
+-commutative74.1%
fma-def74.1%
Simplified74.1%
associate-/r*74.1%
*-un-lft-identity74.1%
fma-udef74.1%
+-commutative74.1%
*-commutative74.1%
times-frac77.4%
+-commutative77.4%
fma-udef77.4%
associate-/l/77.5%
Applied egg-rr77.5%
associate-*l/77.4%
frac-2neg77.4%
metadata-eval77.4%
*-commutative77.4%
distribute-rgt-neg-out77.4%
fma-udef77.4%
+-commutative77.4%
add-sqr-sqrt77.4%
hypot-1-def77.4%
hypot-1-def77.4%
times-frac88.7%
metadata-eval88.7%
distribute-rgt-neg-out88.7%
*-commutative88.7%
frac-2neg88.7%
associate-/r*88.8%
associate-/r*95.8%
times-frac87.8%
*-un-lft-identity87.8%
associate-/l/95.8%
Applied egg-rr95.4%
Taylor expanded in z around inf 79.3%
unpow279.3%
*-commutative79.3%
associate-*r*87.3%
*-commutative87.3%
Simplified87.3%
/-rgt-identity87.3%
*-commutative87.3%
associate-*l*93.5%
*-commutative93.5%
Applied egg-rr93.5%
Final simplification96.3%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (if (<= z 2.5e-5) (/ (/ 1.0 x) y) (/ 1.0 (* x (* z (* y z))))))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
double tmp;
if (z <= 2.5e-5) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (x * (z * (y * z)));
}
return tmp;
}
NOTE: z should be positive before calling this function
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 <= 2.5d-5) then
tmp = (1.0d0 / x) / y
else
tmp = 1.0d0 / (x * (z * (y * z)))
end if
code = tmp
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
double tmp;
if (z <= 2.5e-5) {
tmp = (1.0 / x) / y;
} else {
tmp = 1.0 / (x * (z * (y * z)));
}
return tmp;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): tmp = 0 if z <= 2.5e-5: tmp = (1.0 / x) / y else: tmp = 1.0 / (x * (z * (y * z))) return tmp
z = abs(z) x, y = sort([x, y]) function code(x, y, z) tmp = 0.0 if (z <= 2.5e-5) tmp = Float64(Float64(1.0 / x) / y); else tmp = Float64(1.0 / Float64(x * Float64(z * Float64(y * z)))); end return tmp end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y, z)
tmp = 0.0;
if (z <= 2.5e-5)
tmp = (1.0 / x) / y;
else
tmp = 1.0 / (x * (z * (y * z)));
end
tmp_2 = tmp;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := If[LessEqual[z, 2.5e-5], N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision], N[(1.0 / N[(x * N[(z * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;z \leq 2.5 \cdot 10^{-5}:\\
\;\;\;\;\frac{\frac{1}{x}}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{x \cdot \left(z \cdot \left(y \cdot z\right)\right)}\\
\end{array}
\end{array}
if z < 2.50000000000000012e-5Initial program 89.9%
associate-/r*89.6%
+-commutative89.6%
fma-def89.6%
Simplified89.6%
Taylor expanded in z around 0 70.1%
frac-2neg70.1%
metadata-eval70.1%
*-commutative70.1%
distribute-rgt-neg-out70.1%
add-sqr-sqrt37.6%
pow237.6%
metadata-eval37.6%
distribute-rgt-neg-out37.6%
*-commutative37.6%
frac-2neg37.6%
inv-pow37.6%
sqrt-pow137.6%
metadata-eval37.6%
Applied egg-rr37.6%
pow-pow70.1%
metadata-eval70.1%
inv-pow70.1%
*-commutative70.1%
associate-/r*70.4%
Applied egg-rr70.4%
if 2.50000000000000012e-5 < z Initial program 75.2%
associate-/r*75.2%
+-commutative75.2%
fma-def75.2%
Simplified75.2%
Taylor expanded in z around inf 75.2%
unpow275.2%
associate-*r*89.1%
*-commutative89.1%
Simplified89.1%
Final simplification75.8%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (/ 1.0 (* y x)))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
return 1.0 / (y * x);
}
NOTE: z should be positive before calling this function
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
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
return 1.0 / (y * x);
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): return 1.0 / (y * x)
z = abs(z) x, y = sort([x, y]) function code(x, y, z) return Float64(1.0 / Float64(y * x)) end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = 1.0 / (y * x);
end
NOTE: z should be positive before calling this function 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}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{1}{y \cdot x}
\end{array}
Initial program 85.7%
associate-/r*85.5%
+-commutative85.5%
fma-def85.5%
Simplified85.5%
Taylor expanded in z around 0 54.6%
Final simplification54.6%
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y z) :precision binary64 (/ (/ 1.0 x) y))
z = abs(z);
assert(x < y);
double code(double x, double y, double z) {
return (1.0 / x) / y;
}
NOTE: z should be positive before calling this function
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 / x) / y
end function
z = Math.abs(z);
assert x < y;
public static double code(double x, double y, double z) {
return (1.0 / x) / y;
}
z = abs(z) [x, y] = sort([x, y]) def code(x, y, z): return (1.0 / x) / y
z = abs(z) x, y = sort([x, y]) function code(x, y, z) return Float64(Float64(1.0 / x) / y) end
z = abs(z)
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y, z)
tmp = (1.0 / x) / y;
end
NOTE: z should be positive before calling this function NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_, z_] := N[(N[(1.0 / x), $MachinePrecision] / y), $MachinePrecision]
\begin{array}{l}
z = |z|\\
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{1}{x}}{y}
\end{array}
Initial program 85.7%
associate-/r*85.5%
+-commutative85.5%
fma-def85.5%
Simplified85.5%
Taylor expanded in z around 0 54.6%
frac-2neg54.6%
metadata-eval54.6%
*-commutative54.6%
distribute-rgt-neg-out54.6%
add-sqr-sqrt30.8%
pow230.8%
metadata-eval30.8%
distribute-rgt-neg-out30.8%
*-commutative30.8%
frac-2neg30.8%
inv-pow30.8%
sqrt-pow130.8%
metadata-eval30.8%
Applied egg-rr30.8%
pow-pow54.6%
metadata-eval54.6%
inv-pow54.6%
*-commutative54.6%
associate-/r*54.8%
Applied egg-rr54.8%
Final simplification54.8%
(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 2023230
(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)))))