
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
Sampling outcomes in binary64 precision:
Herbie found 20 alternatives:
| Alternative | Accuracy | Speedup |
|---|
(FPCore (x y) :precision binary64 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
public static double code(double x, double y) {
return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
def code(x, y): return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
function code(x, y) return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) end
function tmp = code(x, y) tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0)); end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\end{array}
(FPCore (x y) :precision binary64 (* (/ y (+ y x)) (/ (/ x (+ y x)) (+ x (+ y 1.0)))))
double code(double x, double y) {
return (y / (y + x)) * ((x / (y + x)) / (x + (y + 1.0)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y / (y + x)) * ((x / (y + x)) / (x + (y + 1.0d0)))
end function
public static double code(double x, double y) {
return (y / (y + x)) * ((x / (y + x)) / (x + (y + 1.0)));
}
def code(x, y): return (y / (y + x)) * ((x / (y + x)) / (x + (y + 1.0)))
function code(x, y) return Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) / Float64(x + Float64(y + 1.0)))) end
function tmp = code(x, y) tmp = (y / (y + x)) * ((x / (y + x)) / (x + (y + 1.0))); end
code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{y + x} \cdot \frac{\frac{x}{y + x}}{x + \left(y + 1\right)}
\end{array}
Initial program 70.1%
+-commutative70.1%
+-commutative70.1%
+-commutative70.1%
*-commutative70.1%
distribute-rgt1-in57.2%
fma-define70.1%
+-commutative70.1%
+-commutative70.1%
cube-unmult70.1%
+-commutative70.1%
Simplified70.1%
*-commutative70.1%
fma-define57.2%
cube-mult57.2%
distribute-rgt1-in70.1%
*-commutative70.1%
associate-*l*70.1%
times-frac95.2%
associate-+r+95.2%
Applied egg-rr95.2%
*-un-lft-identity95.2%
+-commutative95.2%
Applied egg-rr95.2%
*-lft-identity95.2%
associate-/r*99.8%
Simplified99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= y 5.6e-248)
(* t_0 (/ 1.0 (+ x 1.0)))
(if (<= y 1.06e-162)
(* (* x t_0) (/ 1.0 (+ y x)))
(if (<= y 4.1e+49)
(* x (/ y (* (+ x 1.0) (* (+ y x) (+ y x)))))
(/ (/ x (+ x (+ y 1.0))) (+ y x)))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (y <= 5.6e-248) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (y <= 1.06e-162) {
tmp = (x * t_0) * (1.0 / (y + x));
} else if (y <= 4.1e+49) {
tmp = x * (y / ((x + 1.0) * ((y + x) * (y + x))));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (y + x)
if (y <= 5.6d-248) then
tmp = t_0 * (1.0d0 / (x + 1.0d0))
else if (y <= 1.06d-162) then
tmp = (x * t_0) * (1.0d0 / (y + x))
else if (y <= 4.1d+49) then
tmp = x * (y / ((x + 1.0d0) * ((y + x) * (y + x))))
else
tmp = (x / (x + (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (y <= 5.6e-248) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (y <= 1.06e-162) {
tmp = (x * t_0) * (1.0 / (y + x));
} else if (y <= 4.1e+49) {
tmp = x * (y / ((x + 1.0) * ((y + x) * (y + x))));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if y <= 5.6e-248: tmp = t_0 * (1.0 / (x + 1.0)) elif y <= 1.06e-162: tmp = (x * t_0) * (1.0 / (y + x)) elif y <= 4.1e+49: tmp = x * (y / ((x + 1.0) * ((y + x) * (y + x)))) else: tmp = (x / (x + (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (y <= 5.6e-248) tmp = Float64(t_0 * Float64(1.0 / Float64(x + 1.0))); elseif (y <= 1.06e-162) tmp = Float64(Float64(x * t_0) * Float64(1.0 / Float64(y + x))); elseif (y <= 4.1e+49) tmp = Float64(x * Float64(y / Float64(Float64(x + 1.0) * Float64(Float64(y + x) * Float64(y + x))))); else tmp = Float64(Float64(x / Float64(x + Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (y <= 5.6e-248) tmp = t_0 * (1.0 / (x + 1.0)); elseif (y <= 1.06e-162) tmp = (x * t_0) * (1.0 / (y + x)); elseif (y <= 4.1e+49) tmp = x * (y / ((x + 1.0) * ((y + x) * (y + x)))); else tmp = (x / (x + (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 5.6e-248], N[(t$95$0 * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.06e-162], N[(N[(x * t$95$0), $MachinePrecision] * N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.1e+49], N[(x * N[(y / N[(N[(x + 1.0), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;y \leq 5.6 \cdot 10^{-248}:\\
\;\;\;\;t\_0 \cdot \frac{1}{x + 1}\\
\mathbf{elif}\;y \leq 1.06 \cdot 10^{-162}:\\
\;\;\;\;\left(x \cdot t\_0\right) \cdot \frac{1}{y + x}\\
\mathbf{elif}\;y \leq 4.1 \cdot 10^{+49}:\\
\;\;\;\;x \cdot \frac{y}{\left(x + 1\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + \left(y + 1\right)}}{y + x}\\
\end{array}
\end{array}
if y < 5.6000000000000002e-248Initial program 68.4%
+-commutative68.4%
+-commutative68.4%
+-commutative68.4%
*-commutative68.4%
distribute-rgt1-in49.1%
fma-define68.4%
+-commutative68.4%
+-commutative68.4%
cube-unmult68.4%
+-commutative68.4%
Simplified68.4%
*-commutative68.4%
fma-define49.1%
cube-mult49.1%
distribute-rgt1-in68.4%
*-commutative68.4%
associate-*l*68.4%
times-frac94.7%
associate-+r+94.7%
Applied egg-rr94.7%
Taylor expanded in y around 0 54.4%
+-commutative54.4%
Simplified54.4%
if 5.6000000000000002e-248 < y < 1.06000000000000003e-162Initial program 65.4%
Taylor expanded in x around 0 52.2%
Taylor expanded in y around 0 52.2%
*-commutative52.2%
*-rgt-identity52.2%
times-frac86.6%
un-div-inv86.5%
associate-*r*86.6%
+-commutative86.6%
+-commutative86.6%
Applied egg-rr86.6%
if 1.06000000000000003e-162 < y < 4.1e49Initial program 79.8%
associate-/l*93.7%
associate-+l+93.7%
Simplified93.7%
Taylor expanded in y around 0 86.5%
+-commutative86.5%
Simplified86.5%
if 4.1e49 < y Initial program 68.2%
+-commutative68.2%
+-commutative68.2%
+-commutative68.2%
*-commutative68.2%
distribute-rgt1-in68.2%
fma-define68.2%
+-commutative68.2%
+-commutative68.2%
cube-unmult68.2%
+-commutative68.2%
Simplified68.2%
*-commutative68.2%
fma-define68.2%
cube-mult68.2%
distribute-rgt1-in68.2%
*-commutative68.2%
associate-*l*68.2%
times-frac89.8%
associate-+r+89.8%
Applied egg-rr89.8%
Taylor expanded in y around inf 87.6%
*-un-lft-identity87.6%
*-commutative87.6%
associate-/r*90.8%
Applied egg-rr90.8%
Final simplification69.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= y 3.3e-258)
(* t_0 (/ 1.0 (+ x 1.0)))
(if (<= y 6e+47)
(* x (/ t_0 (* (+ y x) (+ x 1.0))))
(/ (/ x (+ x (+ y 1.0))) (+ y x))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (y <= 3.3e-258) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (y <= 6e+47) {
tmp = x * (t_0 / ((y + x) * (x + 1.0)));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (y + x)
if (y <= 3.3d-258) then
tmp = t_0 * (1.0d0 / (x + 1.0d0))
else if (y <= 6d+47) then
tmp = x * (t_0 / ((y + x) * (x + 1.0d0)))
else
tmp = (x / (x + (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (y <= 3.3e-258) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (y <= 6e+47) {
tmp = x * (t_0 / ((y + x) * (x + 1.0)));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if y <= 3.3e-258: tmp = t_0 * (1.0 / (x + 1.0)) elif y <= 6e+47: tmp = x * (t_0 / ((y + x) * (x + 1.0))) else: tmp = (x / (x + (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (y <= 3.3e-258) tmp = Float64(t_0 * Float64(1.0 / Float64(x + 1.0))); elseif (y <= 6e+47) tmp = Float64(x * Float64(t_0 / Float64(Float64(y + x) * Float64(x + 1.0)))); else tmp = Float64(Float64(x / Float64(x + Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (y <= 3.3e-258) tmp = t_0 * (1.0 / (x + 1.0)); elseif (y <= 6e+47) tmp = x * (t_0 / ((y + x) * (x + 1.0))); else tmp = (x / (x + (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 3.3e-258], N[(t$95$0 * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6e+47], N[(x * N[(t$95$0 / N[(N[(y + x), $MachinePrecision] * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;y \leq 3.3 \cdot 10^{-258}:\\
\;\;\;\;t\_0 \cdot \frac{1}{x + 1}\\
\mathbf{elif}\;y \leq 6 \cdot 10^{+47}:\\
\;\;\;\;x \cdot \frac{t\_0}{\left(y + x\right) \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + \left(y + 1\right)}}{y + x}\\
\end{array}
\end{array}
if y < 3.3e-258Initial program 68.4%
+-commutative68.4%
+-commutative68.4%
+-commutative68.4%
*-commutative68.4%
distribute-rgt1-in49.4%
fma-define68.4%
+-commutative68.4%
+-commutative68.4%
cube-unmult68.5%
+-commutative68.5%
Simplified68.5%
*-commutative68.5%
fma-define49.4%
cube-mult49.4%
distribute-rgt1-in68.4%
*-commutative68.4%
associate-*l*68.4%
times-frac94.6%
associate-+r+94.6%
Applied egg-rr94.6%
Taylor expanded in y around 0 53.4%
+-commutative53.4%
Simplified53.4%
if 3.3e-258 < y < 6.0000000000000003e47Initial program 74.6%
associate-/l*87.1%
associate-+l+87.1%
Simplified87.1%
Taylor expanded in y around 0 82.6%
+-commutative82.6%
Simplified82.6%
add-sqr-sqrt82.5%
associate-*l*82.4%
times-frac91.1%
+-commutative91.1%
+-commutative91.1%
Applied egg-rr91.1%
associate-*r/91.1%
*-commutative91.1%
associate-*r/91.0%
rem-square-sqrt91.3%
+-commutative91.3%
*-commutative91.3%
+-commutative91.3%
Simplified91.3%
if 6.0000000000000003e47 < y Initial program 68.2%
+-commutative68.2%
+-commutative68.2%
+-commutative68.2%
*-commutative68.2%
distribute-rgt1-in68.2%
fma-define68.2%
+-commutative68.2%
+-commutative68.2%
cube-unmult68.2%
+-commutative68.2%
Simplified68.2%
*-commutative68.2%
fma-define68.2%
cube-mult68.2%
distribute-rgt1-in68.2%
*-commutative68.2%
associate-*l*68.2%
times-frac89.8%
associate-+r+89.8%
Applied egg-rr89.8%
Taylor expanded in y around inf 87.6%
*-un-lft-identity87.6%
*-commutative87.6%
associate-/r*90.8%
Applied egg-rr90.8%
Final simplification70.2%
(FPCore (x y) :precision binary64 (if (<= x -1.55e+153) (/ (/ 1.0 x) (/ (+ y x) y)) (* (/ y (+ y x)) (/ x (* (+ y x) (+ x (+ y 1.0)))))))
double code(double x, double y) {
double tmp;
if (x <= -1.55e+153) {
tmp = (1.0 / x) / ((y + x) / y);
} else {
tmp = (y / (y + x)) * (x / ((y + x) * (x + (y + 1.0))));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.55d+153)) then
tmp = (1.0d0 / x) / ((y + x) / y)
else
tmp = (y / (y + x)) * (x / ((y + x) * (x + (y + 1.0d0))))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.55e+153) {
tmp = (1.0 / x) / ((y + x) / y);
} else {
tmp = (y / (y + x)) * (x / ((y + x) * (x + (y + 1.0))));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.55e+153: tmp = (1.0 / x) / ((y + x) / y) else: tmp = (y / (y + x)) * (x / ((y + x) * (x + (y + 1.0)))) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.55e+153) tmp = Float64(Float64(1.0 / x) / Float64(Float64(y + x) / y)); else tmp = Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(Float64(y + x) * Float64(x + Float64(y + 1.0))))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.55e+153) tmp = (1.0 / x) / ((y + x) / y); else tmp = (y / (y + x)) * (x / ((y + x) * (x + (y + 1.0)))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.55e+153], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(y + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.55 \cdot 10^{+153}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{y + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{x}{\left(y + x\right) \cdot \left(x + \left(y + 1\right)\right)}\\
\end{array}
\end{array}
if x < -1.55e153Initial program 54.6%
+-commutative54.6%
+-commutative54.6%
+-commutative54.6%
*-commutative54.6%
distribute-rgt1-in0.2%
fma-define54.6%
+-commutative54.6%
+-commutative54.6%
cube-unmult54.6%
+-commutative54.6%
Simplified54.6%
*-commutative54.6%
fma-define0.2%
cube-mult0.2%
distribute-rgt1-in54.6%
*-commutative54.6%
associate-*l*54.6%
times-frac82.2%
associate-+r+82.2%
Applied egg-rr82.2%
Taylor expanded in x around inf 81.8%
*-commutative81.8%
clear-num81.8%
un-div-inv81.8%
Applied egg-rr81.8%
if -1.55e153 < x Initial program 72.2%
+-commutative72.2%
+-commutative72.2%
+-commutative72.2%
*-commutative72.2%
distribute-rgt1-in65.0%
fma-define72.2%
+-commutative72.2%
+-commutative72.2%
cube-unmult72.2%
+-commutative72.2%
Simplified72.2%
*-commutative72.2%
fma-define65.0%
cube-mult65.0%
distribute-rgt1-in72.2%
*-commutative72.2%
associate-*l*72.2%
times-frac97.0%
associate-+r+97.0%
Applied egg-rr97.0%
Final simplification95.1%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= x -3.2e-16)
(* t_0 (/ 1.0 (+ x 1.0)))
(if (<= x -6.2e-246)
(* t_0 (/ x (+ y x)))
(/ (/ x (+ x (+ y 1.0))) (+ y x))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (x <= -6.2e-246) {
tmp = t_0 * (x / (y + x));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (y + x)
if (x <= (-3.2d-16)) then
tmp = t_0 * (1.0d0 / (x + 1.0d0))
else if (x <= (-6.2d-246)) then
tmp = t_0 * (x / (y + x))
else
tmp = (x / (x + (y + 1.0d0))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (x <= -6.2e-246) {
tmp = t_0 * (x / (y + x));
} else {
tmp = (x / (x + (y + 1.0))) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if x <= -3.2e-16: tmp = t_0 * (1.0 / (x + 1.0)) elif x <= -6.2e-246: tmp = t_0 * (x / (y + x)) else: tmp = (x / (x + (y + 1.0))) / (y + x) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (x <= -3.2e-16) tmp = Float64(t_0 * Float64(1.0 / Float64(x + 1.0))); elseif (x <= -6.2e-246) tmp = Float64(t_0 * Float64(x / Float64(y + x))); else tmp = Float64(Float64(x / Float64(x + Float64(y + 1.0))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (x <= -3.2e-16) tmp = t_0 * (1.0 / (x + 1.0)); elseif (x <= -6.2e-246) tmp = t_0 * (x / (y + x)); else tmp = (x / (x + (y + 1.0))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e-16], N[(t$95$0 * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -6.2e-246], N[(t$95$0 * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{-16}:\\
\;\;\;\;t\_0 \cdot \frac{1}{x + 1}\\
\mathbf{elif}\;x \leq -6.2 \cdot 10^{-246}:\\
\;\;\;\;t\_0 \cdot \frac{x}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{x + \left(y + 1\right)}}{y + x}\\
\end{array}
\end{array}
if x < -3.20000000000000023e-16Initial program 62.5%
+-commutative62.5%
+-commutative62.5%
+-commutative62.5%
*-commutative62.5%
distribute-rgt1-in36.6%
fma-define62.6%
+-commutative62.6%
+-commutative62.6%
cube-unmult62.6%
+-commutative62.6%
Simplified62.6%
*-commutative62.6%
fma-define36.6%
cube-mult36.6%
distribute-rgt1-in62.5%
*-commutative62.5%
associate-*l*62.6%
times-frac91.0%
associate-+r+91.0%
Applied egg-rr91.0%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
Simplified72.4%
if -3.20000000000000023e-16 < x < -6.2000000000000001e-246Initial program 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in y around 0 61.5%
*-rgt-identity61.5%
*-commutative61.5%
*-rgt-identity61.5%
*-rgt-identity61.5%
times-frac77.1%
+-commutative77.1%
+-commutative77.1%
Applied egg-rr77.1%
if -6.2000000000000001e-246 < x Initial program 71.1%
+-commutative71.1%
+-commutative71.1%
+-commutative71.1%
*-commutative71.1%
distribute-rgt1-in64.6%
fma-define71.1%
+-commutative71.1%
+-commutative71.1%
cube-unmult71.1%
+-commutative71.1%
Simplified71.1%
*-commutative71.1%
fma-define64.6%
cube-mult64.6%
distribute-rgt1-in71.1%
*-commutative71.1%
associate-*l*71.1%
times-frac96.0%
associate-+r+96.0%
Applied egg-rr96.0%
Taylor expanded in y around inf 70.5%
*-un-lft-identity70.5%
*-commutative70.5%
associate-/r*59.5%
Applied egg-rr59.5%
Final simplification66.0%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= x -3.2e-16)
(* t_0 (/ 1.0 (+ x 1.0)))
(if (<= x -1e-246) (* t_0 (/ x (+ y x))) (/ (/ x y) (+ y 1.0))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (x <= -1e-246) {
tmp = t_0 * (x / (y + x));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (y + x)
if (x <= (-3.2d-16)) then
tmp = t_0 * (1.0d0 / (x + 1.0d0))
else if (x <= (-1d-246)) then
tmp = t_0 * (x / (y + x))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else if (x <= -1e-246) {
tmp = t_0 * (x / (y + x));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if x <= -3.2e-16: tmp = t_0 * (1.0 / (x + 1.0)) elif x <= -1e-246: tmp = t_0 * (x / (y + x)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (x <= -3.2e-16) tmp = Float64(t_0 * Float64(1.0 / Float64(x + 1.0))); elseif (x <= -1e-246) tmp = Float64(t_0 * Float64(x / Float64(y + x))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (x <= -3.2e-16) tmp = t_0 * (1.0 / (x + 1.0)); elseif (x <= -1e-246) tmp = t_0 * (x / (y + x)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e-16], N[(t$95$0 * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1e-246], N[(t$95$0 * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{-16}:\\
\;\;\;\;t\_0 \cdot \frac{1}{x + 1}\\
\mathbf{elif}\;x \leq -1 \cdot 10^{-246}:\\
\;\;\;\;t\_0 \cdot \frac{x}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -3.20000000000000023e-16Initial program 62.5%
+-commutative62.5%
+-commutative62.5%
+-commutative62.5%
*-commutative62.5%
distribute-rgt1-in36.6%
fma-define62.6%
+-commutative62.6%
+-commutative62.6%
cube-unmult62.6%
+-commutative62.6%
Simplified62.6%
*-commutative62.6%
fma-define36.6%
cube-mult36.6%
distribute-rgt1-in62.5%
*-commutative62.5%
associate-*l*62.6%
times-frac91.0%
associate-+r+91.0%
Applied egg-rr91.0%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
Simplified72.4%
if -3.20000000000000023e-16 < x < -9.99999999999999956e-247Initial program 80.0%
Taylor expanded in x around 0 80.0%
Taylor expanded in y around 0 61.5%
*-rgt-identity61.5%
*-commutative61.5%
*-rgt-identity61.5%
*-rgt-identity61.5%
times-frac77.1%
+-commutative77.1%
+-commutative77.1%
Applied egg-rr77.1%
if -9.99999999999999956e-247 < x Initial program 71.1%
associate-/l*85.1%
associate-+l+85.1%
Simplified85.1%
Taylor expanded in x around 0 55.0%
associate-/r*58.3%
+-commutative58.3%
Simplified58.3%
Final simplification65.4%
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(* (/ 1.0 x) (/ y x))
(if (<= x -1.7e-185)
(/ y x)
(if (<= x 5e-155) (/ 1.0 (/ y x)) (/ x (* y y))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else if (x <= 5e-155) {
tmp = 1.0 / (y / x);
} else {
tmp = x / (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (1.0d0 / x) * (y / x)
else if (x <= (-1.7d-185)) then
tmp = y / x
else if (x <= 5d-155) then
tmp = 1.0d0 / (y / x)
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else if (x <= 5e-155) {
tmp = 1.0 / (y / x);
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (1.0 / x) * (y / x) elif x <= -1.7e-185: tmp = y / x elif x <= 5e-155: tmp = 1.0 / (y / x) else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.7e-185) tmp = Float64(y / x); elseif (x <= 5e-155) tmp = Float64(1.0 / Float64(y / x)); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (1.0 / x) * (y / x); elseif (x <= -1.7e-185) tmp = y / x; elseif (x <= 5e-155) tmp = 1.0 / (y / x); else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-185], N[(y / x), $MachinePrecision], If[LessEqual[x, 5e-155], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 5 \cdot 10^{-155}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if x < -1Initial program 59.9%
+-commutative59.9%
+-commutative59.9%
+-commutative59.9%
*-commutative59.9%
distribute-rgt1-in32.0%
fma-define59.9%
+-commutative59.9%
+-commutative59.9%
cube-unmult59.8%
+-commutative59.8%
Simplified59.8%
*-commutative59.8%
fma-define32.0%
cube-mult32.0%
distribute-rgt1-in59.9%
*-commutative59.9%
associate-*l*59.9%
times-frac90.4%
associate-+r+90.4%
Applied egg-rr90.4%
Taylor expanded in x around inf 70.8%
Taylor expanded in y around 0 70.3%
if -1 < x < -1.6999999999999999e-185Initial program 82.7%
Taylor expanded in x around 0 77.8%
*-commutative77.8%
associate-*l*77.8%
times-frac94.9%
+-commutative94.9%
+-commutative94.9%
Applied egg-rr94.9%
associate-*r/94.9%
associate-*l/78.0%
associate-*r/94.9%
*-commutative94.9%
associate-*r/94.9%
Simplified94.9%
Taylor expanded in y around 0 48.7%
if -1.6999999999999999e-185 < x < 4.9999999999999999e-155Initial program 64.7%
associate-/l*83.6%
associate-+l+83.6%
Simplified83.6%
Taylor expanded in x around 0 93.3%
Taylor expanded in y around 0 86.4%
clear-num87.2%
inv-pow87.2%
Applied egg-rr87.2%
unpow-187.2%
Simplified87.2%
if 4.9999999999999999e-155 < x Initial program 76.4%
associate-/l*85.5%
associate-+l+85.5%
Simplified85.5%
Taylor expanded in x around 0 32.6%
Taylor expanded in y around inf 27.5%
Final simplification56.3%
(FPCore (x y)
:precision binary64
(if (<= x -1.0)
(/ y (* x x))
(if (<= x -1.7e-185)
(/ y x)
(if (<= x 4.2e-151) (/ 1.0 (/ y x)) (/ x (* y y))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else if (x <= 4.2e-151) {
tmp = 1.0 / (y / x);
} else {
tmp = x / (y * y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = y / (x * x)
else if (x <= (-1.7d-185)) then
tmp = y / x
else if (x <= 4.2d-151) then
tmp = 1.0d0 / (y / x)
else
tmp = x / (y * y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = y / (x * x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else if (x <= 4.2e-151) {
tmp = 1.0 / (y / x);
} else {
tmp = x / (y * y);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = y / (x * x) elif x <= -1.7e-185: tmp = y / x elif x <= 4.2e-151: tmp = 1.0 / (y / x) else: tmp = x / (y * y) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(y / Float64(x * x)); elseif (x <= -1.7e-185) tmp = Float64(y / x); elseif (x <= 4.2e-151) tmp = Float64(1.0 / Float64(y / x)); else tmp = Float64(x / Float64(y * y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = y / (x * x); elseif (x <= -1.7e-185) tmp = y / x; elseif (x <= 4.2e-151) tmp = 1.0 / (y / x); else tmp = x / (y * y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-185], N[(y / x), $MachinePrecision], If[LessEqual[x, 4.2e-151], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;x \leq 4.2 \cdot 10^{-151}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if x < -1Initial program 59.9%
associate-/l*77.7%
associate-+l+77.7%
Simplified77.7%
Taylor expanded in y around 0 71.8%
+-commutative71.8%
Simplified71.8%
Taylor expanded in x around inf 70.7%
if -1 < x < -1.6999999999999999e-185Initial program 82.7%
Taylor expanded in x around 0 77.8%
*-commutative77.8%
associate-*l*77.8%
times-frac94.9%
+-commutative94.9%
+-commutative94.9%
Applied egg-rr94.9%
associate-*r/94.9%
associate-*l/78.0%
associate-*r/94.9%
*-commutative94.9%
associate-*r/94.9%
Simplified94.9%
Taylor expanded in y around 0 48.7%
if -1.6999999999999999e-185 < x < 4.19999999999999981e-151Initial program 64.7%
associate-/l*83.6%
associate-+l+83.6%
Simplified83.6%
Taylor expanded in x around 0 93.3%
Taylor expanded in y around 0 86.4%
clear-num87.2%
inv-pow87.2%
Applied egg-rr87.2%
unpow-187.2%
Simplified87.2%
if 4.19999999999999981e-151 < x Initial program 76.4%
associate-/l*85.5%
associate-+l+85.5%
Simplified85.5%
Taylor expanded in x around 0 32.6%
Taylor expanded in y around inf 27.5%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (* y y))))
(if (<= y -3.4e+126)
t_0
(if (<= y 7.6e-139) (/ 1.0 (/ x y)) (if (<= y 1.0) (/ x y) t_0)))))
double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (y <= -3.4e+126) {
tmp = t_0;
} else if (y <= 7.6e-139) {
tmp = 1.0 / (x / y);
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = t_0;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = x / (y * y)
if (y <= (-3.4d+126)) then
tmp = t_0
else if (y <= 7.6d-139) then
tmp = 1.0d0 / (x / y)
else if (y <= 1.0d0) then
tmp = x / y
else
tmp = t_0
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y * y);
double tmp;
if (y <= -3.4e+126) {
tmp = t_0;
} else if (y <= 7.6e-139) {
tmp = 1.0 / (x / y);
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = t_0;
}
return tmp;
}
def code(x, y): t_0 = x / (y * y) tmp = 0 if y <= -3.4e+126: tmp = t_0 elif y <= 7.6e-139: tmp = 1.0 / (x / y) elif y <= 1.0: tmp = x / y else: tmp = t_0 return tmp
function code(x, y) t_0 = Float64(x / Float64(y * y)) tmp = 0.0 if (y <= -3.4e+126) tmp = t_0; elseif (y <= 7.6e-139) tmp = Float64(1.0 / Float64(x / y)); elseif (y <= 1.0) tmp = Float64(x / y); else tmp = t_0; end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y * y); tmp = 0.0; if (y <= -3.4e+126) tmp = t_0; elseif (y <= 7.6e-139) tmp = 1.0 / (x / y); elseif (y <= 1.0) tmp = x / y; else tmp = t_0; end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -3.4e+126], t$95$0, If[LessEqual[y, 7.6e-139], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], t$95$0]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y \cdot y}\\
\mathbf{if}\;y \leq -3.4 \cdot 10^{+126}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 7.6 \cdot 10^{-139}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;t\_0\\
\end{array}
\end{array}
if y < -3.39999999999999989e126 or 1 < y Initial program 63.5%
associate-/l*81.6%
associate-+l+81.6%
Simplified81.6%
Taylor expanded in x around 0 79.7%
Taylor expanded in y around inf 79.7%
if -3.39999999999999989e126 < y < 7.60000000000000015e-139Initial program 73.0%
Taylor expanded in x around 0 59.1%
*-commutative59.1%
associate-*l*59.1%
times-frac77.2%
+-commutative77.2%
+-commutative77.2%
Applied egg-rr77.2%
associate-*r/77.3%
associate-*l/56.3%
associate-*r/77.2%
*-commutative77.2%
associate-*r/77.2%
Simplified77.2%
Taylor expanded in y around 0 46.7%
clear-num47.7%
inv-pow47.7%
Applied egg-rr47.7%
unpow-147.7%
Simplified47.7%
if 7.60000000000000015e-139 < y < 1Initial program 75.6%
associate-/l*94.0%
associate-+l+94.0%
Simplified94.0%
Taylor expanded in x around 0 38.9%
Taylor expanded in y around 0 38.9%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= x -3.2e-16)
(* t_0 (/ 1.0 (+ x 1.0)))
(/ t_0 (* (+ y 1.0) (/ (+ y x) x))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else {
tmp = t_0 / ((y + 1.0) * ((y + x) / x));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: t_0
real(8) :: tmp
t_0 = y / (y + x)
if (x <= (-3.2d-16)) then
tmp = t_0 * (1.0d0 / (x + 1.0d0))
else
tmp = t_0 / ((y + 1.0d0) * ((y + x) / x))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -3.2e-16) {
tmp = t_0 * (1.0 / (x + 1.0));
} else {
tmp = t_0 / ((y + 1.0) * ((y + x) / x));
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if x <= -3.2e-16: tmp = t_0 * (1.0 / (x + 1.0)) else: tmp = t_0 / ((y + 1.0) * ((y + x) / x)) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (x <= -3.2e-16) tmp = Float64(t_0 * Float64(1.0 / Float64(x + 1.0))); else tmp = Float64(t_0 / Float64(Float64(y + 1.0) * Float64(Float64(y + x) / x))); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (x <= -3.2e-16) tmp = t_0 * (1.0 / (x + 1.0)); else tmp = t_0 / ((y + 1.0) * ((y + x) / x)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -3.2e-16], N[(t$95$0 * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 / N[(N[(y + 1.0), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -3.2 \cdot 10^{-16}:\\
\;\;\;\;t\_0 \cdot \frac{1}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{t\_0}{\left(y + 1\right) \cdot \frac{y + x}{x}}\\
\end{array}
\end{array}
if x < -3.20000000000000023e-16Initial program 62.5%
+-commutative62.5%
+-commutative62.5%
+-commutative62.5%
*-commutative62.5%
distribute-rgt1-in36.6%
fma-define62.6%
+-commutative62.6%
+-commutative62.6%
cube-unmult62.6%
+-commutative62.6%
Simplified62.6%
*-commutative62.6%
fma-define36.6%
cube-mult36.6%
distribute-rgt1-in62.5%
*-commutative62.5%
associate-*l*62.6%
times-frac91.0%
associate-+r+91.0%
Applied egg-rr91.0%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
Simplified72.4%
if -3.20000000000000023e-16 < x Initial program 73.1%
Taylor expanded in x around 0 65.5%
*-commutative65.5%
associate-*l*65.5%
times-frac86.9%
+-commutative86.9%
+-commutative86.9%
Applied egg-rr86.9%
associate-*r/86.9%
associate-*l/65.7%
associate-*r/86.9%
*-commutative86.9%
associate-*r/86.9%
Simplified86.9%
clear-num86.9%
associate-/r*87.5%
+-commutative87.5%
frac-times86.9%
*-un-lft-identity86.9%
+-commutative86.9%
Applied egg-rr86.9%
Final simplification82.8%
(FPCore (x y) :precision binary64 (if (<= x -3.2e-16) (* (/ y (+ y x)) (/ 1.0 (+ x 1.0))) (* (/ x (+ y x)) (/ y (* (+ y x) (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -3.2e-16) {
tmp = (y / (y + x)) * (1.0 / (x + 1.0));
} else {
tmp = (x / (y + x)) * (y / ((y + x) * (y + 1.0)));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-3.2d-16)) then
tmp = (y / (y + x)) * (1.0d0 / (x + 1.0d0))
else
tmp = (x / (y + x)) * (y / ((y + x) * (y + 1.0d0)))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -3.2e-16) {
tmp = (y / (y + x)) * (1.0 / (x + 1.0));
} else {
tmp = (x / (y + x)) * (y / ((y + x) * (y + 1.0)));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -3.2e-16: tmp = (y / (y + x)) * (1.0 / (x + 1.0)) else: tmp = (x / (y + x)) * (y / ((y + x) * (y + 1.0))) return tmp
function code(x, y) tmp = 0.0 if (x <= -3.2e-16) tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / Float64(x + 1.0))); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(y / Float64(Float64(y + x) * Float64(y + 1.0)))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -3.2e-16) tmp = (y / (y + x)) * (1.0 / (x + 1.0)); else tmp = (x / (y + x)) * (y / ((y + x) * (y + 1.0))); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -3.2e-16], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-16}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -3.20000000000000023e-16Initial program 62.5%
+-commutative62.5%
+-commutative62.5%
+-commutative62.5%
*-commutative62.5%
distribute-rgt1-in36.6%
fma-define62.6%
+-commutative62.6%
+-commutative62.6%
cube-unmult62.6%
+-commutative62.6%
Simplified62.6%
*-commutative62.6%
fma-define36.6%
cube-mult36.6%
distribute-rgt1-in62.5%
*-commutative62.5%
associate-*l*62.6%
times-frac91.0%
associate-+r+91.0%
Applied egg-rr91.0%
Taylor expanded in y around 0 72.4%
+-commutative72.4%
Simplified72.4%
if -3.20000000000000023e-16 < x Initial program 73.1%
Taylor expanded in x around 0 65.5%
*-commutative65.5%
associate-*l*65.5%
times-frac86.9%
+-commutative86.9%
+-commutative86.9%
Applied egg-rr86.9%
associate-*r/86.9%
associate-*l/65.7%
associate-*r/86.9%
*-commutative86.9%
associate-*r/86.9%
Simplified86.9%
Final simplification82.8%
(FPCore (x y) :precision binary64 (if (<= x -1.35e+154) (* (/ 1.0 x) (/ y x)) (if (<= x -1.7e-185) (/ y (* x (+ x 1.0))) (/ (/ x y) (+ y 1.0)))))
double code(double x, double y) {
double tmp;
if (x <= -1.35e+154) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.35d+154)) then
tmp = (1.0d0 / x) * (y / x)
else if (x <= (-1.7d-185)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.35e+154) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / (x * (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.35e+154: tmp = (1.0 / x) * (y / x) elif x <= -1.7e-185: tmp = y / (x * (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.35e+154) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.7e-185) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.35e+154) tmp = (1.0 / x) * (y / x); elseif (x <= -1.7e-185) tmp = y / (x * (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.35e+154], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-185], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.35 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.35000000000000003e154Initial program 56.2%
+-commutative56.2%
+-commutative56.2%
+-commutative56.2%
*-commutative56.2%
distribute-rgt1-in0.0%
fma-define56.2%
+-commutative56.2%
+-commutative56.2%
cube-unmult56.2%
+-commutative56.2%
Simplified56.2%
*-commutative56.2%
fma-define0.0%
cube-mult0.0%
distribute-rgt1-in56.2%
*-commutative56.2%
associate-*l*56.2%
times-frac81.6%
associate-+r+81.6%
Applied egg-rr81.6%
Taylor expanded in x around inf 81.2%
Taylor expanded in y around 0 80.8%
if -1.35000000000000003e154 < x < -1.6999999999999999e-185Initial program 72.4%
associate-/l*84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in y around 0 59.0%
+-commutative59.0%
Simplified59.0%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
associate-/r*60.5%
+-commutative60.5%
Simplified60.5%
Final simplification62.4%
(FPCore (x y) :precision binary64 (if (<= x -7.5e+154) (* (/ 1.0 x) (/ y x)) (if (<= x -1.7e-185) (/ y (* x (+ x 1.0))) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -7.5e+154) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-7.5d+154)) then
tmp = (1.0d0 / x) * (y / x)
else if (x <= (-1.7d-185)) then
tmp = y / (x * (x + 1.0d0))
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -7.5e+154) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / (x * (x + 1.0));
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -7.5e+154: tmp = (1.0 / x) * (y / x) elif x <= -1.7e-185: tmp = y / (x * (x + 1.0)) else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -7.5e+154) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.7e-185) tmp = Float64(y / Float64(x * Float64(x + 1.0))); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -7.5e+154) tmp = (1.0 / x) * (y / x); elseif (x <= -1.7e-185) tmp = y / (x * (x + 1.0)); else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -7.5e+154], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-185], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -7.5 \cdot 10^{+154}:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -7.5000000000000004e154Initial program 56.2%
+-commutative56.2%
+-commutative56.2%
+-commutative56.2%
*-commutative56.2%
distribute-rgt1-in0.0%
fma-define56.2%
+-commutative56.2%
+-commutative56.2%
cube-unmult56.2%
+-commutative56.2%
Simplified56.2%
*-commutative56.2%
fma-define0.0%
cube-mult0.0%
distribute-rgt1-in56.2%
*-commutative56.2%
associate-*l*56.2%
times-frac81.6%
associate-+r+81.6%
Applied egg-rr81.6%
Taylor expanded in x around inf 81.2%
Taylor expanded in y around 0 80.8%
if -7.5000000000000004e154 < x < -1.6999999999999999e-185Initial program 72.4%
associate-/l*84.0%
associate-+l+84.0%
Simplified84.0%
Taylor expanded in y around 0 59.0%
+-commutative59.0%
Simplified59.0%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
Final simplification60.6%
(FPCore (x y) :precision binary64 (if (<= x -1.0) (* (/ 1.0 x) (/ y x)) (if (<= x -1.7e-185) (/ y x) (/ x (* y (+ y 1.0))))))
double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.0d0)) then
tmp = (1.0d0 / x) * (y / x)
else if (x <= (-1.7d-185)) then
tmp = y / x
else
tmp = x / (y * (y + 1.0d0))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.0) {
tmp = (1.0 / x) * (y / x);
} else if (x <= -1.7e-185) {
tmp = y / x;
} else {
tmp = x / (y * (y + 1.0));
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.0: tmp = (1.0 / x) * (y / x) elif x <= -1.7e-185: tmp = y / x else: tmp = x / (y * (y + 1.0)) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.0) tmp = Float64(Float64(1.0 / x) * Float64(y / x)); elseif (x <= -1.7e-185) tmp = Float64(y / x); else tmp = Float64(x / Float64(y * Float64(y + 1.0))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.0) tmp = (1.0 / x) * (y / x); elseif (x <= -1.7e-185) tmp = y / x; else tmp = x / (y * (y + 1.0)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.0], N[(N[(1.0 / x), $MachinePrecision] * N[(y / x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.7e-185], N[(y / x), $MachinePrecision], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1:\\
\;\;\;\;\frac{1}{x} \cdot \frac{y}{x}\\
\mathbf{elif}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\end{array}
\end{array}
if x < -1Initial program 59.9%
+-commutative59.9%
+-commutative59.9%
+-commutative59.9%
*-commutative59.9%
distribute-rgt1-in32.0%
fma-define59.9%
+-commutative59.9%
+-commutative59.9%
cube-unmult59.8%
+-commutative59.8%
Simplified59.8%
*-commutative59.8%
fma-define32.0%
cube-mult32.0%
distribute-rgt1-in59.9%
*-commutative59.9%
associate-*l*59.9%
times-frac90.4%
associate-+r+90.4%
Applied egg-rr90.4%
Taylor expanded in x around inf 70.8%
Taylor expanded in y around 0 70.3%
if -1 < x < -1.6999999999999999e-185Initial program 82.7%
Taylor expanded in x around 0 77.8%
*-commutative77.8%
associate-*l*77.8%
times-frac94.9%
+-commutative94.9%
+-commutative94.9%
Applied egg-rr94.9%
associate-*r/94.9%
associate-*l/78.0%
associate-*r/94.9%
*-commutative94.9%
associate-*r/94.9%
Simplified94.9%
Taylor expanded in y around 0 48.7%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
Final simplification59.6%
(FPCore (x y) :precision binary64 (if (<= x -1.7e-185) (* (/ y (+ y x)) (/ 1.0 (+ x 1.0))) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = (y / (y + x)) * (1.0 / (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.7d-185)) then
tmp = (y / (y + x)) * (1.0d0 / (x + 1.0d0))
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = (y / (y + x)) * (1.0 / (x + 1.0));
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.7e-185: tmp = (y / (y + x)) * (1.0 / (x + 1.0)) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.7e-185) tmp = Float64(Float64(y / Float64(y + x)) * Float64(1.0 / Float64(x + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.7e-185) tmp = (y / (y + x)) * (1.0 / (x + 1.0)); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.7e-185], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{1}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.6999999999999999e-185Initial program 67.8%
+-commutative67.8%
+-commutative67.8%
+-commutative67.8%
*-commutative67.8%
distribute-rgt1-in45.7%
fma-define67.8%
+-commutative67.8%
+-commutative67.8%
cube-unmult67.8%
+-commutative67.8%
Simplified67.8%
*-commutative67.8%
fma-define45.7%
cube-mult45.7%
distribute-rgt1-in67.8%
*-commutative67.8%
associate-*l*67.8%
times-frac93.6%
associate-+r+93.6%
Applied egg-rr93.6%
Taylor expanded in y around 0 65.7%
+-commutative65.7%
Simplified65.7%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
associate-/r*60.5%
+-commutative60.5%
Simplified60.5%
Final simplification62.6%
(FPCore (x y) :precision binary64 (if (<= x -1.7e-185) (/ (/ y x) (+ x 1.0)) (/ (/ x y) (+ y 1.0))))
double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.7d-185)) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / y) / (y + 1.0d0)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / y) / (y + 1.0);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.7e-185: tmp = (y / x) / (x + 1.0) else: tmp = (x / y) / (y + 1.0) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.7e-185) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / y) / Float64(y + 1.0)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.7e-185) tmp = (y / x) / (x + 1.0); else tmp = (x / y) / (y + 1.0); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.7e-185], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + 1}\\
\end{array}
\end{array}
if x < -1.6999999999999999e-185Initial program 67.8%
+-commutative67.8%
+-commutative67.8%
+-commutative67.8%
*-commutative67.8%
distribute-rgt1-in45.7%
fma-define67.8%
+-commutative67.8%
+-commutative67.8%
cube-unmult67.8%
+-commutative67.8%
Simplified67.8%
*-commutative67.8%
fma-define45.7%
cube-mult45.7%
distribute-rgt1-in67.8%
*-commutative67.8%
associate-*l*67.8%
times-frac93.6%
associate-+r+93.6%
Applied egg-rr93.6%
*-un-lft-identity93.6%
+-commutative93.6%
Applied egg-rr93.6%
*-lft-identity93.6%
associate-/r*99.8%
Simplified99.8%
Taylor expanded in y around 0 65.5%
associate-/r*65.2%
+-commutative65.2%
Simplified65.2%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
associate-/r*60.5%
+-commutative60.5%
Simplified60.5%
(FPCore (x y) :precision binary64 (if (<= x -1.7e-185) (/ 1.0 (/ x y)) (/ 1.0 (/ y x))))
double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = 1.0 / (x / y);
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.7d-185)) then
tmp = 1.0d0 / (x / y)
else
tmp = 1.0d0 / (y / x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = 1.0 / (x / y);
} else {
tmp = 1.0 / (y / x);
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.7e-185: tmp = 1.0 / (x / y) else: tmp = 1.0 / (y / x) return tmp
function code(x, y) tmp = 0.0 if (x <= -1.7e-185) tmp = Float64(1.0 / Float64(x / y)); else tmp = Float64(1.0 / Float64(y / x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.7e-185) tmp = 1.0 / (x / y); else tmp = 1.0 / (y / x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.7e-185], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(y / x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\frac{y}{x}}\\
\end{array}
\end{array}
if x < -1.6999999999999999e-185Initial program 67.8%
Taylor expanded in x around 0 52.3%
*-commutative52.3%
associate-*l*52.3%
times-frac69.0%
+-commutative69.0%
+-commutative69.0%
Applied egg-rr69.0%
associate-*r/69.0%
associate-*l/51.0%
associate-*r/69.0%
*-commutative69.0%
associate-*r/69.0%
Simplified69.0%
Taylor expanded in y around 0 33.7%
clear-num34.5%
inv-pow34.5%
Applied egg-rr34.5%
unpow-134.5%
Simplified34.5%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
Taylor expanded in y around 0 42.7%
clear-num43.0%
inv-pow43.0%
Applied egg-rr43.0%
unpow-143.0%
Simplified43.0%
(FPCore (x y) :precision binary64 (if (<= x -1.7e-185) (/ 1.0 (/ x y)) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = 1.0 / (x / y);
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.7d-185)) then
tmp = 1.0d0 / (x / y)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = 1.0 / (x / y);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.7e-185: tmp = 1.0 / (x / y) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.7e-185) tmp = Float64(1.0 / Float64(x / y)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.7e-185) tmp = 1.0 / (x / y); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.7e-185], N[(1.0 / N[(x / y), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{1}{\frac{x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1.6999999999999999e-185Initial program 67.8%
Taylor expanded in x around 0 52.3%
*-commutative52.3%
associate-*l*52.3%
times-frac69.0%
+-commutative69.0%
+-commutative69.0%
Applied egg-rr69.0%
associate-*r/69.0%
associate-*l/51.0%
associate-*r/69.0%
*-commutative69.0%
associate-*r/69.0%
Simplified69.0%
Taylor expanded in y around 0 33.7%
clear-num34.5%
inv-pow34.5%
Applied egg-rr34.5%
unpow-134.5%
Simplified34.5%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
Taylor expanded in y around 0 42.7%
(FPCore (x y) :precision binary64 (if (<= x -1.7e-185) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-1.7d-185)) then
tmp = y / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -1.7e-185) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -1.7e-185: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -1.7e-185) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -1.7e-185) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -1.7e-185], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.7 \cdot 10^{-185}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -1.6999999999999999e-185Initial program 67.8%
Taylor expanded in x around 0 52.3%
*-commutative52.3%
associate-*l*52.3%
times-frac69.0%
+-commutative69.0%
+-commutative69.0%
Applied egg-rr69.0%
associate-*r/69.0%
associate-*l/51.0%
associate-*r/69.0%
*-commutative69.0%
associate-*r/69.0%
Simplified69.0%
Taylor expanded in y around 0 33.7%
if -1.6999999999999999e-185 < x Initial program 71.7%
associate-/l*84.8%
associate-+l+84.8%
Simplified84.8%
Taylor expanded in x around 0 57.4%
Taylor expanded in y around 0 42.7%
(FPCore (x y) :precision binary64 (/ x y))
double code(double x, double y) {
return x / y;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
public static double code(double x, double y) {
return x / y;
}
def code(x, y): return x / y
function code(x, y) return Float64(x / y) end
function tmp = code(x, y) tmp = x / y; end
code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
\\
\frac{x}{y}
\end{array}
Initial program 70.1%
associate-/l*84.2%
associate-+l+84.2%
Simplified84.2%
Taylor expanded in x around 0 48.1%
Taylor expanded in y around 0 29.2%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x)))))
double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / ((y + 1.0d0) + x)) / (y + x)) / (1.0d0 / (y / (y + x)))
end function
public static double code(double x, double y) {
return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)));
}
def code(x, y): return ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x)))
function code(x, y) return Float64(Float64(Float64(x / Float64(Float64(y + 1.0) + x)) / Float64(y + x)) / Float64(1.0 / Float64(y / Float64(y + x)))) end
function tmp = code(x, y) tmp = ((x / ((y + 1.0) + x)) / (y + x)) / (1.0 / (y / (y + x))); end
code[x_, y_] := N[(N[(N[(x / N[(N[(y + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}
\end{array}
herbie shell --seed 2024163
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:alt
(! :herbie-platform default (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x)))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))