Average Error: 0.4 → 0.2
Time: 12.5s
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 r346545 = x;
        double r346546 = y;
        double r346547 = r346546 - r346545;
        double r346548 = 6.0;
        double r346549 = r346547 * r346548;
        double r346550 = 2.0;
        double r346551 = 3.0;
        double r346552 = r346550 / r346551;
        double r346553 = z;
        double r346554 = r346552 - r346553;
        double r346555 = r346549 * r346554;
        double r346556 = r346545 + r346555;
        return r346556;
}

double f(double x, double y, double z) {
        double r346557 = x;
        double r346558 = y;
        double r346559 = r346558 - r346557;
        double r346560 = 4.0;
        double r346561 = 6.0;
        double r346562 = z;
        double r346563 = r346561 * r346562;
        double r346564 = r346560 - r346563;
        double r346565 = r346559 * r346564;
        double r346566 = r346557 + r346565;
        return r346566;
}

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