Average Error: 3.1 → 0.2
Time: 42.6s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;\left(1 - y \cdot z\right) \cdot x = -\infty:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(-y\right) + 1 \cdot x\\ \mathbf{elif}\;\left(1 - y \cdot z\right) \cdot x \le 3.14084752202982757700247759812715423514 \cdot 10^{296}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(-y\right) + 1 \cdot x\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;\left(1 - y \cdot z\right) \cdot x = -\infty:\\
\;\;\;\;\left(z \cdot x\right) \cdot \left(-y\right) + 1 \cdot x\\

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

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

\end{array}
double f(double x, double y, double z) {
        double r12525461 = x;
        double r12525462 = 1.0;
        double r12525463 = y;
        double r12525464 = z;
        double r12525465 = r12525463 * r12525464;
        double r12525466 = r12525462 - r12525465;
        double r12525467 = r12525461 * r12525466;
        return r12525467;
}

double f(double x, double y, double z) {
        double r12525468 = 1.0;
        double r12525469 = y;
        double r12525470 = z;
        double r12525471 = r12525469 * r12525470;
        double r12525472 = r12525468 - r12525471;
        double r12525473 = x;
        double r12525474 = r12525472 * r12525473;
        double r12525475 = -inf.0;
        bool r12525476 = r12525474 <= r12525475;
        double r12525477 = r12525470 * r12525473;
        double r12525478 = -r12525469;
        double r12525479 = r12525477 * r12525478;
        double r12525480 = r12525468 * r12525473;
        double r12525481 = r12525479 + r12525480;
        double r12525482 = 3.1408475220298276e+296;
        bool r12525483 = r12525474 <= r12525482;
        double r12525484 = r12525483 ? r12525474 : r12525481;
        double r12525485 = r12525476 ? r12525481 : r12525484;
        return r12525485;
}

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 (* x (- 1.0 (* y z))) < -inf.0 or 3.1408475220298276e+296 < (* x (- 1.0 (* y z)))

    1. Initial program 55.4

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

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

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

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

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

    if -inf.0 < (* x (- 1.0 (* y z))) < 3.1408475220298276e+296

    1. Initial program 0.1

      \[x \cdot \left(1 - y \cdot z\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;\left(1 - y \cdot z\right) \cdot x = -\infty:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(-y\right) + 1 \cdot x\\ \mathbf{elif}\;\left(1 - y \cdot z\right) \cdot x \le 3.14084752202982757700247759812715423514 \cdot 10^{296}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(z \cdot x\right) \cdot \left(-y\right) + 1 \cdot x\\ \end{array}\]

Reproduce

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