
(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 21 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 1.0)))) (+ y x)))
double code(double x, double y) {
return ((y / (y + x)) * (x / (y + (x + 1.0)))) / (y + x);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((y / (y + x)) * (x / (y + (x + 1.0d0)))) / (y + x)
end function
public static double code(double x, double y) {
return ((y / (y + x)) * (x / (y + (x + 1.0)))) / (y + x);
}
def code(x, y): return ((y / (y + x)) * (x / (y + (x + 1.0)))) / (y + x)
function code(x, y) return Float64(Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(y + Float64(x + 1.0)))) / Float64(y + x)) end
function tmp = code(x, y) tmp = ((y / (y + x)) * (x / (y + (x + 1.0)))) / (y + x); end
code[x_, y_] := N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{y}{y + x} \cdot \frac{x}{y + \left(x + 1\right)}}{y + x}
\end{array}
Initial program 65.8%
times-frac86.1%
+-commutative86.1%
+-commutative86.1%
+-commutative86.1%
times-frac65.8%
associate-*l/82.7%
*-commutative82.7%
*-commutative82.7%
distribute-rgt1-in60.5%
fma-def82.7%
+-commutative82.7%
+-commutative82.7%
cube-unmult82.7%
+-commutative82.7%
Simplified82.7%
associate-*r/65.8%
fma-udef47.7%
cube-mult47.7%
distribute-rgt1-in65.8%
associate-+r+65.8%
*-commutative65.8%
frac-times86.0%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= x -1.92e+149)
(/ t_0 (+ y x))
(if (<= x -260000.0)
(/ y (* (+ y x) (+ y x)))
(if (or (<= x -5.8e-19) (not (<= x 6.4e-233)))
(/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x))
(/ (/ t_0 (/ 1.0 x)) (+ y x)))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -1.92e+149) {
tmp = t_0 / (y + x);
} else if (x <= -260000.0) {
tmp = y / ((y + x) * (y + x));
} else if ((x <= -5.8e-19) || !(x <= 6.4e-233)) {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
} else {
tmp = (t_0 / (1.0 / x)) / (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 <= (-1.92d+149)) then
tmp = t_0 / (y + x)
else if (x <= (-260000.0d0)) then
tmp = y / ((y + x) * (y + x))
else if ((x <= (-5.8d-19)) .or. (.not. (x <= 6.4d-233))) then
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
else
tmp = (t_0 / (1.0d0 / x)) / (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 <= -1.92e+149) {
tmp = t_0 / (y + x);
} else if (x <= -260000.0) {
tmp = y / ((y + x) * (y + x));
} else if ((x <= -5.8e-19) || !(x <= 6.4e-233)) {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
} else {
tmp = (t_0 / (1.0 / x)) / (y + x);
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if x <= -1.92e+149: tmp = t_0 / (y + x) elif x <= -260000.0: tmp = y / ((y + x) * (y + x)) elif (x <= -5.8e-19) or not (x <= 6.4e-233): tmp = (x / (y + (x + (x + 1.0)))) / (y + x) else: tmp = (t_0 / (1.0 / x)) / (y + x) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (x <= -1.92e+149) tmp = Float64(t_0 / Float64(y + x)); elseif (x <= -260000.0) tmp = Float64(y / Float64(Float64(y + x) * Float64(y + x))); elseif ((x <= -5.8e-19) || !(x <= 6.4e-233)) tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); else tmp = Float64(Float64(t_0 / Float64(1.0 / x)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (y + x); tmp = 0.0; if (x <= -1.92e+149) tmp = t_0 / (y + x); elseif (x <= -260000.0) tmp = y / ((y + x) * (y + x)); elseif ((x <= -5.8e-19) || ~((x <= 6.4e-233))) tmp = (x / (y + (x + (x + 1.0)))) / (y + x); else tmp = (t_0 / (1.0 / x)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[x, -1.92e+149], N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -260000.0], N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[x, -5.8e-19], N[Not[LessEqual[x, 6.4e-233]], $MachinePrecision]], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$0 / N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -1.92 \cdot 10^{+149}:\\
\;\;\;\;\frac{t\_0}{y + x}\\
\mathbf{elif}\;x \leq -260000:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;x \leq -5.8 \cdot 10^{-19} \lor \neg \left(x \leq 6.4 \cdot 10^{-233}\right):\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{t\_0}{\frac{1}{x}}}{y + x}\\
\end{array}
\end{array}
if x < -1.91999999999999996e149Initial program 64.8%
times-frac80.1%
+-commutative80.1%
+-commutative80.1%
+-commutative80.1%
times-frac64.8%
associate-*l/78.0%
*-commutative78.0%
*-commutative78.0%
distribute-rgt1-in0.6%
fma-def78.0%
+-commutative78.0%
+-commutative78.0%
cube-unmult78.0%
+-commutative78.0%
Simplified78.0%
associate-*r/64.8%
fma-udef0.2%
cube-mult0.2%
distribute-rgt1-in64.8%
associate-+r+64.8%
*-commutative64.8%
frac-times80.1%
associate-/r*99.9%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 89.0%
if -1.91999999999999996e149 < x < -2.6e5Initial program 76.1%
associate-/r*80.1%
*-commutative80.1%
+-commutative80.1%
+-commutative80.1%
associate-*l/92.4%
+-commutative92.4%
associate-*r/92.4%
remove-double-neg92.4%
+-commutative92.4%
+-commutative92.4%
remove-double-neg92.4%
+-commutative92.4%
associate-+l+92.4%
Simplified92.4%
Taylor expanded in x around inf 88.6%
if -2.6e5 < x < -5.8e-19 or 6.3999999999999997e-233 < x Initial program 65.3%
times-frac88.4%
+-commutative88.4%
+-commutative88.4%
+-commutative88.4%
times-frac65.3%
associate-*l/82.5%
*-commutative82.5%
*-commutative82.5%
distribute-rgt1-in74.8%
fma-def82.5%
+-commutative82.5%
+-commutative82.5%
cube-unmult82.5%
+-commutative82.5%
Simplified82.5%
associate-*r/65.3%
fma-udef59.3%
cube-mult59.3%
distribute-rgt1-in65.3%
associate-+r+65.3%
*-commutative65.3%
frac-times88.3%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times98.8%
*-un-lft-identity98.8%
+-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in y around -inf 50.4%
mul-1-neg50.4%
unsub-neg50.4%
neg-mul-150.4%
+-commutative50.4%
unsub-neg50.4%
distribute-lft-in50.4%
metadata-eval50.4%
neg-mul-150.4%
unsub-neg50.4%
Simplified50.4%
if -5.8e-19 < x < 6.3999999999999997e-233Initial program 63.4%
times-frac83.5%
+-commutative83.5%
+-commutative83.5%
+-commutative83.5%
times-frac63.4%
associate-*l/83.6%
*-commutative83.6%
*-commutative83.6%
distribute-rgt1-in69.7%
fma-def83.6%
+-commutative83.6%
+-commutative83.6%
cube-unmult83.6%
+-commutative83.6%
Simplified83.6%
associate-*r/63.5%
fma-udef49.6%
cube-mult49.5%
distribute-rgt1-in63.4%
associate-+r+63.4%
*-commutative63.4%
frac-times83.5%
associate-/r*99.7%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.8%
un-div-inv99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 99.8%
+-commutative99.8%
Simplified99.8%
Taylor expanded in y around 0 88.6%
Final simplification71.2%
(FPCore (x y)
:precision binary64
(if (<= y 5.5e-305)
(/ (/ y (+ x 1.0)) (+ y x))
(if (<= y 1.9e-161)
(/ (/ (/ y (+ y x)) (/ 1.0 x)) (+ y x))
(if (<= y 0.106)
(* (/ x (+ x 1.0)) (/ y (* (+ y x) (+ y x))))
(/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x))))))
double code(double x, double y) {
double tmp;
if (y <= 5.5e-305) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 1.9e-161) {
tmp = ((y / (y + x)) / (1.0 / x)) / (y + x);
} else if (y <= 0.106) {
tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + (x + 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 (y <= 5.5d-305) then
tmp = (y / (x + 1.0d0)) / (y + x)
else if (y <= 1.9d-161) then
tmp = ((y / (y + x)) / (1.0d0 / x)) / (y + x)
else if (y <= 0.106d0) then
tmp = (x / (x + 1.0d0)) * (y / ((y + x) * (y + x)))
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.5e-305) {
tmp = (y / (x + 1.0)) / (y + x);
} else if (y <= 1.9e-161) {
tmp = ((y / (y + x)) / (1.0 / x)) / (y + x);
} else if (y <= 0.106) {
tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.5e-305: tmp = (y / (x + 1.0)) / (y + x) elif y <= 1.9e-161: tmp = ((y / (y + x)) / (1.0 / x)) / (y + x) elif y <= 0.106: tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x))) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.5e-305) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); elseif (y <= 1.9e-161) tmp = Float64(Float64(Float64(y / Float64(y + x)) / Float64(1.0 / x)) / Float64(y + x)); elseif (y <= 0.106) tmp = Float64(Float64(x / Float64(x + 1.0)) * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.5e-305) tmp = (y / (x + 1.0)) / (y + x); elseif (y <= 1.9e-161) tmp = ((y / (y + x)) / (1.0 / x)) / (y + x); elseif (y <= 0.106) tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x))); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.5e-305], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e-161], N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(1.0 / x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.106], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.5 \cdot 10^{-305}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{-161}:\\
\;\;\;\;\frac{\frac{\frac{y}{y + x}}{\frac{1}{x}}}{y + x}\\
\mathbf{elif}\;y \leq 0.106:\\
\;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 5.5e-305Initial program 66.5%
times-frac89.1%
+-commutative89.1%
+-commutative89.1%
+-commutative89.1%
times-frac66.5%
associate-*l/85.3%
*-commutative85.3%
*-commutative85.3%
distribute-rgt1-in53.5%
fma-def85.3%
+-commutative85.3%
+-commutative85.3%
cube-unmult85.3%
+-commutative85.3%
Simplified85.3%
associate-*r/66.5%
fma-udef41.0%
cube-mult41.1%
distribute-rgt1-in66.5%
associate-+r+66.5%
*-commutative66.5%
frac-times89.1%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 53.6%
+-commutative53.6%
Simplified53.6%
if 5.5e-305 < y < 1.9000000000000001e-161Initial program 39.6%
times-frac60.8%
+-commutative60.8%
+-commutative60.8%
+-commutative60.8%
times-frac39.6%
associate-*l/60.8%
*-commutative60.8%
*-commutative60.8%
distribute-rgt1-in53.1%
fma-def60.8%
+-commutative60.8%
+-commutative60.8%
cube-unmult60.8%
+-commutative60.8%
Simplified60.8%
associate-*r/39.6%
fma-udef31.9%
cube-mult31.9%
distribute-rgt1-in39.6%
associate-+r+39.6%
*-commutative39.6%
frac-times60.8%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.9%
un-div-inv99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 90.9%
+-commutative90.9%
Simplified90.9%
Taylor expanded in y around 0 90.9%
if 1.9000000000000001e-161 < y < 0.105999999999999997Initial program 83.9%
associate-/r*84.1%
*-commutative84.1%
+-commutative84.1%
+-commutative84.1%
associate-*l/99.5%
+-commutative99.5%
associate-*r/99.5%
remove-double-neg99.5%
+-commutative99.5%
+-commutative99.5%
remove-double-neg99.5%
+-commutative99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in y around 0 99.5%
+-commutative99.5%
Simplified99.5%
if 0.105999999999999997 < y Initial program 63.7%
times-frac81.5%
+-commutative81.5%
+-commutative81.5%
+-commutative81.5%
times-frac63.7%
associate-*l/75.4%
*-commutative75.4%
*-commutative75.4%
distribute-rgt1-in69.9%
fma-def75.4%
+-commutative75.4%
+-commutative75.4%
cube-unmult75.4%
+-commutative75.4%
Simplified75.4%
associate-*r/63.8%
fma-udef61.9%
cube-mult61.8%
distribute-rgt1-in63.7%
associate-+r+63.7%
*-commutative63.7%
frac-times81.6%
associate-/r*99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times98.8%
*-un-lft-identity98.8%
+-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in y around -inf 73.8%
mul-1-neg73.8%
unsub-neg73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
distribute-lft-in73.8%
metadata-eval73.8%
neg-mul-173.8%
unsub-neg73.8%
Simplified73.8%
Final simplification69.2%
(FPCore (x y)
:precision binary64
(if (<= y 3e-17)
(/ (* (/ y (+ y x)) (/ x (+ x 1.0))) (+ y x))
(if (<= y 4.6e+136)
(* (/ y (* (+ y x) (+ y x))) (/ x (+ x (+ y 1.0))))
(/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 3e-17) {
tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x);
} else if (y <= 4.6e+136) {
tmp = (y / ((y + x) * (y + x))) * (x / (x + (y + 1.0)));
} else {
tmp = (x / (y + (x + (x + 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 (y <= 3d-17) then
tmp = ((y / (y + x)) * (x / (x + 1.0d0))) / (y + x)
else if (y <= 4.6d+136) then
tmp = (y / ((y + x) * (y + x))) * (x / (x + (y + 1.0d0)))
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 3e-17) {
tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x);
} else if (y <= 4.6e+136) {
tmp = (y / ((y + x) * (y + x))) * (x / (x + (y + 1.0)));
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 3e-17: tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x) elif y <= 4.6e+136: tmp = (y / ((y + x) * (y + x))) * (x / (x + (y + 1.0))) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 3e-17) tmp = Float64(Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(x + 1.0))) / Float64(y + x)); elseif (y <= 4.6e+136) tmp = Float64(Float64(y / Float64(Float64(y + x) * Float64(y + x))) * Float64(x / Float64(x + Float64(y + 1.0)))); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 3e-17) tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x); elseif (y <= 4.6e+136) tmp = (y / ((y + x) * (y + x))) * (x / (x + (y + 1.0))); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 3e-17], N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+136], N[(N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3 \cdot 10^{-17}:\\
\;\;\;\;\frac{\frac{y}{y + x} \cdot \frac{x}{x + 1}}{y + x}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+136}:\\
\;\;\;\;\frac{y}{\left(y + x\right) \cdot \left(y + x\right)} \cdot \frac{x}{x + \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 3.00000000000000006e-17Initial program 66.2%
times-frac87.4%
+-commutative87.4%
+-commutative87.4%
+-commutative87.4%
times-frac66.2%
associate-*l/84.9%
*-commutative84.9%
*-commutative84.9%
distribute-rgt1-in57.4%
fma-def84.9%
+-commutative84.9%
+-commutative84.9%
cube-unmult84.9%
+-commutative84.9%
Simplified84.9%
associate-*r/66.2%
fma-udef43.0%
cube-mult43.0%
distribute-rgt1-in66.2%
associate-+r+66.2%
*-commutative66.2%
frac-times87.3%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 81.5%
+-commutative81.5%
Simplified81.5%
if 3.00000000000000006e-17 < y < 4.6e136Initial program 71.6%
associate-/r*81.3%
*-commutative81.3%
+-commutative81.3%
+-commutative81.3%
associate-*l/88.3%
+-commutative88.3%
associate-*r/88.6%
remove-double-neg88.6%
+-commutative88.6%
+-commutative88.6%
remove-double-neg88.6%
+-commutative88.6%
associate-+l+88.6%
Simplified88.6%
if 4.6e136 < y Initial program 57.8%
times-frac75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
times-frac57.8%
associate-*l/75.9%
*-commutative75.9%
*-commutative75.9%
distribute-rgt1-in72.5%
fma-def75.9%
+-commutative75.9%
+-commutative75.9%
cube-unmult75.9%
+-commutative75.9%
Simplified75.9%
associate-*r/57.8%
fma-udef57.8%
cube-mult57.8%
distribute-rgt1-in57.8%
associate-+r+57.8%
*-commutative57.8%
frac-times75.9%
associate-/r*99.9%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.9%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
neg-mul-183.4%
+-commutative83.4%
unsub-neg83.4%
distribute-lft-in83.4%
metadata-eval83.4%
neg-mul-183.4%
unsub-neg83.4%
Simplified83.4%
Final simplification82.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (+ y x))))
(if (<= x -1.92e+149)
(/ t_0 (+ y x))
(if (<= x -180000.0)
(* (/ x (+ x 1.0)) (/ y (* (+ y x) (+ y x))))
(* t_0 (/ (/ x (+ y 1.0)) (+ y x)))))))
double code(double x, double y) {
double t_0 = y / (y + x);
double tmp;
if (x <= -1.92e+149) {
tmp = t_0 / (y + x);
} else if (x <= -180000.0) {
tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = t_0 * ((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 <= (-1.92d+149)) then
tmp = t_0 / (y + x)
else if (x <= (-180000.0d0)) then
tmp = (x / (x + 1.0d0)) * (y / ((y + x) * (y + x)))
else
tmp = t_0 * ((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 <= -1.92e+149) {
tmp = t_0 / (y + x);
} else if (x <= -180000.0) {
tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x)));
} else {
tmp = t_0 * ((x / (y + 1.0)) / (y + x));
}
return tmp;
}
def code(x, y): t_0 = y / (y + x) tmp = 0 if x <= -1.92e+149: tmp = t_0 / (y + x) elif x <= -180000.0: tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x))) else: tmp = t_0 * ((x / (y + 1.0)) / (y + x)) return tmp
function code(x, y) t_0 = Float64(y / Float64(y + x)) tmp = 0.0 if (x <= -1.92e+149) tmp = Float64(t_0 / Float64(y + x)); elseif (x <= -180000.0) tmp = Float64(Float64(x / Float64(x + 1.0)) * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(t_0 * Float64(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 <= -1.92e+149) tmp = t_0 / (y + x); elseif (x <= -180000.0) tmp = (x / (x + 1.0)) * (y / ((y + x) * (y + x))); else tmp = t_0 * ((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, -1.92e+149], N[(t$95$0 / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -180000.0], N[(N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{y + x}\\
\mathbf{if}\;x \leq -1.92 \cdot 10^{+149}:\\
\;\;\;\;\frac{t\_0}{y + x}\\
\mathbf{elif}\;x \leq -180000:\\
\;\;\;\;\frac{x}{x + 1} \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if x < -1.91999999999999996e149Initial program 64.8%
times-frac80.1%
+-commutative80.1%
+-commutative80.1%
+-commutative80.1%
times-frac64.8%
associate-*l/78.0%
*-commutative78.0%
*-commutative78.0%
distribute-rgt1-in0.6%
fma-def78.0%
+-commutative78.0%
+-commutative78.0%
cube-unmult78.0%
+-commutative78.0%
Simplified78.0%
associate-*r/64.8%
fma-udef0.2%
cube-mult0.2%
distribute-rgt1-in64.8%
associate-+r+64.8%
*-commutative64.8%
frac-times80.1%
associate-/r*99.9%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in x around inf 89.0%
if -1.91999999999999996e149 < x < -1.8e5Initial program 76.1%
associate-/r*80.1%
*-commutative80.1%
+-commutative80.1%
+-commutative80.1%
associate-*l/92.4%
+-commutative92.4%
associate-*r/92.4%
remove-double-neg92.4%
+-commutative92.4%
+-commutative92.4%
remove-double-neg92.4%
+-commutative92.4%
associate-+l+92.4%
Simplified92.4%
Taylor expanded in y around 0 88.6%
+-commutative88.6%
Simplified88.6%
if -1.8e5 < x Initial program 64.6%
times-frac86.6%
+-commutative86.6%
+-commutative86.6%
+-commutative86.6%
times-frac64.6%
associate-*l/82.9%
*-commutative82.9%
*-commutative82.9%
distribute-rgt1-in72.8%
fma-def82.9%
+-commutative82.9%
+-commutative82.9%
cube-unmult82.9%
+-commutative82.9%
Simplified82.9%
associate-*r/64.6%
fma-udef55.6%
cube-mult55.6%
distribute-rgt1-in64.6%
associate-+r+64.6%
*-commutative64.6%
frac-times86.4%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
un-div-inv99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in x around 0 79.3%
+-commutative79.3%
Simplified79.3%
div-inv79.3%
*-un-lft-identity79.3%
times-frac79.3%
/-rgt-identity79.3%
clear-num79.4%
+-commutative79.4%
Applied egg-rr79.4%
Final simplification81.9%
(FPCore (x y) :precision binary64 (if (<= y 4.6e+136) (* (/ y (+ y x)) (/ x (* (+ y x) (+ y (+ x 1.0))))) (/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 4.6e+136) {
tmp = (y / (y + x)) * (x / ((y + x) * (y + (x + 1.0))));
} else {
tmp = (x / (y + (x + (x + 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 (y <= 4.6d+136) then
tmp = (y / (y + x)) * (x / ((y + x) * (y + (x + 1.0d0))))
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.6e+136) {
tmp = (y / (y + x)) * (x / ((y + x) * (y + (x + 1.0))));
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.6e+136: tmp = (y / (y + x)) * (x / ((y + x) * (y + (x + 1.0)))) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.6e+136) tmp = Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(Float64(y + x) * Float64(y + Float64(x + 1.0))))); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.6e+136) tmp = (y / (y + x)) * (x / ((y + x) * (y + (x + 1.0)))); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.6e+136], N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(N[(y + x), $MachinePrecision] * N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.6 \cdot 10^{+136}:\\
\;\;\;\;\frac{y}{y + x} \cdot \frac{x}{\left(y + x\right) \cdot \left(y + \left(x + 1\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 4.6e136Initial program 66.9%
associate-+r+66.9%
*-commutative66.9%
associate-*l*66.9%
times-frac95.2%
associate-+r+95.2%
+-commutative95.2%
associate-+l+95.2%
Applied egg-rr95.2%
if 4.6e136 < y Initial program 57.8%
times-frac75.9%
+-commutative75.9%
+-commutative75.9%
+-commutative75.9%
times-frac57.8%
associate-*l/75.9%
*-commutative75.9%
*-commutative75.9%
distribute-rgt1-in72.5%
fma-def75.9%
+-commutative75.9%
+-commutative75.9%
cube-unmult75.9%
+-commutative75.9%
Simplified75.9%
associate-*r/57.8%
fma-udef57.8%
cube-mult57.8%
distribute-rgt1-in57.8%
associate-+r+57.8%
*-commutative57.8%
frac-times75.9%
associate-/r*99.9%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.9%
frac-times99.5%
*-un-lft-identity99.5%
+-commutative99.5%
Applied egg-rr99.5%
Taylor expanded in y around -inf 83.4%
mul-1-neg83.4%
unsub-neg83.4%
neg-mul-183.4%
+-commutative83.4%
unsub-neg83.4%
distribute-lft-in83.4%
metadata-eval83.4%
neg-mul-183.4%
unsub-neg83.4%
Simplified83.4%
Final simplification93.7%
(FPCore (x y) :precision binary64 (if (<= y 0.115) (/ (* (/ y (+ y x)) (/ x (+ x 1.0))) (+ y x)) (/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 0.115) {
tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x);
} else {
tmp = (x / (y + (x + (x + 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 (y <= 0.115d0) then
tmp = ((y / (y + x)) * (x / (x + 1.0d0))) / (y + x)
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 0.115) {
tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x);
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 0.115: tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 0.115) tmp = Float64(Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(x + 1.0))) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 0.115) tmp = ((y / (y + x)) * (x / (x + 1.0))) / (y + x); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 0.115], N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 0.115:\\
\;\;\;\;\frac{\frac{y}{y + x} \cdot \frac{x}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 0.115000000000000005Initial program 66.4%
times-frac87.5%
+-commutative87.5%
+-commutative87.5%
+-commutative87.5%
times-frac66.4%
associate-*l/84.9%
*-commutative84.9%
*-commutative84.9%
distribute-rgt1-in57.6%
fma-def84.9%
+-commutative84.9%
+-commutative84.9%
cube-unmult84.9%
+-commutative84.9%
Simplified84.9%
associate-*r/66.4%
fma-udef43.3%
cube-mult43.3%
distribute-rgt1-in66.4%
associate-+r+66.4%
*-commutative66.4%
frac-times87.4%
associate-/r*99.7%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 81.6%
+-commutative81.6%
Simplified81.6%
if 0.115000000000000005 < y Initial program 63.7%
times-frac81.5%
+-commutative81.5%
+-commutative81.5%
+-commutative81.5%
times-frac63.7%
associate-*l/75.4%
*-commutative75.4%
*-commutative75.4%
distribute-rgt1-in69.9%
fma-def75.4%
+-commutative75.4%
+-commutative75.4%
cube-unmult75.4%
+-commutative75.4%
Simplified75.4%
associate-*r/63.8%
fma-udef61.9%
cube-mult61.8%
distribute-rgt1-in63.7%
associate-+r+63.7%
*-commutative63.7%
frac-times81.6%
associate-/r*99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.8%
frac-times98.8%
*-un-lft-identity98.8%
+-commutative98.8%
Applied egg-rr98.8%
Taylor expanded in y around -inf 73.8%
mul-1-neg73.8%
unsub-neg73.8%
neg-mul-173.8%
+-commutative73.8%
unsub-neg73.8%
distribute-lft-in73.8%
metadata-eval73.8%
neg-mul-173.8%
unsub-neg73.8%
Simplified73.8%
Final simplification79.8%
(FPCore (x y) :precision binary64 (if (<= y 6.2e-50) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y (+ x (+ x 1.0)))) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + (x + (x + 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 (y <= 6.2d-50) then
tmp = (y / (x + 1.0d0)) / (y + x)
else
tmp = (x / (y + (x + (x + 1.0d0)))) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + (x + (x + 1.0)))) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.2e-50: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / (y + (x + (x + 1.0)))) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.2e-50) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(y + Float64(x + Float64(x + 1.0)))) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.2e-50) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / (y + (x + (x + 1.0)))) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.2e-50], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + N[(x + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + \left(x + \left(x + 1\right)\right)}}{y + x}\\
\end{array}
\end{array}
if y < 6.2000000000000004e-50Initial program 64.8%
times-frac86.5%
+-commutative86.5%
+-commutative86.5%
+-commutative86.5%
times-frac64.8%
associate-*l/83.8%
*-commutative83.8%
*-commutative83.8%
distribute-rgt1-in55.5%
fma-def83.8%
+-commutative83.8%
+-commutative83.8%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/64.8%
fma-udef41.1%
cube-mult41.1%
distribute-rgt1-in64.8%
associate-+r+64.8%
*-commutative64.8%
frac-times86.4%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 61.6%
+-commutative61.6%
Simplified61.6%
if 6.2000000000000004e-50 < y Initial program 67.9%
times-frac84.9%
+-commutative84.9%
+-commutative84.9%
+-commutative84.9%
times-frac67.9%
associate-*l/79.9%
*-commutative79.9%
*-commutative79.9%
distribute-rgt1-in72.8%
fma-def79.9%
+-commutative79.9%
+-commutative79.9%
cube-unmult79.9%
+-commutative79.9%
Simplified79.9%
associate-*r/68.0%
fma-udef63.8%
cube-mult63.7%
distribute-rgt1-in67.9%
associate-+r+67.9%
*-commutative67.9%
frac-times84.9%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
clear-num99.7%
frac-times99.0%
*-un-lft-identity99.0%
+-commutative99.0%
Applied egg-rr99.0%
Taylor expanded in y around -inf 68.5%
mul-1-neg68.5%
unsub-neg68.5%
neg-mul-168.5%
+-commutative68.5%
unsub-neg68.5%
distribute-lft-in68.5%
metadata-eval68.5%
neg-mul-168.5%
unsub-neg68.5%
Simplified68.5%
Final simplification63.6%
(FPCore (x y) :precision binary64 (if (<= y 5.6e-196) (/ y (+ y x)) (if (<= y 0.75) (- (/ x y) x) (* (/ 1.0 y) (/ x y)))))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (y + x);
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 5.6d-196) then
tmp = y / (y + x)
else if (y <= 0.75d0) then
tmp = (x / y) - x
else
tmp = (1.0d0 / y) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (y + x);
} else if (y <= 0.75) {
tmp = (x / y) - x;
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-196: tmp = y / (y + x) elif y <= 0.75: tmp = (x / y) - x else: tmp = (1.0 / y) * (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-196) tmp = Float64(y / Float64(y + x)); elseif (y <= 0.75) tmp = Float64(Float64(x / y) - x); else tmp = Float64(Float64(1.0 / y) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-196) tmp = y / (y + x); elseif (y <= 0.75) tmp = (x / y) - x; else tmp = (1.0 / y) * (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-196], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.75], N[(N[(x / y), $MachinePrecision] - x), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 0.75:\\
\;\;\;\;\frac{x}{y} - x\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 5.5999999999999997e-196Initial program 62.1%
times-frac85.2%
+-commutative85.2%
+-commutative85.2%
+-commutative85.2%
times-frac62.1%
associate-*l/81.9%
*-commutative81.9%
*-commutative81.9%
distribute-rgt1-in53.2%
fma-def81.9%
+-commutative81.9%
+-commutative81.9%
cube-unmult81.9%
+-commutative81.9%
Simplified81.9%
associate-*r/62.1%
fma-udef38.8%
cube-mult38.9%
distribute-rgt1-in62.1%
associate-+r+62.1%
*-commutative62.1%
frac-times85.1%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.8%
un-div-inv99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in y around 0 34.7%
if 5.5999999999999997e-196 < y < 0.75Initial program 81.6%
associate-/r*81.7%
*-commutative81.7%
+-commutative81.7%
+-commutative81.7%
associate-*l/95.2%
+-commutative95.2%
associate-*r/95.2%
remove-double-neg95.2%
+-commutative95.2%
+-commutative95.2%
remove-double-neg95.2%
+-commutative95.2%
associate-+l+95.2%
Simplified95.2%
Taylor expanded in x around 0 35.1%
+-commutative35.1%
Simplified35.1%
Taylor expanded in y around 0 33.9%
neg-mul-133.9%
+-commutative33.9%
unsub-neg33.9%
Simplified33.9%
if 0.75 < y Initial program 63.1%
associate-/r*67.8%
*-commutative67.8%
+-commutative67.8%
+-commutative67.8%
associate-*l/81.2%
+-commutative81.2%
associate-*r/81.3%
remove-double-neg81.3%
+-commutative81.3%
+-commutative81.3%
remove-double-neg81.3%
+-commutative81.3%
associate-+l+81.3%
Simplified81.3%
Taylor expanded in y around inf 75.1%
Taylor expanded in y around inf 70.3%
Final simplification42.9%
(FPCore (x y) :precision binary64 (if (<= y 5.6e-196) (/ y (+ y x)) (if (<= y 5e+25) (/ x (* y (+ y 1.0))) (* (/ 1.0 y) (/ x y)))))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (y + x);
} else if (y <= 5e+25) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 5.6d-196) then
tmp = y / (y + x)
else if (y <= 5d+25) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (1.0d0 / y) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (y + x);
} else if (y <= 5e+25) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-196: tmp = y / (y + x) elif y <= 5e+25: tmp = x / (y * (y + 1.0)) else: tmp = (1.0 / y) * (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-196) tmp = Float64(y / Float64(y + x)); elseif (y <= 5e+25) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(1.0 / y) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-196) tmp = y / (y + x); elseif (y <= 5e+25) tmp = x / (y * (y + 1.0)); else tmp = (1.0 / y) * (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-196], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5e+25], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{elif}\;y \leq 5 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 5.5999999999999997e-196Initial program 62.1%
times-frac85.2%
+-commutative85.2%
+-commutative85.2%
+-commutative85.2%
times-frac62.1%
associate-*l/81.9%
*-commutative81.9%
*-commutative81.9%
distribute-rgt1-in53.2%
fma-def81.9%
+-commutative81.9%
+-commutative81.9%
cube-unmult81.9%
+-commutative81.9%
Simplified81.9%
associate-*r/62.1%
fma-udef38.8%
cube-mult38.9%
distribute-rgt1-in62.1%
associate-+r+62.1%
*-commutative62.1%
frac-times85.1%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.8%
un-div-inv99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in y around 0 34.7%
if 5.5999999999999997e-196 < y < 5.00000000000000024e25Initial program 83.4%
associate-/r*83.5%
*-commutative83.5%
+-commutative83.5%
+-commutative83.5%
associate-*l/95.6%
+-commutative95.6%
associate-*r/95.6%
remove-double-neg95.6%
+-commutative95.6%
+-commutative95.6%
remove-double-neg95.6%
+-commutative95.6%
associate-+l+95.6%
Simplified95.6%
Taylor expanded in x around 0 39.3%
+-commutative39.3%
Simplified39.3%
if 5.00000000000000024e25 < y Initial program 59.8%
associate-/r*64.9%
*-commutative64.9%
+-commutative64.9%
+-commutative64.9%
associate-*l/79.6%
+-commutative79.6%
associate-*r/79.7%
remove-double-neg79.7%
+-commutative79.7%
+-commutative79.7%
remove-double-neg79.7%
+-commutative79.7%
associate-+l+79.7%
Simplified79.7%
Taylor expanded in y around inf 74.6%
Taylor expanded in y around inf 71.2%
Final simplification43.4%
(FPCore (x y) :precision binary64 (if (<= y 6.2e-50) (/ y (* x (+ x 1.0))) (if (<= y 5.6e+25) (/ x (* y (+ y 1.0))) (* (/ 1.0 y) (/ x y)))))
double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = y / (x * (x + 1.0));
} else if (y <= 5.6e+25) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6.2d-50) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 5.6d+25) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (1.0d0 / y) * (x / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = y / (x * (x + 1.0));
} else if (y <= 5.6e+25) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (1.0 / y) * (x / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.2e-50: tmp = y / (x * (x + 1.0)) elif y <= 5.6e+25: tmp = x / (y * (y + 1.0)) else: tmp = (1.0 / y) * (x / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.2e-50) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 5.6e+25) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(1.0 / y) * Float64(x / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.2e-50) tmp = y / (x * (x + 1.0)); elseif (y <= 5.6e+25) tmp = x / (y * (y + 1.0)); else tmp = (1.0 / y) * (x / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.2e-50], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.6e+25], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(1.0 / y), $MachinePrecision] * N[(x / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 5.6 \cdot 10^{+25}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{y} \cdot \frac{x}{y}\\
\end{array}
\end{array}
if y < 6.2000000000000004e-50Initial program 64.8%
associate-/r*67.1%
*-commutative67.1%
+-commutative67.1%
+-commutative67.1%
associate-*l/86.5%
+-commutative86.5%
associate-*r/86.4%
remove-double-neg86.4%
+-commutative86.4%
+-commutative86.4%
remove-double-neg86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 60.4%
if 6.2000000000000004e-50 < y < 5.6000000000000003e25Initial program 90.3%
associate-/r*90.5%
*-commutative90.5%
+-commutative90.5%
+-commutative90.5%
associate-*l/99.2%
+-commutative99.2%
associate-*r/99.3%
remove-double-neg99.3%
+-commutative99.3%
+-commutative99.3%
remove-double-neg99.3%
+-commutative99.3%
associate-+l+99.3%
Simplified99.3%
Taylor expanded in x around 0 55.1%
+-commutative55.1%
Simplified55.1%
if 5.6000000000000003e25 < y Initial program 59.8%
associate-/r*64.9%
*-commutative64.9%
+-commutative64.9%
+-commutative64.9%
associate-*l/79.6%
+-commutative79.6%
associate-*r/79.7%
remove-double-neg79.7%
+-commutative79.7%
+-commutative79.7%
remove-double-neg79.7%
+-commutative79.7%
associate-+l+79.7%
Simplified79.7%
Taylor expanded in y around inf 74.6%
Taylor expanded in y around inf 71.2%
Final simplification62.3%
(FPCore (x y) :precision binary64 (if (<= y 4.8e-50) (/ y (* x (+ x 1.0))) (if (<= y 1.04e+15) (/ x (* y (+ y 1.0))) (/ (/ x y) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 4.8e-50) {
tmp = y / (x * (x + 1.0));
} else if (y <= 1.04e+15) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 4.8d-50) then
tmp = y / (x * (x + 1.0d0))
else if (y <= 1.04d+15) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.8e-50) {
tmp = y / (x * (x + 1.0));
} else if (y <= 1.04e+15) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.8e-50: tmp = y / (x * (x + 1.0)) elif y <= 1.04e+15: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.8e-50) tmp = Float64(y / Float64(x * Float64(x + 1.0))); elseif (y <= 1.04e+15) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.8e-50) tmp = y / (x * (x + 1.0)); elseif (y <= 1.04e+15) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.8e-50], N[(y / N[(x * N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.04e+15], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.8 \cdot 10^{-50}:\\
\;\;\;\;\frac{y}{x \cdot \left(x + 1\right)}\\
\mathbf{elif}\;y \leq 1.04 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\end{array}
if y < 4.80000000000000004e-50Initial program 64.8%
associate-/r*67.1%
*-commutative67.1%
+-commutative67.1%
+-commutative67.1%
associate-*l/86.5%
+-commutative86.5%
associate-*r/86.4%
remove-double-neg86.4%
+-commutative86.4%
+-commutative86.4%
remove-double-neg86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 60.4%
if 4.80000000000000004e-50 < y < 1.04e15Initial program 88.7%
associate-/r*89.0%
*-commutative89.0%
+-commutative89.0%
+-commutative89.0%
associate-*l/99.4%
+-commutative99.4%
associate-*r/99.4%
remove-double-neg99.4%
+-commutative99.4%
+-commutative99.4%
remove-double-neg99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 48.1%
+-commutative48.1%
Simplified48.1%
if 1.04e15 < y Initial program 61.8%
times-frac80.6%
+-commutative80.6%
+-commutative80.6%
+-commutative80.6%
times-frac61.8%
associate-*l/74.2%
*-commutative74.2%
*-commutative74.2%
distribute-rgt1-in68.4%
fma-def74.2%
+-commutative74.2%
+-commutative74.2%
cube-unmult74.1%
+-commutative74.1%
Simplified74.1%
associate-*r/61.9%
fma-udef59.9%
cube-mult59.8%
distribute-rgt1-in61.8%
associate-+r+61.8%
*-commutative61.8%
frac-times80.6%
associate-/r*99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 72.9%
Final simplification62.4%
(FPCore (x y) :precision binary64 (if (<= y 3.95e-50) (/ (/ y x) (+ x 1.0)) (if (<= y 1.3e+15) (/ x (* y (+ y 1.0))) (/ (/ x y) (+ y x)))))
double code(double x, double y) {
double tmp;
if (y <= 3.95e-50) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.3e+15) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 3.95d-50) then
tmp = (y / x) / (x + 1.0d0)
else if (y <= 1.3d+15) then
tmp = x / (y * (y + 1.0d0))
else
tmp = (x / y) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 3.95e-50) {
tmp = (y / x) / (x + 1.0);
} else if (y <= 1.3e+15) {
tmp = x / (y * (y + 1.0));
} else {
tmp = (x / y) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 3.95e-50: tmp = (y / x) / (x + 1.0) elif y <= 1.3e+15: tmp = x / (y * (y + 1.0)) else: tmp = (x / y) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 3.95e-50) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); elseif (y <= 1.3e+15) tmp = Float64(x / Float64(y * Float64(y + 1.0))); else tmp = Float64(Float64(x / y) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 3.95e-50) tmp = (y / x) / (x + 1.0); elseif (y <= 1.3e+15) tmp = x / (y * (y + 1.0)); else tmp = (x / y) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 3.95e-50], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.3e+15], N[(x / N[(y * N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.95 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{elif}\;y \leq 1.3 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y}}{y + x}\\
\end{array}
\end{array}
if y < 3.9500000000000001e-50Initial program 64.8%
associate-/r*67.1%
*-commutative67.1%
+-commutative67.1%
+-commutative67.1%
associate-*l/86.5%
+-commutative86.5%
associate-*r/86.4%
remove-double-neg86.4%
+-commutative86.4%
+-commutative86.4%
remove-double-neg86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 60.4%
associate-/r*61.1%
+-commutative61.1%
Simplified61.1%
if 3.9500000000000001e-50 < y < 1.3e15Initial program 88.7%
associate-/r*89.0%
*-commutative89.0%
+-commutative89.0%
+-commutative89.0%
associate-*l/99.4%
+-commutative99.4%
associate-*r/99.4%
remove-double-neg99.4%
+-commutative99.4%
+-commutative99.4%
remove-double-neg99.4%
+-commutative99.4%
associate-+l+99.4%
Simplified99.4%
Taylor expanded in x around 0 48.1%
+-commutative48.1%
Simplified48.1%
if 1.3e15 < y Initial program 61.8%
times-frac80.6%
+-commutative80.6%
+-commutative80.6%
+-commutative80.6%
times-frac61.8%
associate-*l/74.2%
*-commutative74.2%
*-commutative74.2%
distribute-rgt1-in68.4%
fma-def74.2%
+-commutative74.2%
+-commutative74.2%
cube-unmult74.1%
+-commutative74.1%
Simplified74.1%
associate-*r/61.9%
fma-udef59.9%
cube-mult59.8%
distribute-rgt1-in61.8%
associate-+r+61.8%
*-commutative61.8%
frac-times80.6%
associate-/r*99.8%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in y around inf 72.9%
Final simplification62.9%
(FPCore (x y) :precision binary64 (* (/ y (+ y x)) (/ (/ x (+ y (+ x 1.0))) (+ y x))))
double code(double x, double y) {
return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (y / (y + x)) * ((x / (y + (x + 1.0d0))) / (y + x))
end function
public static double code(double x, double y) {
return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x));
}
def code(x, y): return (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x))
function code(x, y) return Float64(Float64(y / Float64(y + x)) * Float64(Float64(x / Float64(y + Float64(x + 1.0))) / Float64(y + x))) end
function tmp = code(x, y) tmp = (y / (y + x)) * ((x / (y + (x + 1.0))) / (y + x)); end
code[x_, y_] := N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + N[(x + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{y}{y + x} \cdot \frac{\frac{x}{y + \left(x + 1\right)}}{y + x}
\end{array}
Initial program 65.8%
associate-+r+65.8%
*-commutative65.8%
frac-times86.0%
associate-*l/78.1%
times-frac99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Final simplification99.8%
(FPCore (x y) :precision binary64 (if (<= y 7.4e-53) (/ (/ y (+ x 1.0)) (+ y x)) (* (/ x (+ x (+ y 1.0))) (/ 1.0 y))))
double code(double x, double y) {
double tmp;
if (y <= 7.4e-53) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (x + (y + 1.0))) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 7.4d-53) then
tmp = (y / (x + 1.0d0)) / (y + x)
else
tmp = (x / (x + (y + 1.0d0))) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 7.4e-53) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (x + (y + 1.0))) * (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 7.4e-53: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / (x + (y + 1.0))) * (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 7.4e-53) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(x + Float64(y + 1.0))) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 7.4e-53) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / (x + (y + 1.0))) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 7.4e-53], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 7.4 \cdot 10^{-53}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{x + \left(y + 1\right)} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 7.39999999999999965e-53Initial program 64.8%
times-frac86.5%
+-commutative86.5%
+-commutative86.5%
+-commutative86.5%
times-frac64.8%
associate-*l/83.8%
*-commutative83.8%
*-commutative83.8%
distribute-rgt1-in55.5%
fma-def83.8%
+-commutative83.8%
+-commutative83.8%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/64.8%
fma-udef41.1%
cube-mult41.1%
distribute-rgt1-in64.8%
associate-+r+64.8%
*-commutative64.8%
frac-times86.4%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 61.6%
+-commutative61.6%
Simplified61.6%
if 7.39999999999999965e-53 < y Initial program 67.9%
associate-/r*71.7%
*-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l/84.8%
+-commutative84.8%
associate-*r/84.9%
remove-double-neg84.9%
+-commutative84.9%
+-commutative84.9%
remove-double-neg84.9%
+-commutative84.9%
associate-+l+84.9%
Simplified84.9%
Taylor expanded in y around inf 67.3%
Final simplification63.3%
(FPCore (x y) :precision binary64 (if (<= y 6.2e-50) (/ (/ y x) (+ x 1.0)) (* (/ x (+ y 1.0)) (/ 1.0 y))))
double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) * (1.0 / y);
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 6.2d-50) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + 1.0d0)) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 6.2e-50) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) * (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 6.2e-50: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) * (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 6.2e-50) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 1.0)) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 6.2e-50) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + 1.0)) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 6.2e-50], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 6.2 \cdot 10^{-50}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + 1} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 6.2000000000000004e-50Initial program 64.8%
associate-/r*67.1%
*-commutative67.1%
+-commutative67.1%
+-commutative67.1%
associate-*l/86.5%
+-commutative86.5%
associate-*r/86.4%
remove-double-neg86.4%
+-commutative86.4%
+-commutative86.4%
remove-double-neg86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 60.4%
associate-/r*61.1%
+-commutative61.1%
Simplified61.1%
if 6.2000000000000004e-50 < y Initial program 67.9%
associate-/r*71.7%
*-commutative71.7%
+-commutative71.7%
+-commutative71.7%
associate-*l/84.8%
+-commutative84.8%
associate-*r/84.9%
remove-double-neg84.9%
+-commutative84.9%
+-commutative84.9%
remove-double-neg84.9%
+-commutative84.9%
associate-+l+84.9%
Simplified84.9%
Taylor expanded in x around 0 64.5%
+-commutative64.5%
Simplified64.5%
*-un-lft-identity64.5%
times-frac66.9%
Applied egg-rr66.9%
*-commutative66.9%
Simplified66.9%
Final simplification62.8%
(FPCore (x y) :precision binary64 (if (<= y 4.9e-51) (/ (/ y x) (+ x 1.0)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 4.9e-51) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (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) :: tmp
if (y <= 4.9d-51) then
tmp = (y / x) / (x + 1.0d0)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 4.9e-51) {
tmp = (y / x) / (x + 1.0);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 4.9e-51: tmp = (y / x) / (x + 1.0) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 4.9e-51) tmp = Float64(Float64(y / x) / Float64(x + 1.0)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 4.9e-51) tmp = (y / x) / (x + 1.0); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 4.9e-51], N[(N[(y / x), $MachinePrecision] / N[(x + 1.0), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 4.9 \cdot 10^{-51}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + 1}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 4.89999999999999974e-51Initial program 64.8%
associate-/r*67.1%
*-commutative67.1%
+-commutative67.1%
+-commutative67.1%
associate-*l/86.5%
+-commutative86.5%
associate-*r/86.4%
remove-double-neg86.4%
+-commutative86.4%
+-commutative86.4%
remove-double-neg86.4%
+-commutative86.4%
associate-+l+86.4%
Simplified86.4%
Taylor expanded in y around 0 60.4%
associate-/r*61.1%
+-commutative61.1%
Simplified61.1%
if 4.89999999999999974e-51 < y Initial program 67.9%
times-frac84.9%
+-commutative84.9%
+-commutative84.9%
+-commutative84.9%
times-frac67.9%
associate-*l/79.9%
*-commutative79.9%
*-commutative79.9%
distribute-rgt1-in72.8%
fma-def79.9%
+-commutative79.9%
+-commutative79.9%
cube-unmult79.9%
+-commutative79.9%
Simplified79.9%
associate-*r/68.0%
fma-udef63.8%
cube-mult63.7%
distribute-rgt1-in67.9%
associate-+r+67.9%
*-commutative67.9%
frac-times84.9%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 67.3%
+-commutative67.3%
Simplified67.3%
Final simplification63.0%
(FPCore (x y) :precision binary64 (if (<= y 3.5e-51) (/ (/ y (+ x 1.0)) (+ y x)) (/ (/ x (+ y 1.0)) (+ y x))))
double code(double x, double y) {
double tmp;
if (y <= 3.5e-51) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (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) :: tmp
if (y <= 3.5d-51) then
tmp = (y / (x + 1.0d0)) / (y + x)
else
tmp = (x / (y + 1.0d0)) / (y + x)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 3.5e-51) {
tmp = (y / (x + 1.0)) / (y + x);
} else {
tmp = (x / (y + 1.0)) / (y + x);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 3.5e-51: tmp = (y / (x + 1.0)) / (y + x) else: tmp = (x / (y + 1.0)) / (y + x) return tmp
function code(x, y) tmp = 0.0 if (y <= 3.5e-51) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(y + x)); else tmp = Float64(Float64(x / Float64(y + 1.0)) / Float64(y + x)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 3.5e-51) tmp = (y / (x + 1.0)) / (y + x); else tmp = (x / (y + 1.0)) / (y + x); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 3.5e-51], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + 1.0), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.5 \cdot 10^{-51}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{y + 1}}{y + x}\\
\end{array}
\end{array}
if y < 3.4999999999999997e-51Initial program 64.8%
times-frac86.5%
+-commutative86.5%
+-commutative86.5%
+-commutative86.5%
times-frac64.8%
associate-*l/83.8%
*-commutative83.8%
*-commutative83.8%
distribute-rgt1-in55.5%
fma-def83.8%
+-commutative83.8%
+-commutative83.8%
cube-unmult83.8%
+-commutative83.8%
Simplified83.8%
associate-*r/64.8%
fma-udef41.1%
cube-mult41.1%
distribute-rgt1-in64.8%
associate-+r+64.8%
*-commutative64.8%
frac-times86.4%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
Taylor expanded in y around 0 61.6%
+-commutative61.6%
Simplified61.6%
if 3.4999999999999997e-51 < y Initial program 67.9%
times-frac84.9%
+-commutative84.9%
+-commutative84.9%
+-commutative84.9%
times-frac67.9%
associate-*l/79.9%
*-commutative79.9%
*-commutative79.9%
distribute-rgt1-in72.8%
fma-def79.9%
+-commutative79.9%
+-commutative79.9%
cube-unmult79.9%
+-commutative79.9%
Simplified79.9%
associate-*r/68.0%
fma-udef63.8%
cube-mult63.7%
distribute-rgt1-in67.9%
associate-+r+67.9%
*-commutative67.9%
frac-times84.9%
associate-/r*99.7%
associate-*l/99.8%
associate-+r+99.8%
+-commutative99.8%
associate-+l+99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 67.3%
+-commutative67.3%
Simplified67.3%
Final simplification63.3%
(FPCore (x y) :precision binary64 (if (<= y 5.6e-196) (/ y (+ y x)) (/ x y)))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (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 (y <= 5.6d-196) then
tmp = y / (y + x)
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-196) {
tmp = y / (y + x);
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-196: tmp = y / (y + x) else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-196) tmp = Float64(y / Float64(y + x)); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-196) tmp = y / (y + x); else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-196], N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-196}:\\
\;\;\;\;\frac{y}{y + x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if y < 5.5999999999999997e-196Initial program 62.1%
times-frac85.2%
+-commutative85.2%
+-commutative85.2%
+-commutative85.2%
times-frac62.1%
associate-*l/81.9%
*-commutative81.9%
*-commutative81.9%
distribute-rgt1-in53.2%
fma-def81.9%
+-commutative81.9%
+-commutative81.9%
cube-unmult81.9%
+-commutative81.9%
Simplified81.9%
associate-*r/62.1%
fma-udef38.8%
cube-mult38.9%
distribute-rgt1-in62.1%
associate-+r+62.1%
*-commutative62.1%
frac-times85.1%
associate-/r*99.8%
associate-*l/99.9%
associate-+r+99.9%
+-commutative99.9%
associate-+l+99.9%
Applied egg-rr99.9%
clear-num99.8%
un-div-inv99.8%
+-commutative99.8%
Applied egg-rr99.8%
Taylor expanded in x around 0 75.0%
+-commutative75.0%
Simplified75.0%
Taylor expanded in y around 0 34.7%
if 5.5999999999999997e-196 < y Initial program 71.0%
associate-/r*73.8%
*-commutative73.8%
+-commutative73.8%
+-commutative73.8%
associate-*l/87.2%
+-commutative87.2%
associate-*r/87.3%
remove-double-neg87.3%
+-commutative87.3%
+-commutative87.3%
remove-double-neg87.3%
+-commutative87.3%
associate-+l+87.3%
Simplified87.3%
Taylor expanded in x around 0 54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in y around 0 33.7%
Final simplification34.3%
(FPCore (x y) :precision binary64 (if (<= x -9.0) (/ 1.0 x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -9.0) {
tmp = 1.0 / 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 <= (-9.0d0)) then
tmp = 1.0d0 / x
else
tmp = x / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (x <= -9.0) {
tmp = 1.0 / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -9.0: tmp = 1.0 / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -9.0) tmp = Float64(1.0 / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -9.0) tmp = 1.0 / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -9.0], N[(1.0 / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -9:\\
\;\;\;\;\frac{1}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -9Initial program 70.4%
associate-/r*73.1%
*-commutative73.1%
+-commutative73.1%
+-commutative73.1%
associate-*l/85.3%
+-commutative85.3%
associate-*r/85.3%
remove-double-neg85.3%
+-commutative85.3%
+-commutative85.3%
remove-double-neg85.3%
+-commutative85.3%
associate-+l+85.3%
Simplified85.3%
Taylor expanded in y around inf 38.8%
Taylor expanded in y around 0 5.8%
if -9 < x Initial program 64.0%
associate-/r*66.8%
*-commutative66.8%
+-commutative66.8%
+-commutative66.8%
associate-*l/86.2%
+-commutative86.2%
associate-*r/86.2%
remove-double-neg86.2%
+-commutative86.2%
+-commutative86.2%
remove-double-neg86.2%
+-commutative86.2%
associate-+l+86.2%
Simplified86.2%
Taylor expanded in x around 0 57.7%
+-commutative57.7%
Simplified57.7%
Taylor expanded in y around 0 33.3%
Final simplification25.8%
(FPCore (x y) :precision binary64 (/ 1.0 x))
double code(double x, double y) {
return 1.0 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 1.0d0 / x
end function
public static double code(double x, double y) {
return 1.0 / x;
}
def code(x, y): return 1.0 / x
function code(x, y) return Float64(1.0 / x) end
function tmp = code(x, y) tmp = 1.0 / x; end
code[x_, y_] := N[(1.0 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{x}
\end{array}
Initial program 65.8%
associate-/r*68.5%
*-commutative68.5%
+-commutative68.5%
+-commutative68.5%
associate-*l/86.0%
+-commutative86.0%
associate-*r/86.0%
remove-double-neg86.0%
+-commutative86.0%
+-commutative86.0%
remove-double-neg86.0%
+-commutative86.0%
associate-+l+86.0%
Simplified86.0%
Taylor expanded in y around inf 49.4%
Taylor expanded in y around 0 4.5%
Final simplification4.5%
(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 2024031
(FPCore (x y)
:name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
:precision binary64
:herbie-target
(/ (/ (/ x (+ (+ y 1.0) x)) (+ y x)) (/ 1.0 (/ y (+ y x))))
(/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))