Average Error: 3.0 → 0.2
Time: 10.9s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -1.781188037029892726100866951239417080919 \cdot 10^{241} \lor \neg \left(y \cdot z \le 8.310256255427722014408975157979737195797 \cdot 10^{184}\right):\\ \;\;\;\;x \cdot 1 + \left(-x \cdot z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(1 - 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.781188037029892726100866951239417080919 \cdot 10^{241} \lor \neg \left(y \cdot z \le 8.310256255427722014408975157979737195797 \cdot 10^{184}\right):\\
\;\;\;\;x \cdot 1 + \left(-x \cdot z\right) \cdot y\\

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

\end{array}
double f(double x, double y, double z) {
        double r204785 = x;
        double r204786 = 1.0;
        double r204787 = y;
        double r204788 = z;
        double r204789 = r204787 * r204788;
        double r204790 = r204786 - r204789;
        double r204791 = r204785 * r204790;
        return r204791;
}

double f(double x, double y, double z) {
        double r204792 = y;
        double r204793 = z;
        double r204794 = r204792 * r204793;
        double r204795 = -1.7811880370298927e+241;
        bool r204796 = r204794 <= r204795;
        double r204797 = 8.310256255427722e+184;
        bool r204798 = r204794 <= r204797;
        double r204799 = !r204798;
        bool r204800 = r204796 || r204799;
        double r204801 = x;
        double r204802 = 1.0;
        double r204803 = r204801 * r204802;
        double r204804 = r204801 * r204793;
        double r204805 = -r204804;
        double r204806 = r204805 * r204792;
        double r204807 = r204803 + r204806;
        double r204808 = r204802 - r204794;
        double r204809 = r204808 * r204801;
        double r204810 = r204800 ? r204807 : r204809;
        return r204810;
}

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.7811880370298927e+241 or 8.310256255427722e+184 < (* y z)

    1. Initial program 26.3

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

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

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

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

    if -1.7811880370298927e+241 < (* y z) < 8.310256255427722e+184

    1. Initial program 0.1

      \[x \cdot \left(1 - 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 -1.781188037029892726100866951239417080919 \cdot 10^{241} \lor \neg \left(y \cdot z \le 8.310256255427722014408975157979737195797 \cdot 10^{184}\right):\\ \;\;\;\;x \cdot 1 + \left(-x \cdot z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \end{array}\]

Reproduce

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