Average Error: 3.3 → 0.1
Time: 2.9s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z = -\infty \lor \neg \left(y \cdot z \le 1.7145326546445985 \cdot 10^{216}\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 = -\infty \lor \neg \left(y \cdot z \le 1.7145326546445985 \cdot 10^{216}\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 r258533 = x;
        double r258534 = 1.0;
        double r258535 = y;
        double r258536 = z;
        double r258537 = r258535 * r258536;
        double r258538 = r258534 - r258537;
        double r258539 = r258533 * r258538;
        return r258539;
}

double f(double x, double y, double z) {
        double r258540 = y;
        double r258541 = z;
        double r258542 = r258540 * r258541;
        double r258543 = -inf.0;
        bool r258544 = r258542 <= r258543;
        double r258545 = 1.7145326546445985e+216;
        bool r258546 = r258542 <= r258545;
        double r258547 = !r258546;
        bool r258548 = r258544 || r258547;
        double r258549 = x;
        double r258550 = 1.0;
        double r258551 = r258549 * r258550;
        double r258552 = -r258540;
        double r258553 = r258549 * r258552;
        double r258554 = r258553 * r258541;
        double r258555 = r258551 + r258554;
        double r258556 = -r258542;
        double r258557 = r258549 * r258556;
        double r258558 = r258551 + r258557;
        double r258559 = r258548 ? r258555 : r258558;
        return r258559;
}

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) < -inf.0 or 1.7145326546445985e+216 < (* y z)

    1. Initial program 40.9

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

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

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

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

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

    if -inf.0 < (* y z) < 1.7145326546445985e+216

    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 = -\infty \lor \neg \left(y \cdot z \le 1.7145326546445985 \cdot 10^{216}\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 2020049 
(FPCore (x y z)
  :name "Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I"
  :precision binary64
  (* x (- 1 (* y z))))