Average Error: 17.6 → 0.0
Time: 23.7s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[x \cdot y + \left(-y \cdot z\right)\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
x \cdot y + \left(-y \cdot z\right)
double f(double x, double y, double z) {
        double r333288 = x;
        double r333289 = y;
        double r333290 = r333288 * r333289;
        double r333291 = r333289 * r333289;
        double r333292 = r333290 + r333291;
        double r333293 = z;
        double r333294 = r333289 * r333293;
        double r333295 = r333292 - r333294;
        double r333296 = r333295 - r333291;
        return r333296;
}

double f(double x, double y, double z) {
        double r333297 = x;
        double r333298 = y;
        double r333299 = r333297 * r333298;
        double r333300 = z;
        double r333301 = r333298 * r333300;
        double r333302 = -r333301;
        double r333303 = r333299 + r333302;
        return r333303;
}

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

Original17.6
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 17.6

    \[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
  2. Using strategy rm
  3. Applied associate--l+17.6

    \[\leadsto \color{blue}{\left(x \cdot y + \left(y \cdot y - y \cdot z\right)\right)} - y \cdot y\]
  4. Applied associate--l+12.9

    \[\leadsto \color{blue}{x \cdot y + \left(\left(y \cdot y - y \cdot z\right) - y \cdot y\right)}\]
  5. Simplified0.0

    \[\leadsto x \cdot y + \color{blue}{\left(-y \cdot z\right)}\]
  6. Final simplification0.0

    \[\leadsto x \cdot y + \left(-y \cdot z\right)\]

Reproduce

herbie shell --seed 2019326 
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, C"
  :precision binary64

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

  (- (- (+ (* x y) (* y y)) (* y z)) (* y y)))