Average Error: 3.6 → 0.4
Time: 10.8s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z = -\infty:\\ \;\;\;\;1 \cdot x + \left(\left(-x\right) \cdot z\right) \cdot y\\ \mathbf{elif}\;y \cdot z \le 3.154329465624896176147133895796378764016 \cdot 10^{131}:\\ \;\;\;\;\left(-x \cdot \left(y \cdot z\right)\right) + 1 \cdot x\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + \left(\left(-x\right) \cdot z\right) \cdot y\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z = -\infty:\\
\;\;\;\;1 \cdot x + \left(\left(-x\right) \cdot z\right) \cdot y\\

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

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

\end{array}
double f(double x, double y, double z) {
        double r13054631 = x;
        double r13054632 = 1.0;
        double r13054633 = y;
        double r13054634 = z;
        double r13054635 = r13054633 * r13054634;
        double r13054636 = r13054632 - r13054635;
        double r13054637 = r13054631 * r13054636;
        return r13054637;
}

double f(double x, double y, double z) {
        double r13054638 = y;
        double r13054639 = z;
        double r13054640 = r13054638 * r13054639;
        double r13054641 = -inf.0;
        bool r13054642 = r13054640 <= r13054641;
        double r13054643 = 1.0;
        double r13054644 = x;
        double r13054645 = r13054643 * r13054644;
        double r13054646 = -r13054644;
        double r13054647 = r13054646 * r13054639;
        double r13054648 = r13054647 * r13054638;
        double r13054649 = r13054645 + r13054648;
        double r13054650 = 3.154329465624896e+131;
        bool r13054651 = r13054640 <= r13054650;
        double r13054652 = r13054644 * r13054640;
        double r13054653 = -r13054652;
        double r13054654 = r13054653 + r13054645;
        double r13054655 = r13054651 ? r13054654 : r13054649;
        double r13054656 = r13054642 ? r13054649 : r13054655;
        return r13054656;
}

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 3.154329465624896e+131 < (* y z)

    1. Initial program 27.7

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

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

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

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

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

    if -inf.0 < (* y z) < 3.154329465624896e+131

    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-rgt-in0.1

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

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

Reproduce

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