Average Error: 3.5 → 0.2
Time: 3.5s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -5.502853476493287108664067547505324618218 \cdot 10^{273} \lor \neg \left(y \cdot z \le 9.798575094590936461122103996339115341588 \cdot 10^{168}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot \left(-y\right)\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -5.502853476493287108664067547505324618218 \cdot 10^{273} \lor \neg \left(y \cdot z \le 9.798575094590936461122103996339115341588 \cdot 10^{168}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot \left(-y\right)\right) \cdot z\\

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

\end{array}
double f(double x, double y, double z) {
        double r224617 = x;
        double r224618 = 1.0;
        double r224619 = y;
        double r224620 = z;
        double r224621 = r224619 * r224620;
        double r224622 = r224618 - r224621;
        double r224623 = r224617 * r224622;
        return r224623;
}

double f(double x, double y, double z) {
        double r224624 = y;
        double r224625 = z;
        double r224626 = r224624 * r224625;
        double r224627 = -5.502853476493287e+273;
        bool r224628 = r224626 <= r224627;
        double r224629 = 9.798575094590936e+168;
        bool r224630 = r224626 <= r224629;
        double r224631 = !r224630;
        bool r224632 = r224628 || r224631;
        double r224633 = x;
        double r224634 = 1.0;
        double r224635 = r224633 * r224634;
        double r224636 = -r224624;
        double r224637 = r224633 * r224636;
        double r224638 = r224637 * r224625;
        double r224639 = r224635 + r224638;
        double r224640 = -r224626;
        double r224641 = r224633 * r224640;
        double r224642 = r224635 + r224641;
        double r224643 = r224632 ? r224639 : r224642;
        return r224643;
}

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) < -5.502853476493287e+273 or 9.798575094590936e+168 < (* y z)

    1. Initial program 29.3

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

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

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

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

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

    if -5.502853476493287e+273 < (* y z) < 9.798575094590936e+168

    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.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -5.502853476493287108664067547505324618218 \cdot 10^{273} \lor \neg \left(y \cdot z \le 9.798575094590936461122103996339115341588 \cdot 10^{168}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot \left(-y\right)\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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