
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z): return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z) return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0))) end
function tmp = code(x, y, z) tmp = (x * y) / ((z * z) * (z + 1.0)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 16 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y z) :precision binary64 (/ (* x y) (* (* z z) (+ z 1.0))))
double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x * y) / ((z * z) * (z + 1.0d0))
end function
public static double code(double x, double y, double z) {
return (x * y) / ((z * z) * (z + 1.0));
}
def code(x, y, z): return (x * y) / ((z * z) * (z + 1.0))
function code(x, y, z) return Float64(Float64(x * y) / Float64(Float64(z * z) * Float64(z + 1.0))) end
function tmp = code(x, y, z) tmp = (x * y) / ((z * z) * (z + 1.0)); end
code[x_, y_, z_] := N[(N[(x * y), $MachinePrecision] / N[(N[(z * z), $MachinePrecision] * N[(z + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(z \cdot z\right) \cdot \left(z + 1\right)}
\end{array}
(FPCore (x y z) :precision binary64 (/ 1.0 (/ (+ 1.0 z) (* (/ x z) (/ y z)))))
double code(double x, double y, double z) {
return 1.0 / ((1.0 + z) / ((x / z) * (y / z)));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = 1.0d0 / ((1.0d0 + z) / ((x / z) * (y / z)))
end function
public static double code(double x, double y, double z) {
return 1.0 / ((1.0 + z) / ((x / z) * (y / z)));
}
def code(x, y, z): return 1.0 / ((1.0 + z) / ((x / z) * (y / z)))
function code(x, y, z) return Float64(1.0 / Float64(Float64(1.0 + z) / Float64(Float64(x / z) * Float64(y / z)))) end
function tmp = code(x, y, z) tmp = 1.0 / ((1.0 + z) / ((x / z) * (y / z))); end
code[x_, y_, z_] := N[(1.0 / N[(N[(1.0 + z), $MachinePrecision] / N[(N[(x / z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{\frac{1 + z}{\frac{x}{z} \cdot \frac{y}{z}}}
\end{array}
Initial program 81.7%
associate-*l*81.7%
times-frac94.2%
distribute-lft-in94.2%
fma-def94.2%
*-rgt-identity94.2%
Simplified94.2%
fma-udef94.2%
*-rgt-identity94.2%
distribute-lft-in94.2%
times-frac81.7%
associate-*l*81.7%
associate-/r*82.5%
clear-num82.4%
associate-*l/87.1%
associate-*l/82.4%
times-frac96.4%
Applied egg-rr96.4%
Final simplification96.4%
(FPCore (x y z) :precision binary64 (if (or (<= z -4e-19) (not (<= z 1.65e-245))) (* (/ (/ y z) z) (/ x (+ 1.0 z))) (/ (* (/ x z) y) z)))
double code(double x, double y, double z) {
double tmp;
if ((z <= -4e-19) || !(z <= 1.65e-245)) {
tmp = ((y / z) / z) * (x / (1.0 + z));
} else {
tmp = ((x / z) * y) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-4d-19)) .or. (.not. (z <= 1.65d-245))) then
tmp = ((y / z) / z) * (x / (1.0d0 + z))
else
tmp = ((x / z) * y) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -4e-19) || !(z <= 1.65e-245)) {
tmp = ((y / z) / z) * (x / (1.0 + z));
} else {
tmp = ((x / z) * y) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -4e-19) or not (z <= 1.65e-245): tmp = ((y / z) / z) * (x / (1.0 + z)) else: tmp = ((x / z) * y) / z return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -4e-19) || !(z <= 1.65e-245)) tmp = Float64(Float64(Float64(y / z) / z) * Float64(x / Float64(1.0 + z))); else tmp = Float64(Float64(Float64(x / z) * y) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -4e-19) || ~((z <= 1.65e-245))) tmp = ((y / z) / z) * (x / (1.0 + z)); else tmp = ((x / z) * y) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -4e-19], N[Not[LessEqual[z, 1.65e-245]], $MachinePrecision]], N[(N[(N[(y / z), $MachinePrecision] / z), $MachinePrecision] * N[(x / N[(1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-19} \lor \neg \left(z \leq 1.65 \cdot 10^{-245}\right):\\
\;\;\;\;\frac{\frac{y}{z}}{z} \cdot \frac{x}{1 + z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{z} \cdot y}{z}\\
\end{array}
\end{array}
if z < -3.9999999999999999e-19 or 1.65e-245 < z Initial program 82.6%
associate-*l*82.6%
times-frac94.3%
distribute-lft-in94.3%
fma-def94.3%
*-rgt-identity94.3%
Simplified94.3%
fma-udef94.3%
*-rgt-identity94.3%
distribute-lft-in94.3%
times-frac82.6%
associate-*l*82.6%
associate-/r*83.8%
clear-num83.6%
associate-*l/89.3%
associate-*l/83.6%
times-frac97.6%
Applied egg-rr97.6%
Taylor expanded in x around 0 82.6%
unpow282.6%
times-frac90.0%
associate-/r*95.9%
+-commutative95.9%
Simplified95.9%
if -3.9999999999999999e-19 < z < 1.65e-245Initial program 79.7%
associate-*l*79.7%
times-frac94.0%
distribute-lft-in94.0%
fma-def94.0%
*-rgt-identity94.0%
Simplified94.0%
Taylor expanded in z around 0 79.7%
unpow279.7%
associate-/l*83.2%
Simplified83.2%
associate-/r/80.1%
Applied egg-rr80.1%
*-commutative80.1%
associate-*r/79.7%
associate-/r*86.8%
*-commutative86.8%
associate-*r/94.7%
Applied egg-rr94.7%
Final simplification95.5%
(FPCore (x y z)
:precision binary64
(if (<= z -38000.0)
(/ (/ y z) (* z (/ z x)))
(if (<= z 8.5e-37)
(* (/ x z) (- (/ y z) y))
(* (/ y (+ 1.0 z)) (/ x (* z z))))))
double code(double x, double y, double z) {
double tmp;
if (z <= -38000.0) {
tmp = (y / z) / (z * (z / x));
} else if (z <= 8.5e-37) {
tmp = (x / z) * ((y / z) - y);
} else {
tmp = (y / (1.0 + z)) * (x / (z * z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-38000.0d0)) then
tmp = (y / z) / (z * (z / x))
else if (z <= 8.5d-37) then
tmp = (x / z) * ((y / z) - y)
else
tmp = (y / (1.0d0 + z)) * (x / (z * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -38000.0) {
tmp = (y / z) / (z * (z / x));
} else if (z <= 8.5e-37) {
tmp = (x / z) * ((y / z) - y);
} else {
tmp = (y / (1.0 + z)) * (x / (z * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -38000.0: tmp = (y / z) / (z * (z / x)) elif z <= 8.5e-37: tmp = (x / z) * ((y / z) - y) else: tmp = (y / (1.0 + z)) * (x / (z * z)) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -38000.0) tmp = Float64(Float64(y / z) / Float64(z * Float64(z / x))); elseif (z <= 8.5e-37) tmp = Float64(Float64(x / z) * Float64(Float64(y / z) - y)); else tmp = Float64(Float64(y / Float64(1.0 + z)) * Float64(x / Float64(z * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -38000.0) tmp = (y / z) / (z * (z / x)); elseif (z <= 8.5e-37) tmp = (x / z) * ((y / z) - y); else tmp = (y / (1.0 + z)) * (x / (z * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -38000.0], N[(N[(y / z), $MachinePrecision] / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 8.5e-37], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] * N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000:\\
\;\;\;\;\frac{\frac{y}{z}}{z \cdot \frac{z}{x}}\\
\mathbf{elif}\;z \leq 8.5 \cdot 10^{-37}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{z} - y\right)\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{1 + z} \cdot \frac{x}{z \cdot z}\\
\end{array}
\end{array}
if z < -38000Initial program 84.3%
/-rgt-identity84.3%
associate-/l*84.3%
associate-/l/83.0%
associate-*l*88.1%
associate-*r/88.2%
*-rgt-identity88.2%
associate-*l*88.1%
associate-*r/88.1%
distribute-lft-in88.1%
fma-def88.1%
*-rgt-identity88.1%
Simplified88.1%
Taylor expanded in z around inf 87.3%
unpow287.3%
Simplified87.3%
*-un-lft-identity87.3%
*-commutative87.3%
times-frac88.7%
clear-num89.1%
Applied egg-rr89.1%
*-commutative89.1%
clear-num87.7%
associate-/r*92.6%
frac-times95.4%
*-un-lft-identity95.4%
Applied egg-rr95.4%
if -38000 < z < 8.5000000000000007e-37Initial program 78.3%
associate-*l*78.3%
times-frac95.9%
distribute-lft-in95.9%
fma-def95.9%
*-rgt-identity95.9%
Simplified95.9%
Taylor expanded in z around 0 95.3%
neg-mul-195.3%
+-commutative95.3%
unsub-neg95.3%
Simplified95.3%
if 8.5000000000000007e-37 < z Initial program 85.1%
times-frac95.0%
Simplified95.0%
Final simplification95.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -38000.0) (not (<= z 0.75))) (* (/ x z) (/ y (* z z))) (* (/ x z) (- (/ y z) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (x / z) * (y / (z * z));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-38000.0d0)) .or. (.not. (z <= 0.75d0))) then
tmp = (x / z) * (y / (z * z))
else
tmp = (x / z) * ((y / z) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (x / z) * (y / (z * z));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -38000.0) or not (z <= 0.75): tmp = (x / z) * (y / (z * z)) else: tmp = (x / z) * ((y / z) - y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -38000.0) || !(z <= 0.75)) tmp = Float64(Float64(x / z) * Float64(y / Float64(z * z))); else tmp = Float64(Float64(x / z) * Float64(Float64(y / z) - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -38000.0) || ~((z <= 0.75))) tmp = (x / z) * (y / (z * z)); else tmp = (x / z) * ((y / z) - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -38000.0], N[Not[LessEqual[z, 0.75]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000 \lor \neg \left(z \leq 0.75\right):\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{z} - y\right)\\
\end{array}
\end{array}
if z < -38000 or 0.75 < z Initial program 83.7%
associate-*l*83.7%
times-frac92.3%
distribute-lft-in92.3%
fma-def92.3%
*-rgt-identity92.3%
Simplified92.3%
Taylor expanded in z around inf 90.9%
unpow290.9%
Simplified90.9%
if -38000 < z < 0.75Initial program 79.7%
associate-*l*79.7%
times-frac96.1%
distribute-lft-in96.1%
fma-def96.1%
*-rgt-identity96.1%
Simplified96.1%
Taylor expanded in z around 0 95.0%
neg-mul-195.0%
+-commutative95.0%
unsub-neg95.0%
Simplified95.0%
Final simplification93.0%
(FPCore (x y z) :precision binary64 (if (or (<= z -38000.0) (not (<= z 0.78))) (* (/ y z) (/ x (* z z))) (* (/ x z) (- (/ y z) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.78)) {
tmp = (y / z) * (x / (z * z));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-38000.0d0)) .or. (.not. (z <= 0.78d0))) then
tmp = (y / z) * (x / (z * z))
else
tmp = (x / z) * ((y / z) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.78)) {
tmp = (y / z) * (x / (z * z));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -38000.0) or not (z <= 0.78): tmp = (y / z) * (x / (z * z)) else: tmp = (x / z) * ((y / z) - y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -38000.0) || !(z <= 0.78)) tmp = Float64(Float64(y / z) * Float64(x / Float64(z * z))); else tmp = Float64(Float64(x / z) * Float64(Float64(y / z) - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -38000.0) || ~((z <= 0.78))) tmp = (y / z) * (x / (z * z)); else tmp = (x / z) * ((y / z) - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -38000.0], N[Not[LessEqual[z, 0.78]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] * N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000 \lor \neg \left(z \leq 0.78\right):\\
\;\;\;\;\frac{y}{z} \cdot \frac{x}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{z} - y\right)\\
\end{array}
\end{array}
if z < -38000 or 0.78000000000000003 < z Initial program 83.7%
/-rgt-identity83.7%
associate-/l*83.7%
associate-/l/84.1%
associate-*l*90.1%
associate-*r/90.2%
*-rgt-identity90.2%
associate-*l*92.4%
associate-*r/90.2%
distribute-lft-in90.2%
fma-def90.2%
*-rgt-identity90.2%
Simplified90.2%
Taylor expanded in z around inf 88.8%
unpow288.8%
Simplified88.8%
associate-/r*90.7%
associate-/l*95.1%
associate-/r/95.3%
associate-/r*91.7%
Applied egg-rr91.7%
if -38000 < z < 0.78000000000000003Initial program 79.7%
associate-*l*79.7%
times-frac96.1%
distribute-lft-in96.1%
fma-def96.1%
*-rgt-identity96.1%
Simplified96.1%
Taylor expanded in z around 0 95.0%
neg-mul-195.0%
+-commutative95.0%
unsub-neg95.0%
Simplified95.0%
Final simplification93.3%
(FPCore (x y z) :precision binary64 (if (or (<= z -38000.0) (not (<= z 0.75))) (* (/ x z) (/ (/ y z) z)) (* (/ x z) (- (/ y z) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (x / z) * ((y / z) / z);
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-38000.0d0)) .or. (.not. (z <= 0.75d0))) then
tmp = (x / z) * ((y / z) / z)
else
tmp = (x / z) * ((y / z) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (x / z) * ((y / z) / z);
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -38000.0) or not (z <= 0.75): tmp = (x / z) * ((y / z) / z) else: tmp = (x / z) * ((y / z) - y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -38000.0) || !(z <= 0.75)) tmp = Float64(Float64(x / z) * Float64(Float64(y / z) / z)); else tmp = Float64(Float64(x / z) * Float64(Float64(y / z) - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -38000.0) || ~((z <= 0.75))) tmp = (x / z) * ((y / z) / z); else tmp = (x / z) * ((y / z) - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -38000.0], N[Not[LessEqual[z, 0.75]], $MachinePrecision]], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000 \lor \neg \left(z \leq 0.75\right):\\
\;\;\;\;\frac{x}{z} \cdot \frac{\frac{y}{z}}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{z} - y\right)\\
\end{array}
\end{array}
if z < -38000 or 0.75 < z Initial program 83.7%
associate-*l*83.7%
times-frac92.3%
distribute-lft-in92.3%
fma-def92.3%
*-rgt-identity92.3%
Simplified92.3%
fma-udef92.3%
*-rgt-identity92.3%
distribute-lft-in92.3%
times-frac83.7%
associate-*l*83.7%
associate-/r*85.4%
clear-num85.1%
associate-*l/90.7%
associate-*l/85.1%
times-frac96.8%
Applied egg-rr96.8%
Taylor expanded in x around 0 83.7%
unpow283.7%
times-frac92.3%
associate-/r*96.7%
+-commutative96.7%
Simplified96.7%
Taylor expanded in z around inf 95.3%
if -38000 < z < 0.75Initial program 79.7%
associate-*l*79.7%
times-frac96.1%
distribute-lft-in96.1%
fma-def96.1%
*-rgt-identity96.1%
Simplified96.1%
Taylor expanded in z around 0 95.0%
neg-mul-195.0%
+-commutative95.0%
unsub-neg95.0%
Simplified95.0%
Final simplification95.2%
(FPCore (x y z) :precision binary64 (if (or (<= z -38000.0) (not (<= z 0.75))) (/ (/ y z) (* z (/ z x))) (* (/ x z) (- (/ y z) y))))
double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (y / z) / (z * (z / x));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if ((z <= (-38000.0d0)) .or. (.not. (z <= 0.75d0))) then
tmp = (y / z) / (z * (z / x))
else
tmp = (x / z) * ((y / z) - y)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if ((z <= -38000.0) || !(z <= 0.75)) {
tmp = (y / z) / (z * (z / x));
} else {
tmp = (x / z) * ((y / z) - y);
}
return tmp;
}
def code(x, y, z): tmp = 0 if (z <= -38000.0) or not (z <= 0.75): tmp = (y / z) / (z * (z / x)) else: tmp = (x / z) * ((y / z) - y) return tmp
function code(x, y, z) tmp = 0.0 if ((z <= -38000.0) || !(z <= 0.75)) tmp = Float64(Float64(y / z) / Float64(z * Float64(z / x))); else tmp = Float64(Float64(x / z) * Float64(Float64(y / z) - y)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if ((z <= -38000.0) || ~((z <= 0.75))) tmp = (y / z) / (z * (z / x)); else tmp = (x / z) * ((y / z) - y); end tmp_2 = tmp; end
code[x_, y_, z_] := If[Or[LessEqual[z, -38000.0], N[Not[LessEqual[z, 0.75]], $MachinePrecision]], N[(N[(y / z), $MachinePrecision] / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(N[(y / z), $MachinePrecision] - y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -38000 \lor \neg \left(z \leq 0.75\right):\\
\;\;\;\;\frac{\frac{y}{z}}{z \cdot \frac{z}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \left(\frac{y}{z} - y\right)\\
\end{array}
\end{array}
if z < -38000 or 0.75 < z Initial program 83.7%
/-rgt-identity83.7%
associate-/l*83.7%
associate-/l/84.1%
associate-*l*90.1%
associate-*r/90.2%
*-rgt-identity90.2%
associate-*l*92.4%
associate-*r/90.2%
distribute-lft-in90.2%
fma-def90.2%
*-rgt-identity90.2%
Simplified90.2%
Taylor expanded in z around inf 88.8%
unpow288.8%
Simplified88.8%
*-un-lft-identity88.8%
*-commutative88.8%
times-frac90.7%
clear-num90.9%
Applied egg-rr90.9%
*-commutative90.9%
clear-num89.7%
associate-/r*94.1%
frac-times95.3%
*-un-lft-identity95.3%
Applied egg-rr95.3%
if -38000 < z < 0.75Initial program 79.7%
associate-*l*79.7%
times-frac96.1%
distribute-lft-in96.1%
fma-def96.1%
*-rgt-identity96.1%
Simplified96.1%
Taylor expanded in z around 0 95.0%
neg-mul-195.0%
+-commutative95.0%
unsub-neg95.0%
Simplified95.0%
Final simplification95.2%
(FPCore (x y z) :precision binary64 (/ (* (/ x z) (/ y (+ 1.0 z))) z))
double code(double x, double y, double z) {
return ((x / z) * (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 = ((x / z) * (y / (1.0d0 + z))) / z
end function
public static double code(double x, double y, double z) {
return ((x / z) * (y / (1.0 + z))) / z;
}
def code(x, y, z): return ((x / z) * (y / (1.0 + z))) / z
function code(x, y, z) return Float64(Float64(Float64(x / z) * Float64(y / Float64(1.0 + z))) / z) end
function tmp = code(x, y, z) tmp = ((x / z) * (y / (1.0 + z))) / z; end
code[x_, y_, z_] := N[(N[(N[(x / z), $MachinePrecision] * N[(y / N[(1.0 + z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{z} \cdot \frac{y}{1 + z}}{z}
\end{array}
Initial program 81.7%
associate-*l*81.7%
times-frac94.2%
distribute-lft-in94.2%
fma-def94.2%
*-rgt-identity94.2%
Simplified94.2%
*-commutative94.2%
associate-*l/92.7%
fma-udef92.7%
distribute-lft1-in92.7%
frac-times93.1%
associate-*r/95.9%
Applied egg-rr95.9%
Final simplification95.9%
(FPCore (x y z) :precision binary64 (/ (/ x z) (* z (/ (+ 1.0 z) y))))
double code(double x, double y, double z) {
return (x / z) / (z * ((1.0 + z) / y));
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x / z) / (z * ((1.0d0 + z) / y))
end function
public static double code(double x, double y, double z) {
return (x / z) / (z * ((1.0 + z) / y));
}
def code(x, y, z): return (x / z) / (z * ((1.0 + z) / y))
function code(x, y, z) return Float64(Float64(x / z) / Float64(z * Float64(Float64(1.0 + z) / y))) end
function tmp = code(x, y, z) tmp = (x / z) / (z * ((1.0 + z) / y)); end
code[x_, y_, z_] := N[(N[(x / z), $MachinePrecision] / N[(z * N[(N[(1.0 + z), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{x}{z}}{z \cdot \frac{1 + z}{y}}
\end{array}
Initial program 81.7%
associate-*l*81.7%
times-frac94.2%
distribute-lft-in94.2%
fma-def94.2%
*-rgt-identity94.2%
Simplified94.2%
*-commutative94.2%
associate-*l/92.7%
fma-udef92.7%
distribute-lft1-in92.7%
frac-times93.1%
clear-num92.8%
frac-times96.2%
*-un-lft-identity96.2%
Applied egg-rr96.2%
Final simplification96.2%
(FPCore (x y z) :precision binary64 (if (<= y 5e-11) (* (/ x z) (/ y z)) (* y (/ x (* z z)))))
double code(double x, double y, double z) {
double tmp;
if (y <= 5e-11) {
tmp = (x / z) * (y / z);
} else {
tmp = y * (x / (z * z));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 5d-11) then
tmp = (x / z) * (y / z)
else
tmp = y * (x / (z * z))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 5e-11) {
tmp = (x / z) * (y / z);
} else {
tmp = y * (x / (z * z));
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 5e-11: tmp = (x / z) * (y / z) else: tmp = y * (x / (z * z)) return tmp
function code(x, y, z) tmp = 0.0 if (y <= 5e-11) tmp = Float64(Float64(x / z) * Float64(y / z)); else tmp = Float64(y * Float64(x / Float64(z * z))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 5e-11) tmp = (x / z) * (y / z); else tmp = y * (x / (z * z)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 5e-11], N[(N[(x / z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(y * N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{-11}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;y \cdot \frac{x}{z \cdot z}\\
\end{array}
\end{array}
if y < 5.00000000000000018e-11Initial program 81.2%
associate-*l*81.2%
times-frac94.8%
distribute-lft-in94.8%
fma-def94.8%
*-rgt-identity94.8%
Simplified94.8%
Taylor expanded in z around 0 63.6%
unpow263.6%
associate-/l/65.1%
associate-*r/72.2%
associate-*l/75.0%
Simplified75.0%
if 5.00000000000000018e-11 < y Initial program 83.2%
associate-*l*83.2%
times-frac92.4%
distribute-lft-in92.4%
fma-def92.4%
*-rgt-identity92.4%
Simplified92.4%
Taylor expanded in z around 0 69.2%
unpow269.2%
associate-/l*75.5%
Simplified75.5%
clear-num75.5%
associate-/r/75.5%
clear-num75.5%
Applied egg-rr75.5%
Final simplification75.2%
(FPCore (x y z) :precision binary64 (if (<= x -2e+33) (* x (/ y (* z z))) (* (/ x z) (/ y z))))
double code(double x, double y, double z) {
double tmp;
if (x <= -2e+33) {
tmp = x * (y / (z * z));
} else {
tmp = (x / z) * (y / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-2d+33)) then
tmp = x * (y / (z * z))
else
tmp = (x / z) * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -2e+33) {
tmp = x * (y / (z * z));
} else {
tmp = (x / z) * (y / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -2e+33: tmp = x * (y / (z * z)) else: tmp = (x / z) * (y / z) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -2e+33) tmp = Float64(x * Float64(y / Float64(z * z))); else tmp = Float64(Float64(x / z) * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -2e+33) tmp = x * (y / (z * z)); else tmp = (x / z) * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -2e+33], N[(x * N[(y / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2 \cdot 10^{+33}:\\
\;\;\;\;x \cdot \frac{y}{z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot \frac{y}{z}\\
\end{array}
\end{array}
if x < -1.9999999999999999e33Initial program 87.1%
associate-*l*87.1%
times-frac91.0%
distribute-lft-in91.0%
fma-def91.0%
*-rgt-identity91.0%
Simplified91.0%
Taylor expanded in z around 0 71.7%
unpow271.7%
associate-/l*73.6%
Simplified73.6%
associate-/r/77.9%
Applied egg-rr77.9%
if -1.9999999999999999e33 < x Initial program 80.0%
associate-*l*80.0%
times-frac95.2%
distribute-lft-in95.2%
fma-def95.2%
*-rgt-identity95.2%
Simplified95.2%
Taylor expanded in z around 0 62.9%
unpow262.9%
associate-/l/64.5%
associate-*r/72.7%
associate-*l/74.5%
Simplified74.5%
Final simplification75.3%
(FPCore (x y z) :precision binary64 (if (<= x -4.5e-76) (/ x (* z (/ z y))) (/ y (* z (/ z x)))))
double code(double x, double y, double z) {
double tmp;
if (x <= -4.5e-76) {
tmp = x / (z * (z / y));
} else {
tmp = y / (z * (z / x));
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (x <= (-4.5d-76)) then
tmp = x / (z * (z / y))
else
tmp = y / (z * (z / x))
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (x <= -4.5e-76) {
tmp = x / (z * (z / y));
} else {
tmp = y / (z * (z / x));
}
return tmp;
}
def code(x, y, z): tmp = 0 if x <= -4.5e-76: tmp = x / (z * (z / y)) else: tmp = y / (z * (z / x)) return tmp
function code(x, y, z) tmp = 0.0 if (x <= -4.5e-76) tmp = Float64(x / Float64(z * Float64(z / y))); else tmp = Float64(y / Float64(z * Float64(z / x))); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (x <= -4.5e-76) tmp = x / (z * (z / y)); else tmp = y / (z * (z / x)); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[x, -4.5e-76], N[(x / N[(z * N[(z / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(z * N[(z / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.5 \cdot 10^{-76}:\\
\;\;\;\;\frac{x}{z \cdot \frac{z}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{z \cdot \frac{z}{x}}\\
\end{array}
\end{array}
if x < -4.5000000000000001e-76Initial program 85.4%
/-rgt-identity85.4%
associate-/l*85.3%
associate-/l/85.5%
associate-*l*87.7%
associate-*r/87.7%
*-rgt-identity87.7%
associate-*l*93.2%
associate-*r/92.2%
distribute-lft-in92.2%
fma-def92.2%
*-rgt-identity92.2%
Simplified92.2%
Taylor expanded in z around 0 74.6%
if -4.5000000000000001e-76 < x Initial program 79.8%
associate-*l*79.8%
times-frac94.5%
distribute-lft-in94.5%
fma-def94.5%
*-rgt-identity94.5%
Simplified94.5%
Taylor expanded in z around 0 63.9%
unpow263.9%
associate-/l*70.7%
Simplified70.7%
associate-/l*74.0%
associate-/r/74.0%
Applied egg-rr74.0%
Final simplification74.2%
(FPCore (x y z) :precision binary64 (if (<= z -4e-311) (* (/ x z) (- y)) (* x (/ y z))))
double code(double x, double y, double z) {
double tmp;
if (z <= -4e-311) {
tmp = (x / z) * -y;
} else {
tmp = x * (y / z);
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z <= (-4d-311)) then
tmp = (x / z) * -y
else
tmp = x * (y / z)
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z <= -4e-311) {
tmp = (x / z) * -y;
} else {
tmp = x * (y / z);
}
return tmp;
}
def code(x, y, z): tmp = 0 if z <= -4e-311: tmp = (x / z) * -y else: tmp = x * (y / z) return tmp
function code(x, y, z) tmp = 0.0 if (z <= -4e-311) tmp = Float64(Float64(x / z) * Float64(-y)); else tmp = Float64(x * Float64(y / z)); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z <= -4e-311) tmp = (x / z) * -y; else tmp = x * (y / z); end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[z, -4e-311], N[(N[(x / z), $MachinePrecision] * (-y)), $MachinePrecision], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z \leq -4 \cdot 10^{-311}:\\
\;\;\;\;\frac{x}{z} \cdot \left(-y\right)\\
\mathbf{else}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\end{array}
\end{array}
if z < -3.99999999999979e-311Initial program 82.4%
associate-*l*82.4%
times-frac91.3%
distribute-lft-in91.3%
fma-def91.3%
*-rgt-identity91.3%
Simplified91.3%
Taylor expanded in z around 0 61.4%
neg-mul-161.4%
+-commutative61.4%
unsub-neg61.4%
Simplified61.4%
Taylor expanded in z around inf 34.4%
neg-mul-134.4%
Simplified34.4%
if -3.99999999999979e-311 < z Initial program 81.1%
associate-*l*81.1%
times-frac96.9%
distribute-lft-in96.9%
fma-def96.9%
*-rgt-identity96.9%
Simplified96.9%
Taylor expanded in z around 0 66.5%
neg-mul-166.5%
+-commutative66.5%
unsub-neg66.5%
Simplified66.5%
Taylor expanded in z around inf 20.0%
neg-mul-120.0%
Simplified20.0%
associate-*l/15.8%
clear-num16.7%
*-commutative16.7%
add-sqr-sqrt8.5%
sqrt-unprod31.4%
sqr-neg31.4%
sqrt-unprod19.8%
add-sqr-sqrt35.9%
Applied egg-rr35.9%
clear-num35.0%
associate-/l*41.4%
associate-/r/38.3%
Applied egg-rr38.3%
Final simplification36.4%
(FPCore (x y z) :precision binary64 (if (<= y 5e+166) (* x (/ y z)) (* (/ x z) y)))
double code(double x, double y, double z) {
double tmp;
if (y <= 5e+166) {
tmp = x * (y / z);
} else {
tmp = (x / z) * y;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (y <= 5d+166) then
tmp = x * (y / z)
else
tmp = (x / z) * y
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (y <= 5e+166) {
tmp = x * (y / z);
} else {
tmp = (x / z) * y;
}
return tmp;
}
def code(x, y, z): tmp = 0 if y <= 5e+166: tmp = x * (y / z) else: tmp = (x / z) * y return tmp
function code(x, y, z) tmp = 0.0 if (y <= 5e+166) tmp = Float64(x * Float64(y / z)); else tmp = Float64(Float64(x / z) * y); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (y <= 5e+166) tmp = x * (y / z); else tmp = (x / z) * y; end tmp_2 = tmp; end
code[x_, y_, z_] := If[LessEqual[y, 5e+166], N[(x * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5 \cdot 10^{+166}:\\
\;\;\;\;x \cdot \frac{y}{z}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{z} \cdot y\\
\end{array}
\end{array}
if y < 5.0000000000000002e166Initial program 82.0%
associate-*l*82.0%
times-frac95.6%
distribute-lft-in95.6%
fma-def95.6%
*-rgt-identity95.6%
Simplified95.6%
Taylor expanded in z around 0 64.6%
neg-mul-164.6%
+-commutative64.6%
unsub-neg64.6%
Simplified64.6%
Taylor expanded in z around inf 27.7%
neg-mul-127.7%
Simplified27.7%
associate-*l/24.0%
clear-num24.5%
*-commutative24.5%
add-sqr-sqrt12.9%
sqrt-unprod28.8%
sqr-neg28.8%
sqrt-unprod12.8%
add-sqr-sqrt25.6%
Applied egg-rr25.6%
clear-num25.1%
associate-/l*28.4%
associate-/r/27.8%
Applied egg-rr27.8%
if 5.0000000000000002e166 < y Initial program 79.3%
associate-*l*79.3%
times-frac83.3%
distribute-lft-in83.3%
fma-def83.3%
*-rgt-identity83.3%
Simplified83.3%
Taylor expanded in z around 0 59.4%
neg-mul-159.4%
+-commutative59.4%
unsub-neg59.4%
Simplified59.4%
Taylor expanded in z around inf 19.9%
neg-mul-119.9%
Simplified19.9%
expm1-log1p-u8.3%
expm1-udef8.0%
add-sqr-sqrt0.0%
sqrt-unprod11.2%
sqr-neg11.2%
sqrt-unprod18.8%
add-sqr-sqrt18.8%
*-commutative18.8%
Applied egg-rr18.8%
expm1-def18.9%
expm1-log1p34.1%
Simplified34.1%
Final simplification28.5%
(FPCore (x y z) :precision binary64 (* y (/ x (* z z))))
double code(double x, double y, double z) {
return y * (x / (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 = y * (x / (z * z))
end function
public static double code(double x, double y, double z) {
return y * (x / (z * z));
}
def code(x, y, z): return y * (x / (z * z))
function code(x, y, z) return Float64(y * Float64(x / Float64(z * z))) end
function tmp = code(x, y, z) tmp = y * (x / (z * z)); end
code[x_, y_, z_] := N[(y * N[(x / N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
y \cdot \frac{x}{z \cdot z}
\end{array}
Initial program 81.7%
associate-*l*81.7%
times-frac94.2%
distribute-lft-in94.2%
fma-def94.2%
*-rgt-identity94.2%
Simplified94.2%
Taylor expanded in z around 0 65.0%
unpow265.0%
associate-/l*70.7%
Simplified70.7%
clear-num71.1%
associate-/r/70.4%
clear-num70.4%
Applied egg-rr70.4%
Final simplification70.4%
(FPCore (x y z) :precision binary64 (* (/ x z) y))
double code(double x, double y, double z) {
return (x / z) * y;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
code = (x / z) * y
end function
public static double code(double x, double y, double z) {
return (x / z) * y;
}
def code(x, y, z): return (x / z) * y
function code(x, y, z) return Float64(Float64(x / z) * y) end
function tmp = code(x, y, z) tmp = (x / z) * y; end
code[x_, y_, z_] := N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{z} \cdot y
\end{array}
Initial program 81.7%
associate-*l*81.7%
times-frac94.2%
distribute-lft-in94.2%
fma-def94.2%
*-rgt-identity94.2%
Simplified94.2%
Taylor expanded in z around 0 64.1%
neg-mul-164.1%
+-commutative64.1%
unsub-neg64.1%
Simplified64.1%
Taylor expanded in z around inf 26.9%
neg-mul-126.9%
Simplified26.9%
expm1-log1p-u21.8%
expm1-udef33.4%
add-sqr-sqrt19.1%
sqrt-unprod31.8%
sqr-neg31.8%
sqrt-unprod15.6%
add-sqr-sqrt33.3%
*-commutative33.3%
Applied egg-rr33.3%
expm1-def21.9%
expm1-log1p29.0%
Simplified29.0%
Final simplification29.0%
(FPCore (x y z) :precision binary64 (if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z)))
double code(double x, double y, double z) {
double tmp;
if (z < 249.6182814532307) {
tmp = (y * (x / z)) / (z + (z * z));
} else {
tmp = (((y / z) / (1.0 + z)) * x) / z;
}
return tmp;
}
real(8) function code(x, y, z)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8), intent (in) :: z
real(8) :: tmp
if (z < 249.6182814532307d0) then
tmp = (y * (x / z)) / (z + (z * z))
else
tmp = (((y / z) / (1.0d0 + z)) * x) / z
end if
code = tmp
end function
public static double code(double x, double y, double z) {
double tmp;
if (z < 249.6182814532307) {
tmp = (y * (x / z)) / (z + (z * z));
} else {
tmp = (((y / z) / (1.0 + z)) * x) / z;
}
return tmp;
}
def code(x, y, z): tmp = 0 if z < 249.6182814532307: tmp = (y * (x / z)) / (z + (z * z)) else: tmp = (((y / z) / (1.0 + z)) * x) / z return tmp
function code(x, y, z) tmp = 0.0 if (z < 249.6182814532307) tmp = Float64(Float64(y * Float64(x / z)) / Float64(z + Float64(z * z))); else tmp = Float64(Float64(Float64(Float64(y / z) / Float64(1.0 + z)) * x) / z); end return tmp end
function tmp_2 = code(x, y, z) tmp = 0.0; if (z < 249.6182814532307) tmp = (y * (x / z)) / (z + (z * z)); else tmp = (((y / z) / (1.0 + z)) * x) / z; end tmp_2 = tmp; end
code[x_, y_, z_] := If[Less[z, 249.6182814532307], N[(N[(y * N[(x / z), $MachinePrecision]), $MachinePrecision] / N[(z + N[(z * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(y / z), $MachinePrecision] / N[(1.0 + z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;z < 249.6182814532307:\\
\;\;\;\;\frac{y \cdot \frac{x}{z}}{z + z \cdot z}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{\frac{y}{z}}{1 + z} \cdot x}{z}\\
\end{array}
\end{array}
herbie shell --seed 2023195
(FPCore (x y z)
:name "Statistics.Distribution.Beta:$cvariance from math-functions-0.1.5.2"
:precision binary64
:herbie-target
(if (< z 249.6182814532307) (/ (* y (/ x z)) (+ z (* z z))) (/ (* (/ (/ y z) (+ 1.0 z)) x) z))
(/ (* x y) (* (* z z) (+ z 1.0))))