Average Error: 2.8 → 1.4
Time: 11.0s
Precision: 64
\[x \cdot \left(1.0 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -5.397766473200316 \cdot 10^{+213}:\\ \;\;\;\;x \cdot 1.0 + \left(-z\right) \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(y \cdot z\right) \cdot x\right) + x \cdot 1.0\\ \end{array}\]
x \cdot \left(1.0 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -5.397766473200316 \cdot 10^{+213}:\\
\;\;\;\;x \cdot 1.0 + \left(-z\right) \cdot \left(x \cdot y\right)\\

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

\end{array}
double f(double x, double y, double z) {
        double r15166988 = x;
        double r15166989 = 1.0;
        double r15166990 = y;
        double r15166991 = z;
        double r15166992 = r15166990 * r15166991;
        double r15166993 = r15166989 - r15166992;
        double r15166994 = r15166988 * r15166993;
        return r15166994;
}

double f(double x, double y, double z) {
        double r15166995 = y;
        double r15166996 = z;
        double r15166997 = r15166995 * r15166996;
        double r15166998 = -5.397766473200316e+213;
        bool r15166999 = r15166997 <= r15166998;
        double r15167000 = x;
        double r15167001 = 1.0;
        double r15167002 = r15167000 * r15167001;
        double r15167003 = -r15166996;
        double r15167004 = r15167000 * r15166995;
        double r15167005 = r15167003 * r15167004;
        double r15167006 = r15167002 + r15167005;
        double r15167007 = r15166997 * r15167000;
        double r15167008 = -r15167007;
        double r15167009 = r15167008 + r15167002;
        double r15167010 = r15166999 ? r15167006 : r15167009;
        return r15167010;
}

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) < -5.397766473200316e+213

    1. Initial program 26.8

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

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

      \[\leadsto \color{blue}{x \cdot 1.0 + x \cdot \left(-y \cdot z\right)}\]
    5. Taylor expanded around inf 26.8

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

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

    if -5.397766473200316e+213 < (* y z)

    1. Initial program 1.4

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

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

      \[\leadsto \color{blue}{x \cdot 1.0 + x \cdot \left(-y \cdot z\right)}\]
  3. Recombined 2 regimes into one program.
  4. Final simplification1.4

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \le -5.397766473200316 \cdot 10^{+213}:\\ \;\;\;\;x \cdot 1.0 + \left(-z\right) \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(y \cdot z\right) \cdot x\right) + x \cdot 1.0\\ \end{array}\]

Reproduce

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