Average Error: 3.4 → 0.1
Time: 10.2s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z = -\infty:\\ \;\;\;\;x \cdot 1 + \left(-\left(x \cdot y\right) \cdot z\right)\\ \mathbf{elif}\;y \cdot z \le 1.118140344414636535716189116379210877009 \cdot 10^{299}:\\ \;\;\;\;\left(-\left(y \cdot z\right) \cdot x\right) + x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + y \cdot \left(z \cdot \left(-x\right)\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z = -\infty:\\
\;\;\;\;x \cdot 1 + \left(-\left(x \cdot y\right) \cdot z\right)\\

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

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

\end{array}
double f(double x, double y, double z) {
        double r161244 = x;
        double r161245 = 1.0;
        double r161246 = y;
        double r161247 = z;
        double r161248 = r161246 * r161247;
        double r161249 = r161245 - r161248;
        double r161250 = r161244 * r161249;
        return r161250;
}

double f(double x, double y, double z) {
        double r161251 = y;
        double r161252 = z;
        double r161253 = r161251 * r161252;
        double r161254 = -inf.0;
        bool r161255 = r161253 <= r161254;
        double r161256 = x;
        double r161257 = 1.0;
        double r161258 = r161256 * r161257;
        double r161259 = r161256 * r161251;
        double r161260 = r161259 * r161252;
        double r161261 = -r161260;
        double r161262 = r161258 + r161261;
        double r161263 = 1.1181403444146365e+299;
        bool r161264 = r161253 <= r161263;
        double r161265 = r161253 * r161256;
        double r161266 = -r161265;
        double r161267 = r161266 + r161258;
        double r161268 = -r161256;
        double r161269 = r161252 * r161268;
        double r161270 = r161251 * r161269;
        double r161271 = r161258 + r161270;
        double r161272 = r161264 ? r161267 : r161271;
        double r161273 = r161255 ? r161262 : r161272;
        return r161273;
}

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) < -inf.0

    1. Initial program 64.0

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

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

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

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

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

      \[\leadsto x \cdot 1 + \left(-\color{blue}{x \cdot \left(y \cdot z\right)}\right)\]
    9. Using strategy rm
    10. Applied associate-*r*0.2

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

    if -inf.0 < (* y z) < 1.1181403444146365e+299

    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)}\]
    5. Simplified4.9

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

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

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

    if 1.1181403444146365e+299 < (* y z)

    1. Initial program 58.5

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

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

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

      \[\leadsto x \cdot 1 + \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 = -\infty:\\ \;\;\;\;x \cdot 1 + \left(-\left(x \cdot y\right) \cdot z\right)\\ \mathbf{elif}\;y \cdot z \le 1.118140344414636535716189116379210877009 \cdot 10^{299}:\\ \;\;\;\;\left(-\left(y \cdot z\right) \cdot x\right) + x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + y \cdot \left(z \cdot \left(-x\right)\right)\\ \end{array}\]

Reproduce

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