Average Error: 17.4 → 0.0
Time: 12.1s
Precision: 64
\[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y\]
\[\left(x - z\right) \cdot y\]
\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\right) + y \cdot y
\left(x - z\right) \cdot y
double f(double x, double y, double z) {
        double r292401 = x;
        double r292402 = y;
        double r292403 = r292401 * r292402;
        double r292404 = z;
        double r292405 = r292402 * r292404;
        double r292406 = r292403 - r292405;
        double r292407 = r292402 * r292402;
        double r292408 = r292406 - r292407;
        double r292409 = r292408 + r292407;
        return r292409;
}

double f(double x, double y, double z) {
        double r292410 = x;
        double r292411 = z;
        double r292412 = r292410 - r292411;
        double r292413 = y;
        double r292414 = r292412 * r292413;
        return r292414;
}

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

Derivation

  1. Initial program 17.4

    \[\left(\left(x \cdot y - y \cdot z\right) - y \cdot y\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 2019347 +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)))