Average Error: 3.6 → 1.9
Time: 13.5s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le 9.523507907051804582488023185592807459301 \cdot 10^{193}:\\ \;\;\;\;\left(1 - y \cdot z\right) \cdot x\\ \mathbf{else}:\\ \;\;\;\;\left(-\left(x \cdot z\right) \cdot y\right) + x \cdot 1\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le 9.523507907051804582488023185592807459301 \cdot 10^{193}:\\
\;\;\;\;\left(1 - y \cdot z\right) \cdot x\\

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

\end{array}
double f(double x, double y, double z) {
        double r15750102 = x;
        double r15750103 = 1.0;
        double r15750104 = y;
        double r15750105 = z;
        double r15750106 = r15750104 * r15750105;
        double r15750107 = r15750103 - r15750106;
        double r15750108 = r15750102 * r15750107;
        return r15750108;
}

double f(double x, double y, double z) {
        double r15750109 = y;
        double r15750110 = z;
        double r15750111 = r15750109 * r15750110;
        double r15750112 = 9.523507907051805e+193;
        bool r15750113 = r15750111 <= r15750112;
        double r15750114 = 1.0;
        double r15750115 = r15750114 - r15750111;
        double r15750116 = x;
        double r15750117 = r15750115 * r15750116;
        double r15750118 = r15750116 * r15750110;
        double r15750119 = r15750118 * r15750109;
        double r15750120 = -r15750119;
        double r15750121 = r15750116 * r15750114;
        double r15750122 = r15750120 + r15750121;
        double r15750123 = r15750113 ? r15750117 : r15750122;
        return r15750123;
}

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.523507907051805e+193

    1. Initial program 2.0

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

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

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

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

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

    if 9.523507907051805e+193 < (* y z)

    1. Initial program 26.6

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

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

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

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

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

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

Reproduce

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