Average Error: 17.9 → 0.0
Time: 13.5s
Precision: 64
\[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r406145 = x;
        double r406146 = y;
        double r406147 = r406145 * r406146;
        double r406148 = z;
        double r406149 = r406146 * r406148;
        double r406150 = r406147 - r406149;
        double r406151 = r406146 * r406146;
        double r406152 = r406150 - r406151;
        double r406153 = r406152 + r406151;
        return r406153;
}

double f(double x, double y, double z) {
        double r406154 = y;
        double r406155 = x;
        double r406156 = z;
        double r406157 = r406155 - r406156;
        double r406158 = r406154 * r406157;
        return r406158;
}

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

Derivation

  1. Initial program 17.9

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

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

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

Reproduce

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

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

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