Average Error: 0.2 → 0.2
Time: 11.6s
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 r598996 = x;
        double r598997 = y;
        double r598998 = r598997 - r598996;
        double r598999 = 6.0;
        double r599000 = r598998 * r598999;
        double r599001 = z;
        double r599002 = r599000 * r599001;
        double r599003 = r598996 + r599002;
        return r599003;
}

double f(double x, double y, double z) {
        double r599004 = x;
        double r599005 = y;
        double r599006 = r599005 - r599004;
        double r599007 = z;
        double r599008 = 6.0;
        double r599009 = r599007 * r599008;
        double r599010 = r599006 * r599009;
        double r599011 = r599004 + r599010;
        return r599011;
}

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 2019305 
(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)))