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 r440014 = x;
        double r440015 = y;
        double r440016 = r440014 * r440015;
        double r440017 = r440015 * r440015;
        double r440018 = r440016 + r440017;
        double r440019 = z;
        double r440020 = r440015 * r440019;
        double r440021 = r440018 - r440020;
        double r440022 = r440021 - r440017;
        return r440022;
}

double f(double x, double y, double z) {
        double r440023 = x;
        double r440024 = y;
        double r440025 = r440023 * r440024;
        double r440026 = z;
        double r440027 = r440024 * r440026;
        double r440028 = -r440027;
        double r440029 = r440025 + r440028;
        return r440029;
}

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)))