
(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 18 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 (/ (* (/ 1.0 (+ y x)) (/ x (+ y x))) (/ (+ x (+ 1.0 y)) y)))
double code(double x, double y) {
return ((1.0 / (y + x)) * (x / (y + x))) / ((x + (1.0 + y)) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((1.0d0 / (y + x)) * (x / (y + x))) / ((x + (1.0d0 + y)) / y)
end function
public static double code(double x, double y) {
return ((1.0 / (y + x)) * (x / (y + x))) / ((x + (1.0 + y)) / y);
}
def code(x, y): return ((1.0 / (y + x)) * (x / (y + x))) / ((x + (1.0 + y)) / y)
function code(x, y) return Float64(Float64(Float64(1.0 / Float64(y + x)) * Float64(x / Float64(y + x))) / Float64(Float64(x + Float64(1.0 + y)) / y)) end
function tmp = code(x, y) tmp = ((1.0 / (y + x)) * (x / (y + x))) / ((x + (1.0 + y)) / y); end
code[x_, y_] := N[(N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{1}{y + x} \cdot \frac{x}{y + x}}{\frac{x + \left(1 + y\right)}{y}}
\end{array}
Initial program 67.8%
associate-/l*81.0%
+-commutative81.0%
+-commutative81.0%
+-commutative81.0%
*-commutative81.0%
distribute-rgt1-in64.2%
+-commutative64.2%
+-commutative64.2%
cube-unmult64.2%
+-commutative64.2%
Simplified64.2%
clear-num63.8%
un-div-inv63.9%
cube-mult63.9%
distribute-rgt1-in80.7%
*-commutative80.7%
associate-/l*82.9%
pow282.9%
associate-+r+82.9%
Applied egg-rr82.9%
associate-/r*86.8%
+-commutative86.8%
Simplified86.8%
*-un-lft-identity86.8%
+-commutative86.8%
pow286.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Final simplification99.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (+ x (+ 1.0 y))))
(if (<= y -9e-235)
(/ (/ 1.0 x) (/ t_0 y))
(if (<= y 5.2e-132)
(* x (/ (/ y (+ y x)) (* (+ 1.0 y) (+ y x))))
(if (<= y 4.6e+96)
(* x (/ y (* t_0 (* (+ y x) (+ y x)))))
(* (/ x (+ y x)) (/ (/ y y) (+ 1.0 y))))))))
double code(double x, double y) {
double t_0 = x + (1.0 + y);
double tmp;
if (y <= -9e-235) {
tmp = (1.0 / x) / (t_0 / y);
} else if (y <= 5.2e-132) {
tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x)));
} else if (y <= 4.6e+96) {
tmp = x * (y / (t_0 * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (1.0 + y));
}
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 + (1.0d0 + y)
if (y <= (-9d-235)) then
tmp = (1.0d0 / x) / (t_0 / y)
else if (y <= 5.2d-132) then
tmp = x * ((y / (y + x)) / ((1.0d0 + y) * (y + x)))
else if (y <= 4.6d+96) then
tmp = x * (y / (t_0 * ((y + x) * (y + x))))
else
tmp = (x / (y + x)) * ((y / y) / (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x + (1.0 + y);
double tmp;
if (y <= -9e-235) {
tmp = (1.0 / x) / (t_0 / y);
} else if (y <= 5.2e-132) {
tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x)));
} else if (y <= 4.6e+96) {
tmp = x * (y / (t_0 * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (1.0 + y));
}
return tmp;
}
def code(x, y): t_0 = x + (1.0 + y) tmp = 0 if y <= -9e-235: tmp = (1.0 / x) / (t_0 / y) elif y <= 5.2e-132: tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x))) elif y <= 4.6e+96: tmp = x * (y / (t_0 * ((y + x) * (y + x)))) else: tmp = (x / (y + x)) * ((y / y) / (1.0 + y)) return tmp
function code(x, y) t_0 = Float64(x + Float64(1.0 + y)) tmp = 0.0 if (y <= -9e-235) tmp = Float64(Float64(1.0 / x) / Float64(t_0 / y)); elseif (y <= 5.2e-132) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(Float64(1.0 + y) * Float64(y + x)))); elseif (y <= 4.6e+96) tmp = Float64(x * Float64(y / Float64(t_0 * Float64(Float64(y + x) * Float64(y + x))))); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / y) / Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) t_0 = x + (1.0 + y); tmp = 0.0; if (y <= -9e-235) tmp = (1.0 / x) / (t_0 / y); elseif (y <= 5.2e-132) tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x))); elseif (y <= 4.6e+96) tmp = x * (y / (t_0 * ((y + x) * (y + x)))); else tmp = (x / (y + x)) * ((y / y) / (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -9e-235], N[(N[(1.0 / x), $MachinePrecision] / N[(t$95$0 / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 5.2e-132], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + y), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+96], N[(x * N[(y / N[(t$95$0 * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := x + \left(1 + y\right)\\
\mathbf{if}\;y \leq -9 \cdot 10^{-235}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{t\_0}{y}}\\
\mathbf{elif}\;y \leq 5.2 \cdot 10^{-132}:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{\left(1 + y\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;y \leq 4.6 \cdot 10^{+96}:\\
\;\;\;\;x \cdot \frac{y}{t\_0 \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y}}{1 + y}\\
\end{array}
\end{array}
if y < -8.9999999999999996e-235Initial program 70.4%
associate-/l*83.2%
+-commutative83.2%
+-commutative83.2%
+-commutative83.2%
*-commutative83.2%
distribute-rgt1-in57.0%
+-commutative57.0%
+-commutative57.0%
cube-unmult57.0%
+-commutative57.0%
Simplified57.0%
clear-num56.2%
un-div-inv56.2%
cube-mult56.2%
distribute-rgt1-in82.4%
*-commutative82.4%
associate-/l*84.0%
pow284.0%
associate-+r+84.0%
Applied egg-rr84.0%
associate-/r*89.6%
+-commutative89.6%
Simplified89.6%
*-un-lft-identity89.6%
+-commutative89.6%
pow289.6%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 51.9%
if -8.9999999999999996e-235 < y < 5.2000000000000002e-132Initial program 64.7%
associate-/l*80.4%
associate-+l+80.4%
Simplified80.4%
Taylor expanded in x around 0 78.3%
+-commutative78.3%
Simplified78.3%
*-un-lft-identity78.3%
associate-*l*78.3%
times-frac96.3%
+-commutative96.3%
+-commutative96.3%
Applied egg-rr96.3%
associate-*r/96.3%
*-commutative96.3%
associate-*r/96.3%
*-rgt-identity96.3%
+-commutative96.3%
+-commutative96.3%
*-commutative96.3%
+-commutative96.3%
+-commutative96.3%
Simplified96.3%
if 5.2000000000000002e-132 < y < 4.6000000000000003e96Initial program 80.7%
associate-/l*92.6%
associate-+l+92.6%
Simplified92.6%
if 4.6000000000000003e96 < y Initial program 53.6%
associate-/l*66.6%
associate-+l+66.6%
Simplified66.6%
Taylor expanded in x around 0 66.6%
+-commutative66.6%
Simplified66.6%
Taylor expanded in x around 0 66.6%
associate-*r/53.6%
associate-*l*53.6%
+-commutative53.6%
Applied egg-rr53.6%
times-frac74.4%
associate-/r*84.9%
Simplified84.9%
Final simplification73.4%
(FPCore (x y)
:precision binary64
(if (<= y -1e-230)
(/ (/ 1.0 x) (/ (+ x (+ 1.0 y)) y))
(if (<= y 3e-133)
(* x (/ (/ y (+ y x)) (* (+ 1.0 y) (+ y x))))
(if (<= y 170000.0)
(* x (/ y (* (+ 1.0 x) (* (+ y x) (+ y x)))))
(* (/ x (+ y x)) (/ (/ y y) (+ 1.0 y)))))))
double code(double x, double y) {
double tmp;
if (y <= -1e-230) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 3e-133) {
tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x)));
} else if (y <= 170000.0) {
tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (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 <= (-1d-230)) then
tmp = (1.0d0 / x) / ((x + (1.0d0 + y)) / y)
else if (y <= 3d-133) then
tmp = x * ((y / (y + x)) / ((1.0d0 + y) * (y + x)))
else if (y <= 170000.0d0) then
tmp = x * (y / ((1.0d0 + x) * ((y + x) * (y + x))))
else
tmp = (x / (y + x)) * ((y / y) / (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= -1e-230) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 3e-133) {
tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x)));
} else if (y <= 170000.0) {
tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (1.0 + y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= -1e-230: tmp = (1.0 / x) / ((x + (1.0 + y)) / y) elif y <= 3e-133: tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x))) elif y <= 170000.0: tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x)))) else: tmp = (x / (y + x)) * ((y / y) / (1.0 + y)) return tmp
function code(x, y) tmp = 0.0 if (y <= -1e-230) tmp = Float64(Float64(1.0 / x) / Float64(Float64(x + Float64(1.0 + y)) / y)); elseif (y <= 3e-133) tmp = Float64(x * Float64(Float64(y / Float64(y + x)) / Float64(Float64(1.0 + y) * Float64(y + x)))); elseif (y <= 170000.0) tmp = Float64(x * Float64(y / Float64(Float64(1.0 + x) * Float64(Float64(y + x) * Float64(y + x))))); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / y) / Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= -1e-230) tmp = (1.0 / x) / ((x + (1.0 + y)) / y); elseif (y <= 3e-133) tmp = x * ((y / (y + x)) / ((1.0 + y) * (y + x))); elseif (y <= 170000.0) tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x)))); else tmp = (x / (y + x)) * ((y / y) / (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, -1e-230], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3e-133], N[(x * N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(1.0 + y), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 170000.0], N[(x * N[(y / N[(N[(1.0 + x), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{x + \left(1 + y\right)}{y}}\\
\mathbf{elif}\;y \leq 3 \cdot 10^{-133}:\\
\;\;\;\;x \cdot \frac{\frac{y}{y + x}}{\left(1 + y\right) \cdot \left(y + x\right)}\\
\mathbf{elif}\;y \leq 170000:\\
\;\;\;\;x \cdot \frac{y}{\left(1 + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y}}{1 + y}\\
\end{array}
\end{array}
if y < -1.00000000000000005e-230Initial program 70.4%
associate-/l*83.2%
+-commutative83.2%
+-commutative83.2%
+-commutative83.2%
*-commutative83.2%
distribute-rgt1-in57.0%
+-commutative57.0%
+-commutative57.0%
cube-unmult57.0%
+-commutative57.0%
Simplified57.0%
clear-num56.2%
un-div-inv56.2%
cube-mult56.2%
distribute-rgt1-in82.4%
*-commutative82.4%
associate-/l*84.0%
pow284.0%
associate-+r+84.0%
Applied egg-rr84.0%
associate-/r*89.6%
+-commutative89.6%
Simplified89.6%
*-un-lft-identity89.6%
+-commutative89.6%
pow289.6%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 51.9%
if -1.00000000000000005e-230 < y < 3.00000000000000019e-133Initial program 64.7%
associate-/l*80.4%
associate-+l+80.4%
Simplified80.4%
Taylor expanded in x around 0 78.3%
+-commutative78.3%
Simplified78.3%
*-un-lft-identity78.3%
associate-*l*78.3%
times-frac96.3%
+-commutative96.3%
+-commutative96.3%
Applied egg-rr96.3%
associate-*r/96.3%
*-commutative96.3%
associate-*r/96.3%
*-rgt-identity96.3%
+-commutative96.3%
+-commutative96.3%
*-commutative96.3%
+-commutative96.3%
+-commutative96.3%
Simplified96.3%
if 3.00000000000000019e-133 < y < 1.7e5Initial program 88.9%
associate-/l*99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in y around 0 99.6%
+-commutative99.6%
Simplified99.6%
if 1.7e5 < y Initial program 56.3%
associate-/l*69.6%
associate-+l+69.6%
Simplified69.6%
Taylor expanded in x around 0 67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in x around 0 66.1%
associate-*r/52.9%
associate-*l*52.9%
+-commutative52.9%
Applied egg-rr52.9%
times-frac67.4%
associate-/r*75.5%
Simplified75.5%
Final simplification71.4%
(FPCore (x y)
:precision binary64
(if (<= y 5.6e-171)
(/ (/ 1.0 x) (/ (+ x (+ 1.0 y)) y))
(if (<= y 170000.0)
(* x (/ y (* (+ 1.0 x) (* (+ y x) (+ y x)))))
(* (/ x (+ y x)) (/ (/ y y) (+ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 170000.0) {
tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (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 <= 5.6d-171) then
tmp = (1.0d0 / x) / ((x + (1.0d0 + y)) / y)
else if (y <= 170000.0d0) then
tmp = x * (y / ((1.0d0 + x) * ((y + x) * (y + x))))
else
tmp = (x / (y + x)) * ((y / y) / (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 170000.0) {
tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x))));
} else {
tmp = (x / (y + x)) * ((y / y) / (1.0 + y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-171: tmp = (1.0 / x) / ((x + (1.0 + y)) / y) elif y <= 170000.0: tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x)))) else: tmp = (x / (y + x)) * ((y / y) / (1.0 + y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-171) tmp = Float64(Float64(1.0 / x) / Float64(Float64(x + Float64(1.0 + y)) / y)); elseif (y <= 170000.0) tmp = Float64(x * Float64(y / Float64(Float64(1.0 + x) * Float64(Float64(y + x) * Float64(y + x))))); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / y) / Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-171) tmp = (1.0 / x) / ((x + (1.0 + y)) / y); elseif (y <= 170000.0) tmp = x * (y / ((1.0 + x) * ((y + x) * (y + x)))); else tmp = (x / (y + x)) * ((y / y) / (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-171], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 170000.0], N[(x * N[(y / N[(N[(1.0 + x), $MachinePrecision] * N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{x + \left(1 + y\right)}{y}}\\
\mathbf{elif}\;y \leq 170000:\\
\;\;\;\;x \cdot \frac{y}{\left(1 + x\right) \cdot \left(\left(y + x\right) \cdot \left(y + x\right)\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y}}{1 + y}\\
\end{array}
\end{array}
if y < 5.60000000000000046e-171Initial program 68.9%
associate-/l*81.9%
+-commutative81.9%
+-commutative81.9%
+-commutative81.9%
*-commutative81.9%
distribute-rgt1-in59.1%
+-commutative59.1%
+-commutative59.1%
cube-unmult59.1%
+-commutative59.1%
Simplified59.1%
clear-num58.5%
un-div-inv58.5%
cube-mult58.5%
distribute-rgt1-in81.3%
*-commutative81.3%
associate-/l*82.5%
pow282.5%
associate-+r+82.5%
Applied egg-rr82.5%
associate-/r*87.0%
+-commutative87.0%
Simplified87.0%
*-un-lft-identity87.0%
+-commutative87.0%
pow287.0%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 61.0%
if 5.60000000000000046e-171 < y < 1.7e5Initial program 83.0%
associate-/l*97.6%
associate-+l+97.6%
Simplified97.6%
Taylor expanded in y around 0 97.6%
+-commutative97.6%
Simplified97.6%
if 1.7e5 < y Initial program 56.3%
associate-/l*69.6%
associate-+l+69.6%
Simplified69.6%
Taylor expanded in x around 0 67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in x around 0 66.1%
associate-*r/52.9%
associate-*l*52.9%
+-commutative52.9%
Applied egg-rr52.9%
times-frac67.4%
associate-/r*75.5%
Simplified75.5%
Final simplification69.3%
(FPCore (x y)
:precision binary64
(if (<= y 5.6e-171)
(/ (/ 1.0 x) (/ (+ x (+ 1.0 y)) y))
(if (<= y 0.0035)
(* x (/ y (* (+ y x) (+ y x))))
(* (/ x (+ y x)) (/ (/ y y) (+ 1.0 y))))))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 0.0035) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + x)) * ((y / y) / (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 <= 5.6d-171) then
tmp = (1.0d0 / x) / ((x + (1.0d0 + y)) / y)
else if (y <= 0.0035d0) then
tmp = x * (y / ((y + x) * (y + x)))
else
tmp = (x / (y + x)) * ((y / y) / (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 0.0035) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (y + x)) * ((y / y) / (1.0 + y));
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-171: tmp = (1.0 / x) / ((x + (1.0 + y)) / y) elif y <= 0.0035: tmp = x * (y / ((y + x) * (y + x))) else: tmp = (x / (y + x)) * ((y / y) / (1.0 + y)) return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-171) tmp = Float64(Float64(1.0 / x) / Float64(Float64(x + Float64(1.0 + y)) / y)); elseif (y <= 0.0035) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(y + x)) * Float64(Float64(y / y) / Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-171) tmp = (1.0 / x) / ((x + (1.0 + y)) / y); elseif (y <= 0.0035) tmp = x * (y / ((y + x) * (y + x))); else tmp = (x / (y + x)) * ((y / y) / (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-171], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 0.0035], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(y / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{x + \left(1 + y\right)}{y}}\\
\mathbf{elif}\;y \leq 0.0035:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y + x} \cdot \frac{\frac{y}{y}}{1 + y}\\
\end{array}
\end{array}
if y < 5.60000000000000046e-171Initial program 68.9%
associate-/l*81.9%
+-commutative81.9%
+-commutative81.9%
+-commutative81.9%
*-commutative81.9%
distribute-rgt1-in59.1%
+-commutative59.1%
+-commutative59.1%
cube-unmult59.1%
+-commutative59.1%
Simplified59.1%
clear-num58.5%
un-div-inv58.5%
cube-mult58.5%
distribute-rgt1-in81.3%
*-commutative81.3%
associate-/l*82.5%
pow282.5%
associate-+r+82.5%
Applied egg-rr82.5%
associate-/r*87.0%
+-commutative87.0%
Simplified87.0%
*-un-lft-identity87.0%
+-commutative87.0%
pow287.0%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 61.0%
if 5.60000000000000046e-171 < y < 0.00350000000000000007Initial program 82.5%
associate-/l*97.5%
associate-+l+97.5%
Simplified97.5%
Taylor expanded in x around 0 80.5%
+-commutative80.5%
Simplified80.5%
Taylor expanded in y around 0 80.5%
if 0.00350000000000000007 < y Initial program 57.0%
associate-/l*70.1%
associate-+l+70.1%
Simplified70.1%
Taylor expanded in x around 0 68.4%
+-commutative68.4%
Simplified68.4%
Taylor expanded in x around 0 65.1%
associate-*r/52.1%
associate-*l*52.1%
+-commutative52.1%
Applied egg-rr52.1%
times-frac66.4%
associate-/r*74.3%
Simplified74.3%
Final simplification66.7%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ y (* x (+ 1.0 x)))))
(if (<= y 2.95e-145)
t_0
(if (<= y 4.8e-20)
(/ x y)
(if (<= y 175000.0) t_0 (* (/ x y) (/ 1.0 y)))))))
double code(double x, double y) {
double t_0 = y / (x * (1.0 + x));
double tmp;
if (y <= 2.95e-145) {
tmp = t_0;
} else if (y <= 4.8e-20) {
tmp = x / y;
} else if (y <= 175000.0) {
tmp = t_0;
} else {
tmp = (x / y) * (1.0 / y);
}
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 / (x * (1.0d0 + x))
if (y <= 2.95d-145) then
tmp = t_0
else if (y <= 4.8d-20) then
tmp = x / y
else if (y <= 175000.0d0) then
tmp = t_0
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = y / (x * (1.0 + x));
double tmp;
if (y <= 2.95e-145) {
tmp = t_0;
} else if (y <= 4.8e-20) {
tmp = x / y;
} else if (y <= 175000.0) {
tmp = t_0;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
def code(x, y): t_0 = y / (x * (1.0 + x)) tmp = 0 if y <= 2.95e-145: tmp = t_0 elif y <= 4.8e-20: tmp = x / y elif y <= 175000.0: tmp = t_0 else: tmp = (x / y) * (1.0 / y) return tmp
function code(x, y) t_0 = Float64(y / Float64(x * Float64(1.0 + x))) tmp = 0.0 if (y <= 2.95e-145) tmp = t_0; elseif (y <= 4.8e-20) tmp = Float64(x / y); elseif (y <= 175000.0) tmp = t_0; else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) t_0 = y / (x * (1.0 + x)); tmp = 0.0; if (y <= 2.95e-145) tmp = t_0; elseif (y <= 4.8e-20) tmp = x / y; elseif (y <= 175000.0) tmp = t_0; else tmp = (x / y) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 2.95e-145], t$95$0, If[LessEqual[y, 4.8e-20], N[(x / y), $MachinePrecision], If[LessEqual[y, 175000.0], t$95$0, N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{if}\;y \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;t\_0\\
\mathbf{elif}\;y \leq 4.8 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{elif}\;y \leq 175000:\\
\;\;\;\;t\_0\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 2.9499999999999999e-145 or 4.79999999999999986e-20 < y < 175000Initial program 70.1%
associate-/l*82.5%
associate-+l+82.5%
Simplified82.5%
Taylor expanded in y around 0 62.1%
+-commutative62.1%
Simplified62.1%
if 2.9499999999999999e-145 < y < 4.79999999999999986e-20Initial program 80.1%
associate-/l*99.5%
associate-+l+99.5%
Simplified99.5%
Taylor expanded in x around 0 45.5%
+-commutative45.5%
Simplified45.5%
Taylor expanded in y around 0 45.5%
if 175000 < y Initial program 56.3%
associate-/l*69.6%
associate-+l+69.6%
Simplified69.6%
Taylor expanded in x around 0 67.2%
+-commutative67.2%
Simplified67.2%
*-un-lft-identity67.2%
times-frac75.0%
Applied egg-rr75.0%
Taylor expanded in y around inf 75.0%
Final simplification63.6%
(FPCore (x y)
:precision binary64
(let* ((t_0 (/ x (+ y x))))
(if (<= y 160000.0)
(/ (* (/ 1.0 (+ y x)) t_0) (/ (+ 1.0 x) y))
(* t_0 (/ (/ y y) (+ 1.0 y))))))
double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 160000.0) {
tmp = ((1.0 / (y + x)) * t_0) / ((1.0 + x) / y);
} else {
tmp = t_0 * ((y / y) / (1.0 + y));
}
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 + x)
if (y <= 160000.0d0) then
tmp = ((1.0d0 / (y + x)) * t_0) / ((1.0d0 + x) / y)
else
tmp = t_0 * ((y / y) / (1.0d0 + y))
end if
code = tmp
end function
public static double code(double x, double y) {
double t_0 = x / (y + x);
double tmp;
if (y <= 160000.0) {
tmp = ((1.0 / (y + x)) * t_0) / ((1.0 + x) / y);
} else {
tmp = t_0 * ((y / y) / (1.0 + y));
}
return tmp;
}
def code(x, y): t_0 = x / (y + x) tmp = 0 if y <= 160000.0: tmp = ((1.0 / (y + x)) * t_0) / ((1.0 + x) / y) else: tmp = t_0 * ((y / y) / (1.0 + y)) return tmp
function code(x, y) t_0 = Float64(x / Float64(y + x)) tmp = 0.0 if (y <= 160000.0) tmp = Float64(Float64(Float64(1.0 / Float64(y + x)) * t_0) / Float64(Float64(1.0 + x) / y)); else tmp = Float64(t_0 * Float64(Float64(y / y) / Float64(1.0 + y))); end return tmp end
function tmp_2 = code(x, y) t_0 = x / (y + x); tmp = 0.0; if (y <= 160000.0) tmp = ((1.0 / (y + x)) * t_0) / ((1.0 + x) / y); else tmp = t_0 * ((y / y) / (1.0 + y)); end tmp_2 = tmp; end
code[x_, y_] := Block[{t$95$0 = N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, 160000.0], N[(N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * t$95$0), $MachinePrecision] / N[(N[(1.0 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(t$95$0 * N[(N[(y / y), $MachinePrecision] / N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
t_0 := \frac{x}{y + x}\\
\mathbf{if}\;y \leq 160000:\\
\;\;\;\;\frac{\frac{1}{y + x} \cdot t\_0}{\frac{1 + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;t\_0 \cdot \frac{\frac{y}{y}}{1 + y}\\
\end{array}
\end{array}
if y < 1.6e5Initial program 71.3%
associate-/l*84.6%
+-commutative84.6%
+-commutative84.6%
+-commutative84.6%
*-commutative84.6%
distribute-rgt1-in62.7%
+-commutative62.7%
+-commutative62.7%
cube-unmult62.7%
+-commutative62.7%
Simplified62.7%
clear-num62.2%
un-div-inv62.3%
cube-mult62.3%
distribute-rgt1-in84.2%
*-commutative84.2%
associate-/l*85.1%
pow285.1%
associate-+r+85.1%
Applied egg-rr85.1%
associate-/r*88.8%
+-commutative88.8%
Simplified88.8%
*-un-lft-identity88.8%
+-commutative88.8%
pow288.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 92.4%
if 1.6e5 < y Initial program 56.3%
associate-/l*69.6%
associate-+l+69.6%
Simplified69.6%
Taylor expanded in x around 0 67.9%
+-commutative67.9%
Simplified67.9%
Taylor expanded in x around 0 66.1%
associate-*r/52.9%
associate-*l*52.9%
+-commutative52.9%
Applied egg-rr52.9%
times-frac67.4%
associate-/r*75.5%
Simplified75.5%
Final simplification88.4%
(FPCore (x y) :precision binary64 (if (<= y 5.6e-171) (/ (/ 1.0 x) (/ (+ x (+ 1.0 y)) y)) (if (<= y 130000.0) (* x (/ y (* (+ y x) (+ y x)))) (/ (/ x (+ 1.0 y)) y))))
double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 130000.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (1.0 + y)) / 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-171) then
tmp = (1.0d0 / x) / ((x + (1.0d0 + y)) / y)
else if (y <= 130000.0d0) then
tmp = x * (y / ((y + x) * (y + x)))
else
tmp = (x / (1.0d0 + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 5.6e-171) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else if (y <= 130000.0) {
tmp = x * (y / ((y + x) * (y + x)));
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 5.6e-171: tmp = (1.0 / x) / ((x + (1.0 + y)) / y) elif y <= 130000.0: tmp = x * (y / ((y + x) * (y + x))) else: tmp = (x / (1.0 + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 5.6e-171) tmp = Float64(Float64(1.0 / x) / Float64(Float64(x + Float64(1.0 + y)) / y)); elseif (y <= 130000.0) tmp = Float64(x * Float64(y / Float64(Float64(y + x) * Float64(y + x)))); else tmp = Float64(Float64(x / Float64(1.0 + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 5.6e-171) tmp = (1.0 / x) / ((x + (1.0 + y)) / y); elseif (y <= 130000.0) tmp = x * (y / ((y + x) * (y + x))); else tmp = (x / (1.0 + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 5.6e-171], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 130000.0], N[(x * N[(y / N[(N[(y + x), $MachinePrecision] * N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 5.6 \cdot 10^{-171}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{x + \left(1 + y\right)}{y}}\\
\mathbf{elif}\;y \leq 130000:\\
\;\;\;\;x \cdot \frac{y}{\left(y + x\right) \cdot \left(y + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y}\\
\end{array}
\end{array}
if y < 5.60000000000000046e-171Initial program 68.9%
associate-/l*81.9%
+-commutative81.9%
+-commutative81.9%
+-commutative81.9%
*-commutative81.9%
distribute-rgt1-in59.1%
+-commutative59.1%
+-commutative59.1%
cube-unmult59.1%
+-commutative59.1%
Simplified59.1%
clear-num58.5%
un-div-inv58.5%
cube-mult58.5%
distribute-rgt1-in81.3%
*-commutative81.3%
associate-/l*82.5%
pow282.5%
associate-+r+82.5%
Applied egg-rr82.5%
associate-/r*87.0%
+-commutative87.0%
Simplified87.0%
*-un-lft-identity87.0%
+-commutative87.0%
pow287.0%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 61.0%
if 5.60000000000000046e-171 < y < 1.3e5Initial program 83.0%
associate-/l*97.6%
associate-+l+97.6%
Simplified97.6%
Taylor expanded in x around 0 81.0%
+-commutative81.0%
Simplified81.0%
Taylor expanded in y around 0 81.0%
if 1.3e5 < y Initial program 56.3%
associate-/l*69.6%
associate-+l+69.6%
Simplified69.6%
Taylor expanded in x around 0 67.2%
+-commutative67.2%
Simplified67.2%
*-un-lft-identity67.2%
times-frac75.0%
Applied egg-rr75.0%
associate-*l/75.1%
*-un-lft-identity75.1%
+-commutative75.1%
Applied egg-rr75.1%
Final simplification67.0%
(FPCore (x y) :precision binary64 (* (/ 1.0 (+ y x)) (/ (/ x (+ y x)) (/ (+ x (+ 1.0 y)) y))))
double code(double x, double y) {
return (1.0 / (y + x)) * ((x / (y + x)) / ((x + (1.0 + y)) / y));
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = (1.0d0 / (y + x)) * ((x / (y + x)) / ((x + (1.0d0 + y)) / y))
end function
public static double code(double x, double y) {
return (1.0 / (y + x)) * ((x / (y + x)) / ((x + (1.0 + y)) / y));
}
def code(x, y): return (1.0 / (y + x)) * ((x / (y + x)) / ((x + (1.0 + y)) / y))
function code(x, y) return Float64(Float64(1.0 / Float64(y + x)) * Float64(Float64(x / Float64(y + x)) / Float64(Float64(x + Float64(1.0 + y)) / y))) end
function tmp = code(x, y) tmp = (1.0 / (y + x)) * ((x / (y + x)) / ((x + (1.0 + y)) / y)); end
code[x_, y_] := N[(N[(1.0 / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{1}{y + x} \cdot \frac{\frac{x}{y + x}}{\frac{x + \left(1 + y\right)}{y}}
\end{array}
Initial program 67.8%
associate-/l*81.0%
+-commutative81.0%
+-commutative81.0%
+-commutative81.0%
*-commutative81.0%
distribute-rgt1-in64.2%
+-commutative64.2%
+-commutative64.2%
cube-unmult64.2%
+-commutative64.2%
Simplified64.2%
clear-num63.8%
un-div-inv63.9%
cube-mult63.9%
distribute-rgt1-in80.7%
*-commutative80.7%
associate-/l*82.9%
pow282.9%
associate-+r+82.9%
Applied egg-rr82.9%
associate-/r*86.8%
+-commutative86.8%
Simplified86.8%
*-un-lft-identity86.8%
+-commutative86.8%
pow286.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-/l*99.7%
+-commutative99.7%
Applied egg-rr99.7%
(FPCore (x y) :precision binary64 (if (<= y 2e-145) (/ y x) (if (<= y 3.8e+174) (/ x (* y (+ 1.0 y))) (* (/ x y) (/ 1.0 y)))))
double code(double x, double y) {
double tmp;
if (y <= 2e-145) {
tmp = y / x;
} else if (y <= 3.8e+174) {
tmp = x / (y * (1.0 + y));
} else {
tmp = (x / y) * (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 <= 2d-145) then
tmp = y / x
else if (y <= 3.8d+174) then
tmp = x / (y * (1.0d0 + y))
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2e-145) {
tmp = y / x;
} else if (y <= 3.8e+174) {
tmp = x / (y * (1.0 + y));
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2e-145: tmp = y / x elif y <= 3.8e+174: tmp = x / (y * (1.0 + y)) else: tmp = (x / y) * (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 2e-145) tmp = Float64(y / x); elseif (y <= 3.8e+174) tmp = Float64(x / Float64(y * Float64(1.0 + y))); else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2e-145) tmp = y / x; elseif (y <= 3.8e+174) tmp = x / (y * (1.0 + y)); else tmp = (x / y) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2e-145], N[(y / x), $MachinePrecision], If[LessEqual[y, 3.8e+174], N[(x / N[(y * N[(1.0 + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2 \cdot 10^{-145}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 3.8 \cdot 10^{+174}:\\
\;\;\;\;\frac{x}{y \cdot \left(1 + y\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 1.99999999999999983e-145Initial program 69.2%
associate-/l*82.0%
+-commutative82.0%
+-commutative82.0%
+-commutative82.0%
*-commutative82.0%
distribute-rgt1-in58.7%
+-commutative58.7%
+-commutative58.7%
cube-unmult58.7%
+-commutative58.7%
Simplified58.7%
cube-mult58.7%
distribute-rgt1-in82.0%
*-commutative82.0%
associate-/l*69.2%
clear-num68.7%
associate-/l*71.5%
pow271.5%
associate-+r+71.5%
Applied egg-rr71.5%
Taylor expanded in x around 0 83.2%
Taylor expanded in y around 0 39.2%
if 1.99999999999999983e-145 < y < 3.8000000000000002e174Initial program 68.9%
associate-/l*83.0%
associate-+l+83.0%
Simplified83.0%
Taylor expanded in x around 0 48.6%
+-commutative48.6%
Simplified48.6%
if 3.8000000000000002e174 < y Initial program 58.7%
associate-/l*73.1%
associate-+l+73.1%
Simplified73.1%
Taylor expanded in x around 0 73.1%
+-commutative73.1%
Simplified73.1%
*-un-lft-identity73.1%
times-frac90.0%
Applied egg-rr90.0%
Taylor expanded in y around inf 90.0%
Final simplification48.0%
(FPCore (x y) :precision binary64 (if (<= y 2.95e-145) (/ y x) (if (<= y 1.0) (/ x y) (* (/ x y) (/ 1.0 y)))))
double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = y / x;
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = (x / y) * (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 <= 2.95d-145) then
tmp = y / x
else if (y <= 1.0d0) then
tmp = x / y
else
tmp = (x / y) * (1.0d0 / y)
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = y / x;
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = (x / y) * (1.0 / y);
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.95e-145: tmp = y / x elif y <= 1.0: tmp = x / y else: tmp = (x / y) * (1.0 / y) return tmp
function code(x, y) tmp = 0.0 if (y <= 2.95e-145) tmp = Float64(y / x); elseif (y <= 1.0) tmp = Float64(x / y); else tmp = Float64(Float64(x / y) * Float64(1.0 / y)); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.95e-145) tmp = y / x; elseif (y <= 1.0) tmp = x / y; else tmp = (x / y) * (1.0 / y); end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.95e-145], N[(y / x), $MachinePrecision], If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], N[(N[(x / y), $MachinePrecision] * N[(1.0 / y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y} \cdot \frac{1}{y}\\
\end{array}
\end{array}
if y < 2.9499999999999999e-145Initial program 69.2%
associate-/l*82.0%
+-commutative82.0%
+-commutative82.0%
+-commutative82.0%
*-commutative82.0%
distribute-rgt1-in58.7%
+-commutative58.7%
+-commutative58.7%
cube-unmult58.7%
+-commutative58.7%
Simplified58.7%
cube-mult58.7%
distribute-rgt1-in82.0%
*-commutative82.0%
associate-/l*69.2%
clear-num68.7%
associate-/l*71.5%
pow271.5%
associate-+r+71.5%
Applied egg-rr71.5%
Taylor expanded in x around 0 83.2%
Taylor expanded in y around 0 39.2%
if 2.9499999999999999e-145 < y < 1Initial program 82.9%
associate-/l*99.6%
associate-+l+99.6%
Simplified99.6%
Taylor expanded in x around 0 39.4%
+-commutative39.4%
Simplified39.4%
Taylor expanded in y around 0 39.4%
if 1 < y Initial program 57.0%
associate-/l*70.1%
associate-+l+70.1%
Simplified70.1%
Taylor expanded in x around 0 66.2%
+-commutative66.2%
Simplified66.2%
*-un-lft-identity66.2%
times-frac73.9%
Applied egg-rr73.9%
Taylor expanded in y around inf 73.9%
Final simplification47.6%
(FPCore (x y) :precision binary64 (/ (/ (/ x (+ y x)) (+ y x)) (/ (+ x (+ 1.0 y)) y)))
double code(double x, double y) {
return ((x / (y + x)) / (y + x)) / ((x + (1.0 + y)) / y);
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / (y + x)) / (y + x)) / ((x + (1.0d0 + y)) / y)
end function
public static double code(double x, double y) {
return ((x / (y + x)) / (y + x)) / ((x + (1.0 + y)) / y);
}
def code(x, y): return ((x / (y + x)) / (y + x)) / ((x + (1.0 + y)) / y)
function code(x, y) return Float64(Float64(Float64(x / Float64(y + x)) / Float64(y + x)) / Float64(Float64(x + Float64(1.0 + y)) / y)) end
function tmp = code(x, y) tmp = ((x / (y + x)) / (y + x)) / ((x + (1.0 + y)) / y); end
code[x_, y_] := N[(N[(N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(y + x), $MachinePrecision]), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
\\
\frac{\frac{\frac{x}{y + x}}{y + x}}{\frac{x + \left(1 + y\right)}{y}}
\end{array}
Initial program 67.8%
associate-/l*81.0%
+-commutative81.0%
+-commutative81.0%
+-commutative81.0%
*-commutative81.0%
distribute-rgt1-in64.2%
+-commutative64.2%
+-commutative64.2%
cube-unmult64.2%
+-commutative64.2%
Simplified64.2%
clear-num63.8%
un-div-inv63.9%
cube-mult63.9%
distribute-rgt1-in80.7%
*-commutative80.7%
associate-/l*82.9%
pow282.9%
associate-+r+82.9%
Applied egg-rr82.9%
associate-/r*86.8%
+-commutative86.8%
Simplified86.8%
*-un-lft-identity86.8%
+-commutative86.8%
pow286.8%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
associate-*l/99.7%
*-lft-identity99.7%
Simplified99.7%
Final simplification99.7%
(FPCore (x y) :precision binary64 (if (<= y 2.95e-145) (/ (/ 1.0 x) (/ (+ x (+ 1.0 y)) y)) (/ (/ x (+ 1.0 y)) y)))
double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.95d-145) then
tmp = (1.0d0 / x) / ((x + (1.0d0 + y)) / y)
else
tmp = (x / (1.0d0 + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = (1.0 / x) / ((x + (1.0 + y)) / y);
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.95e-145: tmp = (1.0 / x) / ((x + (1.0 + y)) / y) else: tmp = (x / (1.0 + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 2.95e-145) tmp = Float64(Float64(1.0 / x) / Float64(Float64(x + Float64(1.0 + y)) / y)); else tmp = Float64(Float64(x / Float64(1.0 + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.95e-145) tmp = (1.0 / x) / ((x + (1.0 + y)) / y); else tmp = (x / (1.0 + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.95e-145], N[(N[(1.0 / x), $MachinePrecision] / N[(N[(x + N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;\frac{\frac{1}{x}}{\frac{x + \left(1 + y\right)}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y}\\
\end{array}
\end{array}
if y < 2.9499999999999999e-145Initial program 69.2%
associate-/l*82.0%
+-commutative82.0%
+-commutative82.0%
+-commutative82.0%
*-commutative82.0%
distribute-rgt1-in58.7%
+-commutative58.7%
+-commutative58.7%
cube-unmult58.7%
+-commutative58.7%
Simplified58.7%
clear-num58.1%
un-div-inv58.2%
cube-mult58.1%
distribute-rgt1-in81.5%
*-commutative81.5%
associate-/l*82.6%
pow282.6%
associate-+r+82.6%
Applied egg-rr82.6%
associate-/r*86.9%
+-commutative86.9%
Simplified86.9%
*-un-lft-identity86.9%
+-commutative86.9%
pow286.9%
times-frac99.7%
+-commutative99.7%
+-commutative99.7%
Applied egg-rr99.7%
Taylor expanded in y around 0 61.6%
if 2.9499999999999999e-145 < y Initial program 65.1%
associate-/l*79.2%
associate-+l+79.2%
Simplified79.2%
Taylor expanded in x around 0 57.8%
+-commutative57.8%
Simplified57.8%
*-un-lft-identity57.8%
times-frac63.1%
Applied egg-rr63.1%
associate-*l/63.2%
*-un-lft-identity63.2%
+-commutative63.2%
Applied egg-rr63.2%
Final simplification62.1%
(FPCore (x y) :precision binary64 (if (<= y 2.95e-145) (/ 1.0 (* x (/ (+ 1.0 x) y))) (/ (/ x (+ 1.0 y)) y)))
double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = 1.0 / (x * ((1.0 + x) / y));
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.95d-145) then
tmp = 1.0d0 / (x * ((1.0d0 + x) / y))
else
tmp = (x / (1.0d0 + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = 1.0 / (x * ((1.0 + x) / y));
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.95e-145: tmp = 1.0 / (x * ((1.0 + x) / y)) else: tmp = (x / (1.0 + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 2.95e-145) tmp = Float64(1.0 / Float64(x * Float64(Float64(1.0 + x) / y))); else tmp = Float64(Float64(x / Float64(1.0 + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.95e-145) tmp = 1.0 / (x * ((1.0 + x) / y)); else tmp = (x / (1.0 + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.95e-145], N[(1.0 / N[(x * N[(N[(1.0 + x), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;\frac{1}{x \cdot \frac{1 + x}{y}}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y}\\
\end{array}
\end{array}
if y < 2.9499999999999999e-145Initial program 69.2%
associate-/l*82.0%
+-commutative82.0%
+-commutative82.0%
+-commutative82.0%
*-commutative82.0%
distribute-rgt1-in58.7%
+-commutative58.7%
+-commutative58.7%
cube-unmult58.7%
+-commutative58.7%
Simplified58.7%
cube-mult58.7%
distribute-rgt1-in82.0%
*-commutative82.0%
associate-/l*69.2%
clear-num68.7%
associate-/l*71.5%
pow271.5%
associate-+r+71.5%
Applied egg-rr71.5%
Taylor expanded in y around 0 60.5%
associate-/l*60.8%
+-commutative60.8%
Simplified60.8%
if 2.9499999999999999e-145 < y Initial program 65.1%
associate-/l*79.2%
associate-+l+79.2%
Simplified79.2%
Taylor expanded in x around 0 57.8%
+-commutative57.8%
Simplified57.8%
*-un-lft-identity57.8%
times-frac63.1%
Applied egg-rr63.1%
associate-*l/63.2%
*-un-lft-identity63.2%
+-commutative63.2%
Applied egg-rr63.2%
Final simplification61.6%
(FPCore (x y) :precision binary64 (if (<= y 2.95e-145) (/ y (* x (+ 1.0 x))) (/ (/ x (+ 1.0 y)) y)))
double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.95d-145) then
tmp = y / (x * (1.0d0 + x))
else
tmp = (x / (1.0d0 + y)) / y
end if
code = tmp
end function
public static double code(double x, double y) {
double tmp;
if (y <= 2.95e-145) {
tmp = y / (x * (1.0 + x));
} else {
tmp = (x / (1.0 + y)) / y;
}
return tmp;
}
def code(x, y): tmp = 0 if y <= 2.95e-145: tmp = y / (x * (1.0 + x)) else: tmp = (x / (1.0 + y)) / y return tmp
function code(x, y) tmp = 0.0 if (y <= 2.95e-145) tmp = Float64(y / Float64(x * Float64(1.0 + x))); else tmp = Float64(Float64(x / Float64(1.0 + y)) / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (y <= 2.95e-145) tmp = y / (x * (1.0 + x)); else tmp = (x / (1.0 + y)) / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[y, 2.95e-145], N[(y / N[(x * N[(1.0 + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.95 \cdot 10^{-145}:\\
\;\;\;\;\frac{y}{x \cdot \left(1 + x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{y}\\
\end{array}
\end{array}
if y < 2.9499999999999999e-145Initial program 69.2%
associate-/l*82.0%
associate-+l+82.0%
Simplified82.0%
Taylor expanded in y around 0 61.0%
+-commutative61.0%
Simplified61.0%
if 2.9499999999999999e-145 < y Initial program 65.1%
associate-/l*79.2%
associate-+l+79.2%
Simplified79.2%
Taylor expanded in x around 0 57.8%
+-commutative57.8%
Simplified57.8%
*-un-lft-identity57.8%
times-frac63.1%
Applied egg-rr63.1%
associate-*l/63.2%
*-un-lft-identity63.2%
+-commutative63.2%
Applied egg-rr63.2%
Final simplification61.8%
(FPCore (x y) :precision binary64 (if (<= x -2.8e-172) (/ y x) (/ x y)))
double code(double x, double y) {
double tmp;
if (x <= -2.8e-172) {
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 <= (-2.8d-172)) 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 <= -2.8e-172) {
tmp = y / x;
} else {
tmp = x / y;
}
return tmp;
}
def code(x, y): tmp = 0 if x <= -2.8e-172: tmp = y / x else: tmp = x / y return tmp
function code(x, y) tmp = 0.0 if (x <= -2.8e-172) tmp = Float64(y / x); else tmp = Float64(x / y); end return tmp end
function tmp_2 = code(x, y) tmp = 0.0; if (x <= -2.8e-172) tmp = y / x; else tmp = x / y; end tmp_2 = tmp; end
code[x_, y_] := If[LessEqual[x, -2.8e-172], N[(y / x), $MachinePrecision], N[(x / y), $MachinePrecision]]
\begin{array}{l}
\\
\begin{array}{l}
\mathbf{if}\;x \leq -2.8 \cdot 10^{-172}:\\
\;\;\;\;\frac{y}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y}\\
\end{array}
\end{array}
if x < -2.80000000000000011e-172Initial program 71.8%
associate-/l*79.1%
+-commutative79.1%
+-commutative79.1%
+-commutative79.1%
*-commutative79.1%
distribute-rgt1-in48.8%
+-commutative48.8%
+-commutative48.8%
cube-unmult48.8%
+-commutative48.8%
Simplified48.8%
cube-mult48.8%
distribute-rgt1-in79.1%
*-commutative79.1%
associate-/l*71.8%
clear-num71.0%
associate-/l*74.8%
pow274.8%
associate-+r+74.8%
Applied egg-rr74.8%
Taylor expanded in x around 0 74.8%
Taylor expanded in y around 0 38.7%
if -2.80000000000000011e-172 < x Initial program 65.1%
associate-/l*82.3%
associate-+l+82.3%
Simplified82.3%
Taylor expanded in x around 0 54.3%
+-commutative54.3%
Simplified54.3%
Taylor expanded in y around 0 34.8%
(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 67.8%
associate-/l*81.0%
associate-+l+81.0%
Simplified81.0%
Taylor expanded in x around 0 44.9%
+-commutative44.9%
Simplified44.9%
Taylor expanded in y around 0 26.8%
(FPCore (x y) :precision binary64 (/ 0.5 x))
double code(double x, double y) {
return 0.5 / x;
}
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = 0.5d0 / x
end function
public static double code(double x, double y) {
return 0.5 / x;
}
def code(x, y): return 0.5 / x
function code(x, y) return Float64(0.5 / x) end
function tmp = code(x, y) tmp = 0.5 / x; end
code[x_, y_] := N[(0.5 / x), $MachinePrecision]
\begin{array}{l}
\\
\frac{0.5}{x}
\end{array}
Initial program 67.8%
associate-/l*81.0%
associate-+l+81.0%
Simplified81.0%
Taylor expanded in x around 0 53.4%
associate-*r*53.4%
+-commutative53.4%
unpow253.4%
distribute-rgt-in55.6%
Simplified55.6%
Taylor expanded in x around inf 4.3%
(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 2024165
(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))))