Average Error: 17.2 → 0.0
Time: 15.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 r454496 = x;
        double r454497 = y;
        double r454498 = r454496 * r454497;
        double r454499 = z;
        double r454500 = r454497 * r454499;
        double r454501 = r454498 - r454500;
        double r454502 = r454497 * r454497;
        double r454503 = r454501 - r454502;
        double r454504 = r454503 + r454502;
        return r454504;
}

double f(double x, double y, double z) {
        double r454505 = y;
        double r454506 = x;
        double r454507 = z;
        double r454508 = r454506 - r454507;
        double r454509 = r454505 * r454508;
        return r454509;
}

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 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 2020047 +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)))