Average Error: 3.4 → 0.4
Time: 4.0s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z \le -8.98213140270888884 \cdot 10^{127}:\\ \;\;\;\;x \cdot 1 + \left(-1 \cdot \left(x \cdot z\right)\right) \cdot y\\ \mathbf{elif}\;y \cdot z \le 3.5418822336766144 \cdot 10^{183}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(x \cdot y\right) \cdot \left(-z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z \le -8.98213140270888884 \cdot 10^{127}:\\
\;\;\;\;x \cdot 1 + \left(-1 \cdot \left(x \cdot z\right)\right) \cdot y\\

\mathbf{elif}\;y \cdot z \le 3.5418822336766144 \cdot 10^{183}:\\
\;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\

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

\end{array}
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 VAR;
	if ((((double) (y * z)) <= -8.982131402708889e+127)) {
		VAR = ((double) (((double) (x * 1.0)) + ((double) (((double) (-1.0 * ((double) (x * z)))) * y))));
	} else {
		double VAR_1;
		if ((((double) (y * z)) <= 3.5418822336766144e+183)) {
			VAR_1 = ((double) (((double) (x * 1.0)) + ((double) (x * ((double) -(((double) (y * z))))))));
		} else {
			VAR_1 = ((double) (((double) (x * 1.0)) + ((double) (((double) (x * y)) * ((double) -(z))))));
		}
		VAR = VAR_1;
	}
	return VAR;
}

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 3 regimes
  2. if (* y z) < -8.982131402708889e+127

    1. Initial program 16.7

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

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

      \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt17.6

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(-y \cdot z\right)\right)}\]
    8. Using strategy rm
    9. Applied *-commutative17.6

      \[\leadsto x \cdot 1 + \left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(-\color{blue}{z \cdot y}\right)\right)\]
    10. Applied distribute-lft-neg-in17.6

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

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

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

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

    if -8.982131402708889e+127 < (* y z) < 3.5418822336766144e+183

    1. Initial program 0.1

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

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

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

    if 3.5418822336766144e+183 < (* y z)

    1. Initial program 24.0

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

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

      \[\leadsto \color{blue}{x \cdot 1 + x \cdot \left(-y \cdot z\right)}\]
    5. Using strategy rm
    6. Applied add-cube-cbrt24.8

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \left(\sqrt[3]{x} \cdot \left(-y \cdot z\right)\right)}\]
    8. Using strategy rm
    9. Applied distribute-rgt-neg-in24.8

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

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

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

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

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

Reproduce

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