Average Error: 19.6 → 9.1
Time: 15.3s
Precision: 64
\[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
\[\frac{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}\]
\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}
\frac{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}
double f(double x, double y) {
        double r395802 = x;
        double r395803 = y;
        double r395804 = r395802 * r395803;
        double r395805 = r395802 + r395803;
        double r395806 = r395805 * r395805;
        double r395807 = 1.0;
        double r395808 = r395805 + r395807;
        double r395809 = r395806 * r395808;
        double r395810 = r395804 / r395809;
        return r395810;
}

double f(double x, double y) {
        double r395811 = x;
        double r395812 = r395811 * r395811;
        double r395813 = y;
        double r395814 = 2.0;
        double r395815 = r395814 * r395811;
        double r395816 = r395815 + r395813;
        double r395817 = r395813 * r395816;
        double r395818 = r395812 + r395817;
        double r395819 = r395811 / r395818;
        double r395820 = r395811 + r395813;
        double r395821 = 1.0;
        double r395822 = r395820 + r395821;
        double r395823 = r395813 / r395822;
        double r395824 = r395819 * r395823;
        return r395824;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original19.6
Target0.1
Herbie9.1
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}\]

Derivation

  1. Initial program 19.6

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
  2. Taylor expanded around 0 19.6

    \[\leadsto \frac{x \cdot y}{\color{blue}{\left({x}^{2} + \left({y}^{2} + 2 \cdot \left(x \cdot y\right)\right)\right)} \cdot \left(\left(x + y\right) + 1\right)}\]
  3. Simplified19.6

    \[\leadsto \frac{x \cdot y}{\color{blue}{\left(x \cdot x + y \cdot \left(2 \cdot x + y\right)\right)} \cdot \left(\left(x + y\right) + 1\right)}\]
  4. Using strategy rm
  5. Applied times-frac9.1

    \[\leadsto \color{blue}{\frac{x}{x \cdot x + y \cdot \left(2 \cdot x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}}\]
  6. Final simplification9.1

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

Reproduce

herbie shell --seed 2019325 
(FPCore (x y)
  :name "Numeric.SpecFunctions:incompleteBetaApprox from math-functions-0.1.5.2, A"
  :precision binary64

  :herbie-target
  (/ (/ (/ x (+ (+ y 1) x)) (+ y x)) (/ 1 (/ y (+ y x))))

  (/ (* x y) (* (* (+ x y) (+ x y)) (+ (+ x y) 1))))