Average Error: 0.2 → 0.2
Time: 10.0s
Precision: 64
\[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
\[x + \left(y \cdot \left(z \cdot 6\right) + \left(-x\right) \cdot \left(z \cdot 6\right)\right)\]
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
x + \left(y \cdot \left(z \cdot 6\right) + \left(-x\right) \cdot \left(z \cdot 6\right)\right)
double f(double x, double y, double z) {
        double r524680 = x;
        double r524681 = y;
        double r524682 = r524681 - r524680;
        double r524683 = 6.0;
        double r524684 = r524682 * r524683;
        double r524685 = z;
        double r524686 = r524684 * r524685;
        double r524687 = r524680 + r524686;
        return r524687;
}

double f(double x, double y, double z) {
        double r524688 = x;
        double r524689 = y;
        double r524690 = z;
        double r524691 = 6.0;
        double r524692 = r524690 * r524691;
        double r524693 = r524689 * r524692;
        double r524694 = -r524688;
        double r524695 = r524694 * r524692;
        double r524696 = r524693 + r524695;
        double r524697 = r524688 + r524696;
        return r524697;
}

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

Derivation

  1. Initial program 0.2

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z\]
  2. Using strategy rm
  3. Applied pow10.2

    \[\leadsto x + \left(\left(y - x\right) \cdot 6\right) \cdot \color{blue}{{z}^{1}}\]
  4. Applied pow10.2

    \[\leadsto x + \left(\left(y - x\right) \cdot \color{blue}{{6}^{1}}\right) \cdot {z}^{1}\]
  5. Applied pow10.2

    \[\leadsto x + \left(\color{blue}{{\left(y - x\right)}^{1}} \cdot {6}^{1}\right) \cdot {z}^{1}\]
  6. Applied pow-prod-down0.2

    \[\leadsto x + \color{blue}{{\left(\left(y - x\right) \cdot 6\right)}^{1}} \cdot {z}^{1}\]
  7. Applied pow-prod-down0.2

    \[\leadsto x + \color{blue}{{\left(\left(\left(y - x\right) \cdot 6\right) \cdot z\right)}^{1}}\]
  8. Simplified0.2

    \[\leadsto x + {\color{blue}{\left(\left(6 \cdot z\right) \cdot \left(y - x\right)\right)}}^{1}\]
  9. Using strategy rm
  10. Applied sub-neg0.2

    \[\leadsto x + {\left(\left(6 \cdot z\right) \cdot \color{blue}{\left(y + \left(-x\right)\right)}\right)}^{1}\]
  11. Applied distribute-lft-in0.2

    \[\leadsto x + {\color{blue}{\left(\left(6 \cdot z\right) \cdot y + \left(6 \cdot z\right) \cdot \left(-x\right)\right)}}^{1}\]
  12. Simplified0.2

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

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

Reproduce

herbie shell --seed 2019179 
(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)))