Average Error: 3.3 → 0.5
Time: 2.5s
Precision: binary64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;x \cdot \left(1 - y \cdot z\right) \leq -\infty \lor \neg \left(x \cdot \left(1 - y \cdot z\right) \leq 2.309788965624516 \cdot 10^{+284}\right):\\ \;\;\;\;x \cdot 1 - z \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 - x \cdot \left(y \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;x \cdot \left(1 - y \cdot z\right) \leq -\infty \lor \neg \left(x \cdot \left(1 - y \cdot z\right) \leq 2.309788965624516 \cdot 10^{+284}\right):\\
\;\;\;\;x \cdot 1 - z \cdot \left(x \cdot y\right)\\

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

\end{array}
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
(FPCore (x y z)
 :precision binary64
 (if (or (<= (* x (- 1.0 (* y z))) (- INFINITY))
         (not (<= (* x (- 1.0 (* y z))) 2.309788965624516e+284)))
   (- (* x 1.0) (* z (* x y)))
   (- (* x 1.0) (* x (* y z)))))
double code(double x, double y, double z) {
	return ((double) (x * ((double) (1.0 - ((double) (y * z))))));
}
double code(double x, double y, double z) {
	double tmp;
	if (((((double) (x * ((double) (1.0 - ((double) (y * z)))))) <= ((double) -(((double) INFINITY)))) || !(((double) (x * ((double) (1.0 - ((double) (y * z)))))) <= 2.309788965624516e+284))) {
		tmp = ((double) (((double) (x * 1.0)) - ((double) (z * ((double) (x * y))))));
	} else {
		tmp = ((double) (((double) (x * 1.0)) - ((double) (x * ((double) (y * z))))));
	}
	return tmp;
}

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 (* x (- 1.0 (* y z))) < -inf.0 or 2.30978896562451605e284 < (* x (- 1.0 (* y z)))

    1. Initial program Error: 44.7 bits

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

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

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

      \[\leadsto x \cdot 1 + \color{blue}{x \cdot \left(y \cdot \left(-z\right)\right)}\]
    6. Using strategy rm
    7. Applied associate-*r*Error: 5.1 bits

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

    if -inf.0 < (* x (- 1.0 (* y z))) < 2.30978896562451605e284

    1. Initial program Error: 0.1 bits

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \cdot \left(1 - y \cdot z\right) \leq -\infty \lor \neg \left(x \cdot \left(1 - y \cdot z\right) \leq 2.309788965624516 \cdot 10^{+284}\right):\\ \;\;\;\;x \cdot 1 - z \cdot \left(x \cdot y\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 - x \cdot \left(y \cdot z\right)\\ \end{array}\]

Reproduce

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