Average Error: 17.8 → 0.0
Time: 12.9s
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 r342099 = x;
        double r342100 = y;
        double r342101 = r342099 * r342100;
        double r342102 = z;
        double r342103 = r342100 * r342102;
        double r342104 = r342101 - r342103;
        double r342105 = r342100 * r342100;
        double r342106 = r342104 - r342105;
        double r342107 = r342106 + r342105;
        return r342107;
}

double f(double x, double y, double z) {
        double r342108 = y;
        double r342109 = x;
        double r342110 = z;
        double r342111 = r342109 - r342110;
        double r342112 = r342108 * r342111;
        return r342112;
}

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

Derivation

  1. Initial program 17.8

    \[\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 2019235 +o rules:numerics
(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)))