Average Error: 3.3 → 0.2
Time: 16.8s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -1.17685647831489084453456189150995397973 \cdot 10^{221} \lor \neg \left(y \cdot z \le 7.312372482130218940754485960634465779355 \cdot 10^{187}\right):\\ \;\;\;\;x \cdot 1 + \left(-y\right) \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(-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 -1.17685647831489084453456189150995397973 \cdot 10^{221} \lor \neg \left(y \cdot z \le 7.312372482130218940754485960634465779355 \cdot 10^{187}\right):\\
\;\;\;\;x \cdot 1 + \left(-y\right) \cdot \left(z \cdot x\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r186032 = x;
        double r186033 = 1.0;
        double r186034 = y;
        double r186035 = z;
        double r186036 = r186034 * r186035;
        double r186037 = r186033 - r186036;
        double r186038 = r186032 * r186037;
        return r186038;
}

double f(double x, double y, double z) {
        double r186039 = y;
        double r186040 = z;
        double r186041 = r186039 * r186040;
        double r186042 = -1.1768564783148908e+221;
        bool r186043 = r186041 <= r186042;
        double r186044 = 7.312372482130219e+187;
        bool r186045 = r186041 <= r186044;
        double r186046 = !r186045;
        bool r186047 = r186043 || r186046;
        double r186048 = x;
        double r186049 = 1.0;
        double r186050 = r186048 * r186049;
        double r186051 = -r186039;
        double r186052 = r186040 * r186048;
        double r186053 = r186051 * r186052;
        double r186054 = r186050 + r186053;
        double r186055 = -r186041;
        double r186056 = r186055 * r186048;
        double r186057 = r186050 + r186056;
        double r186058 = r186047 ? r186054 : r186057;
        return r186058;
}

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) < -1.1768564783148908e+221 or 7.312372482130219e+187 < (* y z)

    1. Initial program 27.5

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

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

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

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

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

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

    if -1.1768564783148908e+221 < (* y z) < 7.312372482130219e+187

    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. Simplified0.1

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -1.17685647831489084453456189150995397973 \cdot 10^{221} \lor \neg \left(y \cdot z \le 7.312372482130218940754485960634465779355 \cdot 10^{187}\right):\\ \;\;\;\;x \cdot 1 + \left(-y\right) \cdot \left(z \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(-y \cdot z\right) \cdot x\\ \end{array}\]

Reproduce

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