Average Error: 17.7 → 0.0
Time: 34.7s
Precision: 64
\[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r26013798 = x;
        double r26013799 = y;
        double r26013800 = r26013798 * r26013799;
        double r26013801 = r26013799 * r26013799;
        double r26013802 = r26013800 + r26013801;
        double r26013803 = z;
        double r26013804 = r26013799 * r26013803;
        double r26013805 = r26013802 - r26013804;
        double r26013806 = r26013805 - r26013801;
        return r26013806;
}

double f(double x, double y, double z) {
        double r26013807 = x;
        double r26013808 = z;
        double r26013809 = r26013807 - r26013808;
        double r26013810 = y;
        double r26013811 = r26013809 * r26013810;
        return r26013811;
}

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.7
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 17.7

    \[\left(\left(x \cdot y + y \cdot y\right) - y \cdot z\right) - y \cdot y\]
  2. Simplified0.0

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

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

Reproduce

herbie shell --seed 2019168 +o rules:numerics
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, C"

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

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