Average Error: 17.5 → 0.0
Time: 2.0s
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 r461997 = x;
        double r461998 = y;
        double r461999 = r461997 * r461998;
        double r462000 = z;
        double r462001 = r461998 * r462000;
        double r462002 = r461999 - r462001;
        double r462003 = r461998 * r461998;
        double r462004 = r462002 - r462003;
        double r462005 = r462004 + r462003;
        return r462005;
}

double f(double x, double y, double z) {
        double r462006 = y;
        double r462007 = x;
        double r462008 = z;
        double r462009 = r462007 - r462008;
        double r462010 = r462006 * r462009;
        return r462010;
}

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

Derivation

  1. Initial program 17.5

    \[\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 2020100 
(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)))