Average Error: 3.4 → 0.9
Time: 7.9s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -1.6429161822787508 \cdot 10^{58} \lor \neg \left(y \cdot z \le 1.1216381272031817 \cdot 10^{279}\right):\\ \;\;\;\;1 \cdot x + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + 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 -1.6429161822787508 \cdot 10^{58} \lor \neg \left(y \cdot z \le 1.1216381272031817 \cdot 10^{279}\right):\\
\;\;\;\;1 \cdot x + \left(x \cdot y\right) \cdot \left(-z\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r335996 = x;
        double r335997 = 1.0;
        double r335998 = y;
        double r335999 = z;
        double r336000 = r335998 * r335999;
        double r336001 = r335997 - r336000;
        double r336002 = r335996 * r336001;
        return r336002;
}

double f(double x, double y, double z) {
        double r336003 = y;
        double r336004 = z;
        double r336005 = r336003 * r336004;
        double r336006 = -1.6429161822787508e+58;
        bool r336007 = r336005 <= r336006;
        double r336008 = 1.1216381272031817e+279;
        bool r336009 = r336005 <= r336008;
        double r336010 = !r336009;
        bool r336011 = r336007 || r336010;
        double r336012 = 1.0;
        double r336013 = x;
        double r336014 = r336012 * r336013;
        double r336015 = r336013 * r336003;
        double r336016 = -r336004;
        double r336017 = r336015 * r336016;
        double r336018 = r336014 + r336017;
        double r336019 = -r336005;
        double r336020 = r336013 * r336019;
        double r336021 = r336014 + r336020;
        double r336022 = r336011 ? r336018 : r336021;
        return r336022;
}

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.6429161822787508e+58 or 1.1216381272031817e+279 < (* y z)

    1. Initial program 18.1

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

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

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

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

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

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

    if -1.6429161822787508e+58 < (* y z) < 1.1216381272031817e+279

    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 \color{blue}{1 \cdot x} + x \cdot \left(-y \cdot z\right)\]
  3. Recombined 2 regimes into one program.
  4. Final simplification0.9

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -1.6429161822787508 \cdot 10^{58} \lor \neg \left(y \cdot z \le 1.1216381272031817 \cdot 10^{279}\right):\\ \;\;\;\;1 \cdot x + \left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x + x \cdot \left(-y \cdot z\right)\\ \end{array}\]

Reproduce

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