Average Error: 17.4 → 0.0
Time: 16.6s
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 r367373 = x;
        double r367374 = y;
        double r367375 = r367373 * r367374;
        double r367376 = z;
        double r367377 = r367374 * r367376;
        double r367378 = r367375 - r367377;
        double r367379 = r367374 * r367374;
        double r367380 = r367378 - r367379;
        double r367381 = r367380 + r367379;
        return r367381;
}

double f(double x, double y, double z) {
        double r367382 = y;
        double r367383 = x;
        double r367384 = z;
        double r367385 = r367383 - r367384;
        double r367386 = r367382 * r367385;
        return r367386;
}

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}{y \cdot \left(x - z\right)}\]
  3. Final simplification0.0

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

Reproduce

herbie shell --seed 2019303 
(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)))