Average Error: 13.3 → 0.0
Time: 2.7s
Precision: 64
\[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
\[y \cdot \left(x - z\right)\]
\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z
y \cdot \left(x - z\right)
double f(double x, double y, double z) {
        double r473053 = x;
        double r473054 = y;
        double r473055 = r473053 * r473054;
        double r473056 = r473054 * r473054;
        double r473057 = r473055 - r473056;
        double r473058 = r473057 + r473056;
        double r473059 = z;
        double r473060 = r473054 * r473059;
        double r473061 = r473058 - r473060;
        return r473061;
}

double f(double x, double y, double z) {
        double r473062 = y;
        double r473063 = x;
        double r473064 = z;
        double r473065 = r473063 - r473064;
        double r473066 = r473062 * r473065;
        return r473066;
}

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

Original13.3
Target0.0
Herbie0.0
\[\left(x - z\right) \cdot y\]

Derivation

  1. Initial program 13.3

    \[\left(\left(x \cdot y - y \cdot y\right) + y \cdot y\right) - y \cdot z\]
  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 2020036 +o rules:numerics
(FPCore (x y z)
  :name "Linear.Quaternion:$c/ from linear-1.19.1.3, D"
  :precision binary64

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

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