?

Average Accuracy: 69.9% → 99.8%
Time: 15.4s
Precision: binary64
Cost: 1088

?

\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
\[\frac{\frac{y}{y + x} \cdot \frac{x}{y + x}}{x + \left(y + 1\right)} \]
(FPCore (x y)
 :precision binary64
 (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1.0))))
(FPCore (x y)
 :precision binary64
 (/ (* (/ y (+ y x)) (/ x (+ y x))) (+ x (+ y 1.0))))
double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
double code(double x, double y) {
	return ((y / (y + x)) * (x / (y + x))) / (x + (y + 1.0));
}
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0d0))
end function
real(8) function code(x, y)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    code = ((y / (y + x)) * (x / (y + x))) / (x + (y + 1.0d0))
end function
public static double code(double x, double y) {
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
}
public static double code(double x, double y) {
	return ((y / (y + x)) * (x / (y + x))) / (x + (y + 1.0));
}
def code(x, y):
	return (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0))
def code(x, y):
	return ((y / (y + x)) * (x / (y + x))) / (x + (y + 1.0))
function code(x, y)
	return Float64(Float64(x * y) / Float64(Float64(Float64(x + y) * Float64(x + y)) * Float64(Float64(x + y) + 1.0)))
end
function code(x, y)
	return Float64(Float64(Float64(y / Float64(y + x)) * Float64(x / Float64(y + x))) / Float64(x + Float64(y + 1.0)))
end
function tmp = code(x, y)
	tmp = (x * y) / (((x + y) * (x + y)) * ((x + y) + 1.0));
end
function tmp = code(x, y)
	tmp = ((y / (y + x)) * (x / (y + x))) / (x + (y + 1.0));
end
code[x_, y_] := N[(N[(x * y), $MachinePrecision] / N[(N[(N[(x + y), $MachinePrecision] * N[(x + y), $MachinePrecision]), $MachinePrecision] * N[(N[(x + y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(N[(y / N[(y + x), $MachinePrecision]), $MachinePrecision] * N[(x / N[(y + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(x + N[(y + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\frac{\frac{y}{y + x} \cdot \frac{x}{y + x}}{x + \left(y + 1\right)}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original69.9%
Target99.8%
Herbie99.8%
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}} \]

Derivation?

  1. Initial program 69.9%

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]
  2. Simplified74.3%

    \[\leadsto \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{x + \left(y + 1\right)}} \]
    Proof

    [Start]69.9

    \[ \frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)} \]

    associate-/r* [=>]74.3

    \[ \color{blue}{\frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\left(x + y\right) + 1}} \]

    associate-+l+ [=>]74.3

    \[ \frac{\frac{x \cdot y}{\left(x + y\right) \cdot \left(x + y\right)}}{\color{blue}{x + \left(y + 1\right)}} \]
  3. Applied egg-rr99.8%

    \[\leadsto \frac{\color{blue}{\frac{y}{x + y} \cdot \frac{x}{x + y}}}{x + \left(y + 1\right)} \]
  4. Final simplification99.8%

    \[\leadsto \frac{\frac{y}{y + x} \cdot \frac{x}{y + x}}{x + \left(y + 1\right)} \]

Alternatives

Alternative 1
Accuracy72.3%
Cost1352
\[\begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;y \leq -4 \cdot 10^{-235}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{t_0}\\ \mathbf{elif}\;y \leq 3.5 \cdot 10^{+149}:\\ \;\;\;\;\frac{x}{\left(y + x\right) \cdot \left(\frac{y + \left(x + 1\right)}{y} \cdot \left(y + x\right)\right)}\\ \mathbf{elif}\;y \leq 4.4 \cdot 10^{+226}:\\ \;\;\;\;\frac{\frac{x}{y}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]
Alternative 2
Accuracy58.6%
Cost977
\[\begin{array}{l} \mathbf{if}\;x \leq -104000:\\ \;\;\;\;\frac{1}{x \cdot \frac{x}{y}}\\ \mathbf{elif}\;x \leq -2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -1.34 \cdot 10^{-92} \lor \neg \left(x \leq -7 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{x}{y \cdot \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]
Alternative 3
Accuracy59.0%
Cost977
\[\begin{array}{l} \mathbf{if}\;x \leq -104000:\\ \;\;\;\;\frac{1}{x \cdot \frac{x}{y}}\\ \mathbf{elif}\;x \leq -2.75 \cdot 10^{-76}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-93} \lor \neg \left(x \leq -7 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{x}\\ \end{array} \]
Alternative 4
Accuracy59.9%
Cost973
\[\begin{array}{l} \mathbf{if}\;x \leq -1.5 \cdot 10^{-71} \lor \neg \left(x \leq -1.6 \cdot 10^{-91}\right) \land x \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + \left(y + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]
Alternative 5
Accuracy60.1%
Cost973
\[\begin{array}{l} t_0 := x + \left(y + 1\right)\\ \mathbf{if}\;x \leq -6.8 \cdot 10^{-72}:\\ \;\;\;\;\frac{\frac{y}{y + x}}{t_0}\\ \mathbf{elif}\;x \leq -7.6 \cdot 10^{-93} \lor \neg \left(x \leq -7 \cdot 10^{-157}\right):\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{y}{x}}{t_0}\\ \end{array} \]
Alternative 6
Accuracy59.8%
Cost845
\[\begin{array}{l} \mathbf{if}\;x \leq -2.15 \cdot 10^{-72} \lor \neg \left(x \leq -6.6 \cdot 10^{-93}\right) \land x \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{\frac{y}{x}}{x + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y + 1}\\ \end{array} \]
Alternative 7
Accuracy59.4%
Cost716
\[\begin{array}{l} t_0 := \frac{x}{y \cdot y}\\ \mathbf{if}\;y \leq -1.95 \cdot 10^{+74}:\\ \;\;\;\;t_0\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{elif}\;y \leq 0.75:\\ \;\;\;\;\frac{x}{y} - x\\ \mathbf{else}:\\ \;\;\;\;t_0\\ \end{array} \]
Alternative 8
Accuracy52.8%
Cost716
\[\begin{array}{l} \mathbf{if}\;x \leq -104000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -4.8 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq 3.6 \cdot 10^{-144}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y \cdot y}\\ \end{array} \]
Alternative 9
Accuracy53.3%
Cost716
\[\begin{array}{l} \mathbf{if}\;x \leq -104000:\\ \;\;\;\;\frac{y}{x \cdot x}\\ \mathbf{elif}\;x \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq 5.4 \cdot 10^{-145}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]
Alternative 10
Accuracy53.8%
Cost716
\[\begin{array}{l} \mathbf{if}\;x \leq -104000:\\ \;\;\;\;\frac{1}{x \cdot \frac{x}{y}}\\ \mathbf{elif}\;x \leq -6.6 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{x} - y\\ \mathbf{elif}\;x \leq 1.52 \cdot 10^{-139}:\\ \;\;\;\;\frac{x}{y}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{x}{y}}{y}\\ \end{array} \]
Alternative 11
Accuracy27.2%
Cost324
\[\begin{array}{l} \mathbf{if}\;x \leq -0.00041:\\ \;\;\;\;\frac{1}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
Alternative 12
Accuracy34.1%
Cost324
\[\begin{array}{l} \mathbf{if}\;x \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{y}{x}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{y}\\ \end{array} \]
Alternative 13
Accuracy4.2%
Cost192
\[\frac{1}{x} \]

Error

Reproduce?

herbie shell --seed 2023141 
(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))))