Average Error: 3.0 → 0.2
Time: 10.0s
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):\\ \;\;\;\;\left(x - \left(x \cdot z\right) \cdot y\right) \cdot 1\\ \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):\\
\;\;\;\;\left(x - \left(x \cdot z\right) \cdot y\right) \cdot 1\\

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

\end{array}
double f(double x, double y, double z) {
        double r215790 = x;
        double r215791 = 1.0;
        double r215792 = y;
        double r215793 = z;
        double r215794 = r215792 * r215793;
        double r215795 = r215791 - r215794;
        double r215796 = r215790 * r215795;
        return r215796;
}

double f(double x, double y, double z) {
        double r215797 = y;
        double r215798 = z;
        double r215799 = r215797 * r215798;
        double r215800 = -1.7811880370298927e+241;
        bool r215801 = r215799 <= r215800;
        double r215802 = 8.310256255427722e+184;
        bool r215803 = r215799 <= r215802;
        double r215804 = !r215803;
        bool r215805 = r215801 || r215804;
        double r215806 = x;
        double r215807 = r215806 * r215798;
        double r215808 = r215807 * r215797;
        double r215809 = r215806 - r215808;
        double r215810 = 1.0;
        double r215811 = r215809 * r215810;
        double r215812 = r215810 - r215799;
        double r215813 = r215812 * r215806;
        double r215814 = r215805 ? r215811 : r215813;
        return r215814;
}

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. Simplified26.3

      \[\leadsto \color{blue}{\left(1 - y \cdot z\right) \cdot x}\]
    3. Using strategy rm
    4. Applied add-cube-cbrt27.1

      \[\leadsto \left(1 - y \cdot z\right) \cdot \color{blue}{\left(\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}\right)}\]
    5. Applied associate-*r*27.1

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

      \[\leadsto \color{blue}{\left(\left(1 - z \cdot y\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right)} \cdot \sqrt[3]{x}\]
    7. Using strategy rm
    8. Applied flip--64.0

      \[\leadsto \left(\color{blue}{\frac{1 \cdot 1 - \left(z \cdot y\right) \cdot \left(z \cdot y\right)}{1 + z \cdot y}} \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}\]
    9. Applied associate-*l/64.0

      \[\leadsto \color{blue}{\frac{\left(1 \cdot 1 - \left(z \cdot y\right) \cdot \left(z \cdot y\right)\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)}{1 + z \cdot y}} \cdot \sqrt[3]{x}\]
    10. Applied associate-*l/64.0

      \[\leadsto \color{blue}{\frac{\left(\left(1 \cdot 1 - \left(z \cdot y\right) \cdot \left(z \cdot y\right)\right) \cdot \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right)\right) \cdot \sqrt[3]{x}}{1 + z \cdot y}}\]
    11. Simplified64.0

      \[\leadsto \frac{\color{blue}{\left(1 \cdot 1 - y \cdot \left(\left(y \cdot z\right) \cdot z\right)\right) \cdot x}}{1 + z \cdot y}\]
    12. Taylor expanded around 0 26.3

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

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

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

    1. Initial program 0.1

      \[x \cdot \left(1 - y \cdot z\right)\]
    2. Simplified0.1

      \[\leadsto \color{blue}{\left(1 - 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.781188037029892726100866951239417080919 \cdot 10^{241} \lor \neg \left(y \cdot z \le 8.310256255427722014408975157979737195797 \cdot 10^{184}\right):\\ \;\;\;\;\left(x - \left(x \cdot z\right) \cdot y\right) \cdot 1\\ \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))))