Average Error: 0.4 → 0.2
Time: 22.3s
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 r31986 = x;
        double r31987 = y;
        double r31988 = r31987 - r31986;
        double r31989 = 6.0;
        double r31990 = r31988 * r31989;
        double r31991 = 2.0;
        double r31992 = 3.0;
        double r31993 = r31991 / r31992;
        double r31994 = z;
        double r31995 = r31993 - r31994;
        double r31996 = r31990 * r31995;
        double r31997 = r31986 + r31996;
        return r31997;
}

double f(double x, double y, double z) {
        double r31998 = x;
        double r31999 = y;
        double r32000 = r31999 - r31998;
        double r32001 = 4.0;
        double r32002 = 6.0;
        double r32003 = z;
        double r32004 = r32002 * r32003;
        double r32005 = r32001 - r32004;
        double r32006 = r32000 * r32005;
        double r32007 = r31998 + r32006;
        return r32007;
}

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