Average Error: 3.3 → 0.1
Time: 14.9s
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(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \cdot z \le 1.6330381083416007 \cdot 10^{+228}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1.0\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1.0 + y \cdot \left(\left(-z\right) \cdot x\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(x \cdot \left(-y\right)\right)\\

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

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

\end{array}
double f(double x, double y, double z) {
        double r12266471 = x;
        double r12266472 = 1.0;
        double r12266473 = y;
        double r12266474 = z;
        double r12266475 = r12266473 * r12266474;
        double r12266476 = r12266472 - r12266475;
        double r12266477 = r12266471 * r12266476;
        return r12266477;
}

double f(double x, double y, double z) {
        double r12266478 = y;
        double r12266479 = z;
        double r12266480 = r12266478 * r12266479;
        double r12266481 = -8.84547935891779e+307;
        bool r12266482 = r12266480 <= r12266481;
        double r12266483 = x;
        double r12266484 = 1.0;
        double r12266485 = r12266483 * r12266484;
        double r12266486 = -r12266478;
        double r12266487 = r12266483 * r12266486;
        double r12266488 = r12266479 * r12266487;
        double r12266489 = r12266485 + r12266488;
        double r12266490 = 1.6330381083416007e+228;
        bool r12266491 = r12266480 <= r12266490;
        double r12266492 = -r12266479;
        double r12266493 = r12266492 * r12266478;
        double r12266494 = r12266493 * r12266483;
        double r12266495 = r12266494 + r12266485;
        double r12266496 = r12266492 * r12266483;
        double r12266497 = r12266478 * r12266496;
        double r12266498 = r12266485 + r12266497;
        double r12266499 = r12266491 ? r12266495 : r12266498;
        double r12266500 = r12266482 ? r12266489 : r12266499;
        return r12266500;
}

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 3 regimes
  2. if (* y z) < -8.84547935891779e+307

    1. Initial program 59.7

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

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

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

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

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

    if -8.84547935891779e+307 < (* y z) < 1.6330381083416007e+228

    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)}\]

    if 1.6330381083416007e+228 < (* y z)

    1. Initial program 31.4

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

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

      \[\leadsto \color{blue}{x \cdot 1.0 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt31.9

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

      \[\leadsto x \cdot 1.0 + \color{blue}{\left(x \cdot \left(\sqrt[3]{-y \cdot z} \cdot \sqrt[3]{-y \cdot z}\right)\right) \cdot \sqrt[3]{-y \cdot z}}\]
    8. Using strategy rm
    9. Applied associate-*r*31.9

      \[\leadsto x \cdot 1.0 + \color{blue}{\left(\left(x \cdot \sqrt[3]{-y \cdot z}\right) \cdot \sqrt[3]{-y \cdot z}\right)} \cdot \sqrt[3]{-y \cdot z}\]
    10. Taylor expanded around inf 31.4

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

      \[\leadsto x \cdot 1.0 + \color{blue}{\left(z \cdot x\right) \cdot \left(-y\right)}\]
  3. Recombined 3 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(x \cdot \left(-y\right)\right)\\ \mathbf{elif}\;y \cdot z \le 1.6330381083416007 \cdot 10^{+228}:\\ \;\;\;\;\left(\left(-z\right) \cdot y\right) \cdot x + x \cdot 1.0\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1.0 + y \cdot \left(\left(-z\right) \cdot x\right)\\ \end{array}\]

Reproduce

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