Average Error: 3.7 → 0.1
Time: 9.4s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -7.974065632240983415783207279172197002986 \cdot 10^{272} \lor \neg \left(y \cdot z \le 8.221316783560847738732585159243477703816 \cdot 10^{219}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -7.974065632240983415783207279172197002986 \cdot 10^{272} \lor \neg \left(y \cdot z \le 8.221316783560847738732585159243477703816 \cdot 10^{219}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r220521 = x;
        double r220522 = 1.0;
        double r220523 = y;
        double r220524 = z;
        double r220525 = r220523 * r220524;
        double r220526 = r220522 - r220525;
        double r220527 = r220521 * r220526;
        return r220527;
}

double f(double x, double y, double z) {
        double r220528 = y;
        double r220529 = z;
        double r220530 = r220528 * r220529;
        double r220531 = -7.974065632240983e+272;
        bool r220532 = r220530 <= r220531;
        double r220533 = 8.221316783560848e+219;
        bool r220534 = r220530 <= r220533;
        double r220535 = !r220534;
        bool r220536 = r220532 || r220535;
        double r220537 = x;
        double r220538 = 1.0;
        double r220539 = r220537 * r220538;
        double r220540 = r220537 * r220528;
        double r220541 = -r220529;
        double r220542 = r220540 * r220541;
        double r220543 = r220539 + r220542;
        double r220544 = r220538 - r220530;
        double r220545 = r220544 * r220537;
        double r220546 = r220536 ? r220543 : r220545;
        return r220546;
}

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.974065632240983e+272 or 8.221316783560848e+219 < (* y z)

    1. Initial program 37.7

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

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

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(z \cdot x\right) \cdot \left(-y\right)}\]
    6. Taylor expanded around inf 37.7

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

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

    if -7.974065632240983e+272 < (* y z) < 8.221316783560848e+219

    1. Initial program 0.1

      \[x \cdot \left(1 - 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.974065632240983415783207279172197002986 \cdot 10^{272} \lor \neg \left(y \cdot z \le 8.221316783560847738732585159243477703816 \cdot 10^{219}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \end{array}\]

Reproduce

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