Average Error: 0.3 → 0.2
Time: 12.5s
Precision: 64
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
\[x - \left(\left(x - y\right) \cdot z\right) \cdot 6\]
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
x - \left(\left(x - y\right) \cdot z\right) \cdot 6
double f(double x, double y, double z) {
        double r673965 = x;
        double r673966 = y;
        double r673967 = r673966 - r673965;
        double r673968 = 6.0;
        double r673969 = r673967 * r673968;
        double r673970 = z;
        double r673971 = r673969 * r673970;
        double r673972 = r673965 + r673971;
        return r673972;
}

double f(double x, double y, double z) {
        double r673973 = x;
        double r673974 = y;
        double r673975 = r673973 - r673974;
        double r673976 = z;
        double r673977 = r673975 * r673976;
        double r673978 = 6.0;
        double r673979 = r673977 * r673978;
        double r673980 = r673973 - r673979;
        return r673980;
}

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

Derivation

  1. Initial program 0.3

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
  2. Simplified0.2

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

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

Reproduce

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

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

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