Average Error: 0.0 → 0.0
Time: 8.8s
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 r549389 = x;
        double r549390 = y;
        double r549391 = r549389 + r549390;
        double r549392 = r549390 + r549390;
        double r549393 = r549391 / r549392;
        return r549393;
}

double f(double x, double y) {
        double r549394 = x;
        double r549395 = y;
        double r549396 = r549394 + r549395;
        double r549397 = r549395 + r549395;
        double r549398 = r549396 / r549397;
        return r549398;
}

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.0
Target0.0
Herbie0.0
\[0.5 \cdot \frac{x}{y} + 0.5\]

Derivation

  1. Initial program 0.0

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

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

Reproduce

herbie shell --seed 2019325 +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)))