Average Error: 3.2 → 0.2
Time: 2.5s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -9.34873819147620549 \cdot 10^{294} \lor \neg \left(y \cdot z \le 4.04523385952989796 \cdot 10^{155}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -9.34873819147620549 \cdot 10^{294} \lor \neg \left(y \cdot z \le 4.04523385952989796 \cdot 10^{155}\right):\\
\;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r263314 = x;
        double r263315 = 1.0;
        double r263316 = y;
        double r263317 = z;
        double r263318 = r263316 * r263317;
        double r263319 = r263315 - r263318;
        double r263320 = r263314 * r263319;
        return r263320;
}

double f(double x, double y, double z) {
        double r263321 = y;
        double r263322 = z;
        double r263323 = r263321 * r263322;
        double r263324 = -9.348738191476205e+294;
        bool r263325 = r263323 <= r263324;
        double r263326 = 4.045233859529898e+155;
        bool r263327 = r263323 <= r263326;
        double r263328 = !r263327;
        bool r263329 = r263325 || r263328;
        double r263330 = x;
        double r263331 = 1.0;
        double r263332 = r263330 * r263331;
        double r263333 = r263330 * r263321;
        double r263334 = -r263322;
        double r263335 = r263333 * r263334;
        double r263336 = r263332 + r263335;
        double r263337 = -r263323;
        double r263338 = r263330 * r263337;
        double r263339 = r263332 + r263338;
        double r263340 = r263329 ? r263336 : r263339;
        return r263340;
}

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) < -9.348738191476205e+294 or 4.045233859529898e+155 < (* y z)

    1. Initial program 28.1

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

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

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

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

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

    if -9.348738191476205e+294 < (* y z) < 4.045233859529898e+155

    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)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.2

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -9.34873819147620549 \cdot 10^{294} \lor \neg \left(y \cdot z \le 4.04523385952989796 \cdot 10^{155}\right):\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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