Average Error: 2.7 → 0.1
Time: 5.2s
Precision: 64
\[x \cdot \left(1 - y \cdot z\right)\]
\[\begin{array}{l} \mathbf{if}\;y \cdot z = -\infty:\\ \;\;\;\;x \cdot 1 + \left(x \cdot z\right) \cdot \left(-y\right)\\ \mathbf{elif}\;y \cdot z \le 1.45551293622058124 \cdot 10^{302}:\\ \;\;\;\;x \cdot 1 + x \cdot \left(-y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1 + \left(x \cdot \left(y \cdot 1\right)\right) \cdot \left(-1 \cdot z\right)\\ \end{array}\]
x \cdot \left(1 - y \cdot z\right)
\begin{array}{l}
\mathbf{if}\;y \cdot z = -\infty:\\
\;\;\;\;x \cdot 1 + \left(x \cdot z\right) \cdot \left(-y\right)\\

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

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

\end{array}
double code(double x, double y, double z) {
	return (x * (1.0 - (y * z)));
}
double code(double x, double y, double z) {
	double temp;
	if (((y * z) <= -inf.0)) {
		temp = ((x * 1.0) + ((x * z) * -y));
	} else {
		double temp_1;
		if (((y * z) <= 1.4555129362205812e+302)) {
			temp_1 = ((x * 1.0) + (x * -(y * z)));
		} else {
			temp_1 = ((x * 1.0) + ((x * (y * 1.0)) * (-1.0 * z)));
		}
		temp = temp_1;
	}
	return temp;
}

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) < -inf.0

    1. Initial program 64.0

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

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

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

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

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

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

    if -inf.0 < (* y z) < 1.4555129362205812e+302

    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 1.4555129362205812e+302 < (* y z)

    1. Initial program 58.4

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

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

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

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

      \[\leadsto x \cdot 1 + x \cdot \left(-\color{blue}{\left(y \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right) \cdot \sqrt[3]{z}}\right)\]
    8. Applied distribute-rgt-neg-in58.5

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

      \[\leadsto x \cdot 1 + \color{blue}{\left(x \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right)\right)\right) \cdot \left(-\sqrt[3]{z}\right)}\]
    10. Using strategy rm
    11. Applied *-un-lft-identity29.7

      \[\leadsto x \cdot 1 + \left(x \cdot \left(y \cdot \left(\sqrt[3]{z} \cdot \color{blue}{\left(1 \cdot \sqrt[3]{z}\right)}\right)\right)\right) \cdot \left(-\sqrt[3]{z}\right)\]
    12. Applied *-un-lft-identity29.7

      \[\leadsto x \cdot 1 + \left(x \cdot \left(y \cdot \left(\color{blue}{\left(1 \cdot \sqrt[3]{z}\right)} \cdot \left(1 \cdot \sqrt[3]{z}\right)\right)\right)\right) \cdot \left(-\sqrt[3]{z}\right)\]
    13. Applied swap-sqr29.7

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

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

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

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

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

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

Reproduce

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