Average Error: 20.1 → 0.1
Time: 15.4s
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{\frac{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}\]
\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{x}{x + y} \cdot \frac{y}{\left(x + y\right) + 1}}{x + y}
double f(double x, double y) {
        double r280373 = x;
        double r280374 = y;
        double r280375 = r280373 * r280374;
        double r280376 = r280373 + r280374;
        double r280377 = r280376 * r280376;
        double r280378 = 1.0;
        double r280379 = r280376 + r280378;
        double r280380 = r280377 * r280379;
        double r280381 = r280375 / r280380;
        return r280381;
}

double f(double x, double y) {
        double r280382 = x;
        double r280383 = y;
        double r280384 = r280382 + r280383;
        double r280385 = r280382 / r280384;
        double r280386 = 1.0;
        double r280387 = r280384 + r280386;
        double r280388 = r280383 / r280387;
        double r280389 = r280385 * r280388;
        double r280390 = r280389 / r280384;
        return r280390;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original20.1
Target0.1
Herbie0.1
\[\frac{\frac{\frac{x}{\left(y + 1\right) + x}}{y + x}}{\frac{1}{\frac{y}{y + x}}}\]

Derivation

  1. Initial program 20.1

    \[\frac{x \cdot y}{\left(\left(x + y\right) \cdot \left(x + y\right)\right) \cdot \left(\left(x + y\right) + 1\right)}\]
  2. Using strategy rm
  3. Applied times-frac8.0

    \[\leadsto \color{blue}{\frac{x}{\left(x + y\right) \cdot \left(x + y\right)} \cdot \frac{y}{\left(x + y\right) + 1}}\]
  4. Using strategy rm
  5. Applied associate-/r*0.2

    \[\leadsto \color{blue}{\frac{\frac{x}{x + y}}{x + y}} \cdot \frac{y}{\left(x + y\right) + 1}\]
  6. Using strategy rm
  7. Applied associate-*l/0.1

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

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

Reproduce

herbie shell --seed 2019304 +o rules:numerics
(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))))