Average Error: 6.5 → 0.1
Time: 12.1s
Precision: 64
\[x + \frac{y \cdot y}{z}\]
\[x + \frac{y}{\frac{z}{y}}\]
x + \frac{y \cdot y}{z}
x + \frac{y}{\frac{z}{y}}
double f(double x, double y, double z) {
        double r640447 = x;
        double r640448 = y;
        double r640449 = r640448 * r640448;
        double r640450 = z;
        double r640451 = r640449 / r640450;
        double r640452 = r640447 + r640451;
        return r640452;
}

double f(double x, double y, double z) {
        double r640453 = x;
        double r640454 = y;
        double r640455 = z;
        double r640456 = r640455 / r640454;
        double r640457 = r640454 / r640456;
        double r640458 = r640453 + r640457;
        return r640458;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Target

Original6.5
Target0.1
Herbie0.1
\[x + y \cdot \frac{y}{z}\]

Derivation

  1. Initial program 6.5

    \[x + \frac{y \cdot y}{z}\]
  2. Using strategy rm
  3. Applied associate-/l*0.1

    \[\leadsto x + \color{blue}{\frac{y}{\frac{z}{y}}}\]
  4. Final simplification0.1

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

Reproduce

herbie shell --seed 2019199 
(FPCore (x y z)
  :name "Crypto.Random.Test:calculate from crypto-random-0.0.9"

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

  (+ x (/ (* y y) z)))