
(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 13 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}
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ (* (/ x (+ x y)) (/ y (+ (+ x y) 1.0))) (+ x y)))
assert(x < y);
double code(double x, double y) {
return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = ((x / (x + y)) * (y / ((x + y) + 1.0d0))) / (x + y)
end function
assert x < y;
public static double code(double x, double y) {
return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
}
[x, y] = sort([x, y]) def code(x, y): return ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y)
x, y = sort([x, y]) function code(x, y) return Float64(Float64(Float64(x / Float64(x + y)) * Float64(y / Float64(Float64(x + y) + 1.0))) / Float64(x + y)) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = ((x / (x + y)) * (y / ((x + y) + 1.0))) / (x + y);
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(N[(N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(y / N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}
\end{array}
Initial program 71.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Final simplification99.8%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= x -6.4e+75)
(/ (/ y x) (+ x y))
(if (<= x -1.9e-16)
(* (/ x (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))) y)
(* (/ y (* (+ 1.0 y) (+ x y))) (/ x (+ x y))))))assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -6.4e+75) {
tmp = (y / x) / (x + y);
} else if (x <= -1.9e-16) {
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
} else {
tmp = (y / ((1.0 + y) * (x + y))) * (x / (x + y));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (x <= (-6.4d+75)) then
tmp = (y / x) / (x + y)
else if (x <= (-1.9d-16)) then
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0d0))) * y
else
tmp = (y / ((1.0d0 + y) * (x + y))) * (x / (x + y))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (x <= -6.4e+75) {
tmp = (y / x) / (x + y);
} else if (x <= -1.9e-16) {
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
} else {
tmp = (y / ((1.0 + y) * (x + y))) * (x / (x + y));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if x <= -6.4e+75: tmp = (y / x) / (x + y) elif x <= -1.9e-16: tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y else: tmp = (y / ((1.0 + y) * (x + y))) * (x / (x + y)) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -6.4e+75) tmp = Float64(Float64(y / x) / Float64(x + y)); elseif (x <= -1.9e-16) tmp = Float64(Float64(x / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) * y); else tmp = Float64(Float64(y / Float64(Float64(1.0 + y) * Float64(x + y))) * Float64(x / Float64(x + y))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (x <= -6.4e+75)
tmp = (y / x) / (x + y);
elseif (x <= -1.9e-16)
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
else
tmp = (y / ((1.0 + y) * (x + y))) * (x / (x + y));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -6.4e+75], N[(N[(y / x), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, -1.9e-16], N[(N[(x / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(y / N[(N[(1.0 + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -6.4 \cdot 10^{+75}:\\
\;\;\;\;\frac{\frac{y}{x}}{x + y}\\
\mathbf{elif}\;x \leq -1.9 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\left(1 + y\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + y}\\
\end{array}
\end{array}
if x < -6.39999999999999969e75Initial program 58.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-/.f6488.1
Applied rewrites88.1%
if -6.39999999999999969e75 < x < -1.90000000000000006e-16Initial program 89.9%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6494.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6494.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6494.6
Applied rewrites94.6%
if -1.90000000000000006e-16 < x Initial program 72.6%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6495.9
lift-+.f64N/A
+-commutativeN/A
Applied rewrites95.9%
Taylor expanded in x around 0
lower-+.f6481.0
Applied rewrites81.0%
Final simplification83.3%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= y 1.25e-157)
(/ (/ y (+ x 1.0)) (+ x y))
(if (<= y 1.9e+101)
(* (/ y (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))) x)
(/ (* 1.0 (/ x (+ x y))) (+ x y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.25e-157) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 1.9e+101) {
tmp = (y / (((x + y) * (x + y)) * ((x + y) + 1.0))) * x;
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.25d-157) then
tmp = (y / (x + 1.0d0)) / (x + y)
else if (y <= 1.9d+101) then
tmp = (y / (((x + y) * (x + y)) * ((x + y) + 1.0d0))) * x
else
tmp = (1.0d0 * (x / (x + y))) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.25e-157) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 1.9e+101) {
tmp = (y / (((x + y) * (x + y)) * ((x + y) + 1.0))) * x;
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.25e-157: tmp = (y / (x + 1.0)) / (x + y) elif y <= 1.9e+101: tmp = (y / (((x + y) * (x + y)) * ((x + y) + 1.0))) * x else: tmp = (1.0 * (x / (x + y))) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.25e-157) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); elseif (y <= 1.9e+101) tmp = Float64(Float64(y / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) * x); else tmp = Float64(Float64(1.0 * Float64(x / Float64(x + y))) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.25e-157)
tmp = (y / (x + 1.0)) / (x + y);
elseif (y <= 1.9e+101)
tmp = (y / (((x + y) * (x + y)) * ((x + y) + 1.0))) * x;
else
tmp = (1.0 * (x / (x + y))) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.25e-157], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.9e+101], N[(N[(y / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], N[(N[(1.0 * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.25 \cdot 10^{-157}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{elif}\;y \leq 1.9 \cdot 10^{+101}:\\
\;\;\;\;\frac{y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \cdot x\\
\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot \frac{x}{x + y}}{x + y}\\
\end{array}
\end{array}
if y < 1.25000000000000005e-157Initial program 71.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6464.2
Applied rewrites64.2%
if 1.25000000000000005e-157 < y < 1.8999999999999999e101Initial program 79.4%
lift-/.f64N/A
lift-*.f64N/A
associate-/l*N/A
*-commutativeN/A
lower-*.f64N/A
Applied rewrites89.6%
if 1.8999999999999999e101 < y Initial program 63.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around inf
Applied rewrites89.4%
Final simplification72.9%
NOTE: x and y should be sorted in increasing order before calling this function.
(FPCore (x y)
:precision binary64
(if (<= y 1.3e-167)
(/ (/ y (+ x 1.0)) (+ x y))
(if (<= y 9.6e+63)
(* (/ x (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))) y)
(/ (* 1.0 (/ x (+ x y))) (+ x y)))))assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.3e-167) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 9.6e+63) {
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.3d-167) then
tmp = (y / (x + 1.0d0)) / (x + y)
else if (y <= 9.6d+63) then
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0d0))) * y
else
tmp = (1.0d0 * (x / (x + y))) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.3e-167) {
tmp = (y / (x + 1.0)) / (x + y);
} else if (y <= 9.6e+63) {
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
} else {
tmp = (1.0 * (x / (x + y))) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.3e-167: tmp = (y / (x + 1.0)) / (x + y) elif y <= 9.6e+63: tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y else: tmp = (1.0 * (x / (x + y))) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.3e-167) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); elseif (y <= 9.6e+63) tmp = Float64(Float64(x / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0))) * y); else tmp = Float64(Float64(1.0 * Float64(x / Float64(x + y))) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.3e-167)
tmp = (y / (x + 1.0)) / (x + y);
elseif (y <= 9.6e+63)
tmp = (x / (((x + y) * (x + y)) * ((x + y) + 1.0))) * y;
else
tmp = (1.0 * (x / (x + y))) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.3e-167], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 9.6e+63], N[(N[(x / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision], N[(N[(1.0 * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1.3 \cdot 10^{-167}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{elif}\;y \leq 9.6 \cdot 10^{+63}:\\
\;\;\;\;\frac{x}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \cdot y\\
\mathbf{else}:\\
\;\;\;\;\frac{1 \cdot \frac{x}{x + y}}{x + y}\\
\end{array}
\end{array}
if y < 1.2999999999999999e-167Initial program 71.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6464.1
Applied rewrites64.1%
if 1.2999999999999999e-167 < y < 9.6e63Initial program 79.3%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
associate-/l*N/A
lower-*.f64N/A
lower-/.f6489.6
lift-*.f64N/A
*-commutativeN/A
lower-*.f6489.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6489.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6489.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6489.6
lift-+.f64N/A
+-commutativeN/A
lower-+.f6489.6
Applied rewrites89.6%
if 9.6e63 < y Initial program 65.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.9%
Taylor expanded in y around inf
Applied rewrites87.2%
Final simplification72.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y -3300000.0) (/ (/ y x) x) (* (/ y (* (+ (+ x y) 1.0) (+ x y))) (/ x (+ x y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= -3300000.0) {
tmp = (y / x) / x;
} else {
tmp = (y / (((x + y) + 1.0) * (x + y))) * (x / (x + y));
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= (-3300000.0d0)) then
tmp = (y / x) / x
else
tmp = (y / (((x + y) + 1.0d0) * (x + y))) * (x / (x + y))
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= -3300000.0) {
tmp = (y / x) / x;
} else {
tmp = (y / (((x + y) + 1.0) * (x + y))) * (x / (x + y));
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= -3300000.0: tmp = (y / x) / x else: tmp = (y / (((x + y) + 1.0) * (x + y))) * (x / (x + y)) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= -3300000.0) tmp = Float64(Float64(y / x) / x); else tmp = Float64(Float64(y / Float64(Float64(Float64(x + y) + 1.0) * Float64(x + y))) * Float64(x / Float64(x + y))); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= -3300000.0)
tmp = (y / x) / x;
else
tmp = (y / (((x + y) + 1.0) * (x + y))) * (x / (x + y));
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, -3300000.0], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], N[(N[(y / N[(N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(x / N[(x + y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -3300000:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{else}:\\
\;\;\;\;\frac{y}{\left(\left(x + y\right) + 1\right) \cdot \left(x + y\right)} \cdot \frac{x}{x + y}\\
\end{array}
\end{array}
if y < -3.3e6Initial program 58.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6425.5
Applied rewrites25.5%
Applied rewrites31.7%
if -3.3e6 < y Initial program 76.4%
lift-/.f64N/A
lift-*.f64N/A
*-commutativeN/A
lift-*.f64N/A
lift-*.f64N/A
associate-*l*N/A
*-commutativeN/A
times-fracN/A
lower-*.f64N/A
lower-/.f64N/A
*-commutativeN/A
lower-*.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lift-+.f64N/A
+-commutativeN/A
lower-+.f64N/A
lower-/.f6497.3
lift-+.f64N/A
+-commutativeN/A
Applied rewrites97.3%
Final simplification80.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y -1.25) (/ (/ y x) x) (if (<= y 2.35e-58) (/ y (fma x x x)) (/ (/ x (+ 1.0 y)) (+ x y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= -1.25) {
tmp = (y / x) / x;
} else if (y <= 2.35e-58) {
tmp = y / fma(x, x, x);
} else {
tmp = (x / (1.0 + y)) / (x + y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= -1.25) tmp = Float64(Float64(y / x) / x); elseif (y <= 2.35e-58) tmp = Float64(y / fma(x, x, x)); else tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(x + y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, -1.25], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 2.35e-58], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 2.35 \cdot 10^{-58}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\
\end{array}
\end{array}
if y < -1.25Initial program 58.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6425.5
Applied rewrites25.5%
Applied rewrites31.7%
if -1.25 < y < 2.34999999999999997e-58Initial program 81.3%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6482.0
Applied rewrites82.0%
if 2.34999999999999997e-58 < y Initial program 67.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-+.f6475.3
Applied rewrites75.3%
Final simplification67.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 2.35e-58) (/ (/ y (+ x 1.0)) (+ x y)) (/ (/ x (+ 1.0 y)) (+ x y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 2.35e-58) {
tmp = (y / (x + 1.0)) / (x + y);
} else {
tmp = (x / (1.0 + y)) / (x + y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 2.35d-58) then
tmp = (y / (x + 1.0d0)) / (x + y)
else
tmp = (x / (1.0d0 + y)) / (x + y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 2.35e-58) {
tmp = (y / (x + 1.0)) / (x + y);
} else {
tmp = (x / (1.0 + y)) / (x + y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 2.35e-58: tmp = (y / (x + 1.0)) / (x + y) else: tmp = (x / (1.0 + y)) / (x + y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 2.35e-58) tmp = Float64(Float64(y / Float64(x + 1.0)) / Float64(x + y)); else tmp = Float64(Float64(x / Float64(1.0 + y)) / Float64(x + y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 2.35e-58)
tmp = (y / (x + 1.0)) / (x + y);
else
tmp = (x / (1.0 + y)) / (x + y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 2.35e-58], N[(N[(y / N[(x + 1.0), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision], N[(N[(x / N[(1.0 + y), $MachinePrecision]), $MachinePrecision] / N[(x + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.35 \cdot 10^{-58}:\\
\;\;\;\;\frac{\frac{y}{x + 1}}{x + y}\\
\mathbf{else}:\\
\;\;\;\;\frac{\frac{x}{1 + y}}{x + y}\\
\end{array}
\end{array}
if y < 2.34999999999999997e-58Initial program 73.5%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in y around 0
lower-/.f64N/A
lower-+.f6465.1
Applied rewrites65.1%
if 2.34999999999999997e-58 < y Initial program 67.6%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
lower-/.f64N/A
lower-+.f6475.3
Applied rewrites75.3%
Final simplification67.8%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y -1.25) (/ (/ y x) x) (if (<= y 2.55e-58) (/ y (fma x x x)) (/ x (fma y y y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= -1.25) {
tmp = (y / x) / x;
} else if (y <= 2.55e-58) {
tmp = y / fma(x, x, x);
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= -1.25) tmp = Float64(Float64(y / x) / x); elseif (y <= 2.55e-58) tmp = Float64(y / fma(x, x, x)); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, -1.25], N[(N[(y / x), $MachinePrecision] / x), $MachinePrecision], If[LessEqual[y, 2.55e-58], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25:\\
\;\;\;\;\frac{\frac{y}{x}}{x}\\
\mathbf{elif}\;y \leq 2.55 \cdot 10^{-58}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if y < -1.25Initial program 58.3%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6425.5
Applied rewrites25.5%
Applied rewrites31.7%
if -1.25 < y < 2.55e-58Initial program 81.3%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6482.0
Applied rewrites82.0%
if 2.55e-58 < y Initial program 67.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6475.7
Applied rewrites75.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 3.8e-157) (/ y (* x x)) (if (<= y 1.0) (/ x y) (/ x (* y y)))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 3.8e-157) {
tmp = y / (x * x);
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 3.8d-157) then
tmp = y / (x * x)
else if (y <= 1.0d0) then
tmp = x / y
else
tmp = x / (y * y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 3.8e-157) {
tmp = y / (x * x);
} else if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 3.8e-157: tmp = y / (x * x) elif y <= 1.0: tmp = x / y else: tmp = x / (y * y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 3.8e-157) tmp = Float64(y / Float64(x * x)); elseif (y <= 1.0) tmp = Float64(x / y); else tmp = Float64(x / Float64(y * y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 3.8e-157)
tmp = y / (x * x);
elseif (y <= 1.0)
tmp = x / y;
else
tmp = x / (y * y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 3.8e-157], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 3.8 \cdot 10^{-157}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{elif}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 3.8000000000000002e-157Initial program 71.5%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6445.0
Applied rewrites45.0%
if 3.8000000000000002e-157 < y < 1Initial program 84.7%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.7%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6440.9
Applied rewrites40.9%
Taylor expanded in y around 0
Applied rewrites39.0%
if 1 < y Initial program 64.2%
Taylor expanded in y around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6479.9
Applied rewrites79.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 2.55e-58) (/ y (fma x x x)) (/ x (fma y y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 2.55e-58) {
tmp = y / fma(x, x, x);
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 2.55e-58) tmp = Float64(y / fma(x, x, x)); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 2.55e-58], N[(y / N[(x * x + x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 2.55 \cdot 10^{-58}:\\
\;\;\;\;\frac{y}{\mathsf{fma}\left(x, x, x\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if y < 2.55e-58Initial program 73.5%
Taylor expanded in y around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6462.8
Applied rewrites62.8%
if 2.55e-58 < y Initial program 67.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6475.7
Applied rewrites75.7%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= x -3.2e-15) (/ y (* x x)) (/ x (fma y y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (x <= -3.2e-15) {
tmp = y / (x * x);
} else {
tmp = x / fma(y, y, y);
}
return tmp;
}
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (x <= -3.2e-15) tmp = Float64(y / Float64(x * x)); else tmp = Float64(x / fma(y, y, y)); end return tmp end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[x, -3.2e-15], N[(y / N[(x * x), $MachinePrecision]), $MachinePrecision], N[(x / N[(y * y + y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;x \leq -3.2 \cdot 10^{-15}:\\
\;\;\;\;\frac{y}{x \cdot x}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{\mathsf{fma}\left(y, y, y\right)}\\
\end{array}
\end{array}
if x < -3.1999999999999999e-15Initial program 69.6%
Taylor expanded in x around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6467.9
Applied rewrites67.9%
if -3.1999999999999999e-15 < x Initial program 72.6%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6454.9
Applied rewrites54.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (if (<= y 1.0) (/ x y) (/ x (* y y))))
assert(x < y);
double code(double x, double y) {
double tmp;
if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
real(8) :: tmp
if (y <= 1.0d0) then
tmp = x / y
else
tmp = x / (y * y)
end if
code = tmp
end function
assert x < y;
public static double code(double x, double y) {
double tmp;
if (y <= 1.0) {
tmp = x / y;
} else {
tmp = x / (y * y);
}
return tmp;
}
[x, y] = sort([x, y]) def code(x, y): tmp = 0 if y <= 1.0: tmp = x / y else: tmp = x / (y * y) return tmp
x, y = sort([x, y]) function code(x, y) tmp = 0.0 if (y <= 1.0) tmp = Float64(x / y); else tmp = Float64(x / Float64(y * y)); end return tmp end
x, y = num2cell(sort([x, y])){:}
function tmp_2 = code(x, y)
tmp = 0.0;
if (y <= 1.0)
tmp = x / y;
else
tmp = x / (y * y);
end
tmp_2 = tmp;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := If[LessEqual[y, 1.0], N[(x / y), $MachinePrecision], N[(x / N[(y * y), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\begin{array}{l}
\mathbf{if}\;y \leq 1:\\
\;\;\;\;\frac{x}{y}\\
\mathbf{else}:\\
\;\;\;\;\frac{x}{y \cdot y}\\
\end{array}
\end{array}
if y < 1Initial program 73.8%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6437.9
Applied rewrites37.9%
Taylor expanded in y around 0
Applied rewrites23.3%
if 1 < y Initial program 64.2%
Taylor expanded in y around inf
lower-/.f64N/A
unpow2N/A
lower-*.f6479.9
Applied rewrites79.9%
NOTE: x and y should be sorted in increasing order before calling this function. (FPCore (x y) :precision binary64 (/ x y))
assert(x < y);
double code(double x, double y) {
return x / y;
}
NOTE: x and y should be sorted in increasing order before calling this function.
real(8) function code(x, y)
real(8), intent (in) :: x
real(8), intent (in) :: y
code = x / y
end function
assert x < y;
public static double code(double x, double y) {
return x / y;
}
[x, y] = sort([x, y]) def code(x, y): return x / y
x, y = sort([x, y]) function code(x, y) return Float64(x / y) end
x, y = num2cell(sort([x, y])){:}
function tmp = code(x, y)
tmp = x / y;
end
NOTE: x and y should be sorted in increasing order before calling this function. code[x_, y_] := N[(x / y), $MachinePrecision]
\begin{array}{l}
[x, y] = \mathsf{sort}([x, y])\\
\\
\frac{x}{y}
\end{array}
Initial program 71.9%
lift-/.f64N/A
lift-*.f64N/A
lift-*.f64N/A
times-fracN/A
*-commutativeN/A
lift-*.f64N/A
associate-/r*N/A
associate-*r/N/A
lower-/.f64N/A
Applied rewrites99.8%
Taylor expanded in x around 0
lower-/.f64N/A
+-commutativeN/A
distribute-lft-inN/A
*-rgt-identityN/A
lower-fma.f6446.7
Applied rewrites46.7%
Taylor expanded in y around 0
Applied rewrites24.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 2024235
(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))))