Average Error: 3.2 → 0.1
Time: 11.2s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -7.045922148172357582559991056998494780309 \cdot 10^{260}:\\ \;\;\;\;x \cdot 1 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \cdot z \le 4.846810561336122803327637730521116709748 \cdot 10^{268}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -7.045922148172357582559991056998494780309 \cdot 10^{260}:\\
\;\;\;\;x \cdot 1 + z \cdot \left(y \cdot \left(-x\right)\right)\\

\mathbf{elif}\;y \cdot z \le 4.846810561336122803327637730521116709748 \cdot 10^{268}:\\
\;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1\\

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

\end{array}
double f(double x, double y, double z) {
        double r13995592 = x;
        double r13995593 = 1.0;
        double r13995594 = y;
        double r13995595 = z;
        double r13995596 = r13995594 * r13995595;
        double r13995597 = r13995593 - r13995596;
        double r13995598 = r13995592 * r13995597;
        return r13995598;
}

double f(double x, double y, double z) {
        double r13995599 = y;
        double r13995600 = z;
        double r13995601 = r13995599 * r13995600;
        double r13995602 = -7.045922148172358e+260;
        bool r13995603 = r13995601 <= r13995602;
        double r13995604 = x;
        double r13995605 = 1.0;
        double r13995606 = r13995604 * r13995605;
        double r13995607 = -r13995604;
        double r13995608 = r13995599 * r13995607;
        double r13995609 = r13995600 * r13995608;
        double r13995610 = r13995606 + r13995609;
        double r13995611 = 4.846810561336123e+268;
        bool r13995612 = r13995601 <= r13995611;
        double r13995613 = -r13995600;
        double r13995614 = r13995613 * r13995599;
        double r13995615 = r13995614 * r13995604;
        double r13995616 = r13995615 + r13995606;
        double r13995617 = r13995612 ? r13995616 : r13995610;
        double r13995618 = r13995603 ? r13995610 : r13995617;
        return r13995618;
}

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) < -7.045922148172358e+260 or 4.846810561336123e+268 < (* y z)

    1. Initial program 40.7

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

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

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

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

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

    if -7.045922148172358e+260 < (* y z) < 4.846810561336123e+268

    1. Initial program 0.1

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

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

      \[\leadsto \color{blue}{x \cdot 1 + 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 -7.045922148172357582559991056998494780309 \cdot 10^{260}:\\ \;\;\;\;x \cdot 1 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \mathbf{elif}\;y \cdot z \le 4.846810561336122803327637730521116709748 \cdot 10^{268}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + z \cdot \left(y \cdot \left(-x\right)\right)\\ \end{array}\]

Reproduce

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