Average Error: 0.4 → 0.2
Time: 15.6s
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 r19855358 = x;
        double r19855359 = y;
        double r19855360 = r19855359 - r19855358;
        double r19855361 = 6.0;
        double r19855362 = r19855360 * r19855361;
        double r19855363 = 2.0;
        double r19855364 = 3.0;
        double r19855365 = r19855363 / r19855364;
        double r19855366 = z;
        double r19855367 = r19855365 - r19855366;
        double r19855368 = r19855362 * r19855367;
        double r19855369 = r19855358 + r19855368;
        return r19855369;
}

double f(double x, double y, double z) {
        double r19855370 = x;
        double r19855371 = y;
        double r19855372 = r19855371 - r19855370;
        double r19855373 = 4.0;
        double r19855374 = 6.0;
        double r19855375 = z;
        double r19855376 = r19855374 * r19855375;
        double r19855377 = r19855373 - r19855376;
        double r19855378 = r19855372 * r19855377;
        double r19855379 = r19855370 + r19855378;
        return r19855379;
}

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. Taylor expanded around 0 0.2

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

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

Reproduce

herbie shell --seed 2019174 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, D"
  (+ x (* (* (- y x) 6.0) (- (/ 2.0 3.0) z))))