Average Error: 17.2 → 0.0
Time: 17.3s
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 r439800 = x;
        double r439801 = y;
        double r439802 = r439800 * r439801;
        double r439803 = r439801 * r439801;
        double r439804 = r439802 + r439803;
        double r439805 = z;
        double r439806 = r439801 * r439805;
        double r439807 = r439804 - r439806;
        double r439808 = r439807 - r439803;
        return r439808;
}

double f(double x, double y, double z) {
        double r439809 = x;
        double r439810 = z;
        double r439811 = r439809 - r439810;
        double r439812 = y;
        double r439813 = r439811 * r439812;
        return r439813;
}

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

Derivation

  1. Initial program 17.2

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

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

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

Reproduce

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

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

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