Average Error: 3.3 → 0.2
Time: 18.5s
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 + y \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 + y \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 r186167 = x;
        double r186168 = 1.0;
        double r186169 = y;
        double r186170 = z;
        double r186171 = r186169 * r186170;
        double r186172 = r186168 - r186171;
        double r186173 = r186167 * r186172;
        return r186173;
}

double f(double x, double y, double z) {
        double r186174 = y;
        double r186175 = z;
        double r186176 = r186174 * r186175;
        double r186177 = -1.1768564783148908e+221;
        bool r186178 = r186176 <= r186177;
        double r186179 = 7.312372482130219e+187;
        bool r186180 = r186176 <= r186179;
        double r186181 = !r186180;
        bool r186182 = r186178 || r186181;
        double r186183 = x;
        double r186184 = 1.0;
        double r186185 = r186183 * r186184;
        double r186186 = r186175 * r186183;
        double r186187 = -r186186;
        double r186188 = r186174 * r186187;
        double r186189 = r186185 + r186188;
        double r186190 = -r186176;
        double r186191 = r186190 * r186183;
        double r186192 = r186185 + r186191;
        double r186193 = r186182 ? r186189 : r186192;
        return r186193;
}

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-rgt-neg-in27.5

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

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

      \[\leadsto x \cdot 1 + y \cdot \color{blue}{\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 + y \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))))