Average Error: 3.3 → 0.1
Time: 15.5s
Precision: 64
\[x \cdot \left(1.0 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -8.84547935891779 \cdot 10^{+307}:\\ \;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \cdot z \le 2.760501739540755 \cdot 10^{+210}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1.0\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \end{array}\]
x \cdot \left(1.0 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -8.84547935891779 \cdot 10^{+307}:\\
\;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\

\mathbf{elif}\;y \cdot z \le 2.760501739540755 \cdot 10^{+210}:\\
\;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1.0\\

\mathbf{else}:\\
\;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\

\end{array}
double f(double x, double y, double z) {
        double r8382611 = x;
        double r8382612 = 1.0;
        double r8382613 = y;
        double r8382614 = z;
        double r8382615 = r8382613 * r8382614;
        double r8382616 = r8382612 - r8382615;
        double r8382617 = r8382611 * r8382616;
        return r8382617;
}

double f(double x, double y, double z) {
        double r8382618 = y;
        double r8382619 = z;
        double r8382620 = r8382618 * r8382619;
        double r8382621 = -8.84547935891779e+307;
        bool r8382622 = r8382620 <= r8382621;
        double r8382623 = x;
        double r8382624 = 1.0;
        double r8382625 = r8382623 * r8382624;
        double r8382626 = -r8382623;
        double r8382627 = r8382618 * r8382626;
        double r8382628 = r8382619 * r8382627;
        double r8382629 = r8382625 + r8382628;
        double r8382630 = 2.760501739540755e+210;
        bool r8382631 = r8382620 <= r8382630;
        double r8382632 = -r8382619;
        double r8382633 = r8382632 * r8382618;
        double r8382634 = r8382633 * r8382623;
        double r8382635 = r8382634 + r8382625;
        double r8382636 = r8382631 ? r8382635 : r8382629;
        double r8382637 = r8382622 ? r8382629 : r8382636;
        return r8382637;
}

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. Split input into 2 regimes
  2. if (* y z) < -8.84547935891779e+307 or 2.760501739540755e+210 < (* y z)

    1. Initial program 37.5

      \[x \cdot \left(1.0 - y \cdot z\right)\]
    2. Using strategy rm
    3. Applied sub-neg37.5

      \[\leadsto x \cdot \color{blue}{\left(1.0 + \left(-y \cdot z\right)\right)}\]
    4. Applied distribute-lft-in37.5

      \[\leadsto \color{blue}{x \cdot 1.0 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied distribute-rgt-neg-in37.5

      \[\leadsto x \cdot 1.0 + x \cdot \color{blue}{\left(y \cdot \left(-z\right)\right)}\]
    7. Applied associate-*r*0.7

      \[\leadsto x \cdot 1.0 + \color{blue}{\left(x \cdot y\right) \cdot \left(-z\right)}\]

    if -8.84547935891779e+307 < (* y z) < 2.760501739540755e+210

    1. Initial program 0.1

      \[x \cdot \left(1.0 - y \cdot z\right)\]
    2. Using strategy rm
    3. Applied sub-neg0.1

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

      \[\leadsto \color{blue}{x \cdot 1.0 + x \cdot \left(-y \cdot z\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.1

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -8.84547935891779 \cdot 10^{+307}:\\ \;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \cdot z \le 2.760501739540755 \cdot 10^{+210}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1.0\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1.0 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \end{array}\]

Reproduce

herbie shell --seed 2019158 +o rules:numerics
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  (* x (- 1.0 (* y z))))