Average Error: 0.4 → 0.2
Time: 12.8s
Precision: 64
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)\]
\[x + \left(y - x\right) \cdot \left(4 - 6 \cdot z\right)\]
x + \left(\left(y - x\right) \cdot 6\right) \cdot \left(\frac{2}{3} - z\right)
x + \left(y - x\right) \cdot \left(4 - 6 \cdot z\right)
double f(double x, double y, double z) {
        double r205047 = x;
        double r205048 = y;
        double r205049 = r205048 - r205047;
        double r205050 = 6.0;
        double r205051 = r205049 * r205050;
        double r205052 = 2.0;
        double r205053 = 3.0;
        double r205054 = r205052 / r205053;
        double r205055 = z;
        double r205056 = r205054 - r205055;
        double r205057 = r205051 * r205056;
        double r205058 = r205047 + r205057;
        return r205058;
}

double f(double x, double y, double z) {
        double r205059 = x;
        double r205060 = y;
        double r205061 = r205060 - r205059;
        double r205062 = 4.0;
        double r205063 = 6.0;
        double r205064 = z;
        double r205065 = r205063 * r205064;
        double r205066 = r205062 - r205065;
        double r205067 = r205061 * r205066;
        double r205068 = r205059 + r205067;
        return r205068;
}

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

Derivation

  1. Initial program 0.4

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

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

    \[\leadsto x + \left(y - x\right) \cdot \color{blue}{\left(\left(\frac{2}{3} - z\right) \cdot 6\right)}\]
  5. Taylor expanded around 0 0.2

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

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

Reproduce

herbie shell --seed 2019208 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
  :precision binary64
  (+ x (* (* (- y x) 6) (- (/ 2 3) z))))