Average Error: 0.2 → 0.2
Time: 21.7s
Precision: 64
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
\[x + \left(y - x\right) \cdot \left(z \cdot 6\right)\]
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
x + \left(y - x\right) \cdot \left(z \cdot 6\right)
double f(double x, double y, double z) {
        double r526966 = x;
        double r526967 = y;
        double r526968 = r526967 - r526966;
        double r526969 = 6.0;
        double r526970 = r526968 * r526969;
        double r526971 = z;
        double r526972 = r526970 * r526971;
        double r526973 = r526966 + r526972;
        return r526973;
}

double f(double x, double y, double z) {
        double r526974 = x;
        double r526975 = y;
        double r526976 = r526975 - r526974;
        double r526977 = z;
        double r526978 = 6.0;
        double r526979 = r526977 * r526978;
        double r526980 = r526976 * r526979;
        double r526981 = r526974 + r526980;
        return r526981;
}

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

Original0.2
Target0.2
Herbie0.2
\[x - \left(6 \cdot z\right) \cdot \left(x - y\right)\]

Derivation

  1. Initial program 0.2

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
  2. Using strategy rm
  3. Applied associate-*l*0.2

    \[\leadsto x + \color{blue}{\left(y - x\right) \cdot \left(6 \cdot z\right)}\]
  4. Simplified0.2

    \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\left(z \cdot 6\right)}\]
  5. Final simplification0.2

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

Reproduce

herbie shell --seed 2019323 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
  :precision binary64

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

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