Average Error: 0.1 → 0.1
Time: 3.4s
Precision: 64
\[\frac{x + y}{y + y}\]
\[\frac{x + y}{y + y}\]
\frac{x + y}{y + y}
\frac{x + y}{y + y}
double f(double x, double y) {
        double r103405 = x;
        double r103406 = y;
        double r103407 = r103405 + r103406;
        double r103408 = r103406 + r103406;
        double r103409 = r103407 / r103408;
        return r103409;
}

double f(double x, double y) {
        double r103410 = x;
        double r103411 = y;
        double r103412 = r103410 + r103411;
        double r103413 = r103411 + r103411;
        double r103414 = r103412 / r103413;
        return r103414;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original0.1
Target0.0
Herbie0.1
\[0.5 \cdot \frac{x}{y} + 0.5\]

Derivation

  1. Initial program 0.1

    \[\frac{x + y}{y + y}\]
  2. Final simplification0.1

    \[\leadsto \frac{x + y}{y + y}\]

Reproduce

herbie shell --seed 2020045 +o rules:numerics
(FPCore (x y)
  :name "Data.Random.Distribution.T:$ccdf from random-fu-0.2.6.2"
  :precision binary64

  :herbie-target
  (+ (* 0.5 (/ x y)) 0.5)

  (/ (+ x y) (+ y y)))