Average Error: 17.8 → 0.0
Time: 1.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 r515212 = x;
        double r515213 = y;
        double r515214 = r515212 * r515213;
        double r515215 = z;
        double r515216 = r515213 * r515215;
        double r515217 = r515214 - r515216;
        double r515218 = r515213 * r515213;
        double r515219 = r515217 - r515218;
        double r515220 = r515219 + r515218;
        return r515220;
}

double f(double x, double y, double z) {
        double r515221 = y;
        double r515222 = x;
        double r515223 = z;
        double r515224 = r515222 - r515223;
        double r515225 = r515221 * r515224;
        return r515225;
}

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

Derivation

  1. Initial program 17.8

    \[\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 2020018 
(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)))