Data.Colour.RGBSpace.HSV:hsv from colour-2.3.3, I

Percentage Accurate: 95.9% → 97.6%
Time: 7.1s
Alternatives: 7
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ x \cdot \left(1 - y \cdot z\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x * (1.0d0 - (y * z))
end function
public static double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
def code(x, y, z):
	return x * (1.0 - (y * z))
function code(x, y, z)
	return Float64(x * Float64(1.0 - Float64(y * z)))
end
function tmp = code(x, y, z)
	tmp = x * (1.0 - (y * z));
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(1 - y \cdot z\right)
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 7 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 95.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x \cdot \left(1 - y \cdot z\right) \end{array} \]
(FPCore (x y z) :precision binary64 (* x (- 1.0 (* y z))))
double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x * (1.0d0 - (y * z))
end function
public static double code(double x, double y, double z) {
	return x * (1.0 - (y * z));
}
def code(x, y, z):
	return x * (1.0 - (y * z))
function code(x, y, z)
	return Float64(x * Float64(1.0 - Float64(y * z)))
end
function tmp = code(x, y, z)
	tmp = x * (1.0 - (y * z));
end
code[x_, y_, z_] := N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x \cdot \left(1 - y \cdot z\right)
\end{array}

Alternative 1: 97.6% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 3.2 \cdot 10^{-71}:\\ \;\;\;\;x\_m - \left(x\_m \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\_m - x\_m \cdot \left(y \cdot z\right)\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (* x_s (if (<= x_m 3.2e-71) (- x_m (* (* x_m y) z)) (- x_m (* x_m (* y z))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (x_m <= 3.2e-71) {
		tmp = x_m - ((x_m * y) * z);
	} else {
		tmp = x_m - (x_m * (y * z));
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x_m <= 3.2d-71) then
        tmp = x_m - ((x_m * y) * z)
    else
        tmp = x_m - (x_m * (y * z))
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (x_m <= 3.2e-71) {
		tmp = x_m - ((x_m * y) * z);
	} else {
		tmp = x_m - (x_m * (y * z));
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	tmp = 0
	if x_m <= 3.2e-71:
		tmp = x_m - ((x_m * y) * z)
	else:
		tmp = x_m - (x_m * (y * z))
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	tmp = 0.0
	if (x_m <= 3.2e-71)
		tmp = Float64(x_m - Float64(Float64(x_m * y) * z));
	else
		tmp = Float64(x_m - Float64(x_m * Float64(y * z)));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if (x_m <= 3.2e-71)
		tmp = x_m - ((x_m * y) * z);
	else
		tmp = x_m - (x_m * (y * z));
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[x$95$m, 3.2e-71], N[(x$95$m - N[(N[(x$95$m * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x$95$m - N[(x$95$m * N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 3.2 \cdot 10^{-71}:\\
\;\;\;\;x\_m - \left(x\_m \cdot y\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 3.1999999999999999e-71

    1. Initial program 93.1%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 93.1%

      \[\leadsto \color{blue}{x + -1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg93.1%

        \[\leadsto x + \color{blue}{\left(-x \cdot \left(y \cdot z\right)\right)} \]
      2. associate-*r*93.6%

        \[\leadsto x + \left(-\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
    5. Simplified93.6%

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

    if 3.1999999999999999e-71 < x

    1. Initial program 99.9%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg99.9%

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y \cdot z\right)\right)} \]
      2. distribute-rgt-in99.9%

        \[\leadsto \color{blue}{1 \cdot x + \left(-y \cdot z\right) \cdot x} \]
      3. *-un-lft-identity99.9%

        \[\leadsto \color{blue}{x} + \left(-y \cdot z\right) \cdot x \]
      4. distribute-rgt-neg-in99.9%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(-z\right)\right)} \cdot x \]
    4. Applied egg-rr99.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 3.2 \cdot 10^{-71}:\\ \;\;\;\;x - \left(x \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \left(y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 97.9% accurate, 0.2× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ \begin{array}{l} t_0 := x\_m \cdot \left(1 - y \cdot z\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq \infty\right):\\ \;\;\;\;\left(x\_m \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (let* ((t_0 (* x_m (- 1.0 (* y z)))))
   (*
    x_s
    (if (or (<= t_0 (- INFINITY)) (not (<= t_0 INFINITY)))
      (* (* x_m y) (- z))
      t_0))))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double t_0 = x_m * (1.0 - (y * z));
	double tmp;
	if ((t_0 <= -((double) INFINITY)) || !(t_0 <= ((double) INFINITY))) {
		tmp = (x_m * y) * -z;
	} else {
		tmp = t_0;
	}
	return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double t_0 = x_m * (1.0 - (y * z));
	double tmp;
	if ((t_0 <= -Double.POSITIVE_INFINITY) || !(t_0 <= Double.POSITIVE_INFINITY)) {
		tmp = (x_m * y) * -z;
	} else {
		tmp = t_0;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	t_0 = x_m * (1.0 - (y * z))
	tmp = 0
	if (t_0 <= -math.inf) or not (t_0 <= math.inf):
		tmp = (x_m * y) * -z
	else:
		tmp = t_0
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	t_0 = Float64(x_m * Float64(1.0 - Float64(y * z)))
	tmp = 0.0
	if ((t_0 <= Float64(-Inf)) || !(t_0 <= Inf))
		tmp = Float64(Float64(x_m * y) * Float64(-z));
	else
		tmp = t_0;
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	t_0 = x_m * (1.0 - (y * z));
	tmp = 0.0;
	if ((t_0 <= -Inf) || ~((t_0 <= Inf)))
		tmp = (x_m * y) * -z;
	else
		tmp = t_0;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := Block[{t$95$0 = N[(x$95$m * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$0, (-Infinity)], N[Not[LessEqual[t$95$0, Infinity]], $MachinePrecision]], N[(N[(x$95$m * y), $MachinePrecision] * (-z)), $MachinePrecision], t$95$0]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
\begin{array}{l}
t_0 := x\_m \cdot \left(1 - y \cdot z\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -\infty \lor \neg \left(t\_0 \leq \infty\right):\\
\;\;\;\;\left(x\_m \cdot y\right) \cdot \left(-z\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x (-.f64 1 (*.f64 y z))) < -inf.0 or +inf.0 < (*.f64 x (-.f64 1 (*.f64 y z)))

    1. Initial program 77.3%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 77.3%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg77.3%

        \[\leadsto \color{blue}{-x \cdot \left(y \cdot z\right)} \]
      2. associate-*r*100.0%

        \[\leadsto -\color{blue}{\left(x \cdot y\right) \cdot z} \]
      3. *-commutative100.0%

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot y\right)} \]
      4. distribute-lft-neg-in100.0%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \left(x \cdot y\right)} \]
    5. Simplified100.0%

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

    if -inf.0 < (*.f64 x (-.f64 1 (*.f64 y z))) < +inf.0

    1. Initial program 97.4%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification97.7%

    \[\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 \infty\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 97.1% accurate, 0.2× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ \begin{array}{l} t_0 := x\_m \cdot \left(1 - y \cdot z\right)\\ x\_s \cdot \begin{array}{l} \mathbf{if}\;t\_0 \leq -4 \cdot 10^{+154} \lor \neg \left(t\_0 \leq \infty\right):\\ \;\;\;\;x\_m - y \cdot \left(x\_m \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (let* ((t_0 (* x_m (- 1.0 (* y z)))))
   (*
    x_s
    (if (or (<= t_0 -4e+154) (not (<= t_0 INFINITY)))
      (- x_m (* y (* x_m z)))
      t_0))))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double t_0 = x_m * (1.0 - (y * z));
	double tmp;
	if ((t_0 <= -4e+154) || !(t_0 <= ((double) INFINITY))) {
		tmp = x_m - (y * (x_m * z));
	} else {
		tmp = t_0;
	}
	return x_s * tmp;
}
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double t_0 = x_m * (1.0 - (y * z));
	double tmp;
	if ((t_0 <= -4e+154) || !(t_0 <= Double.POSITIVE_INFINITY)) {
		tmp = x_m - (y * (x_m * z));
	} else {
		tmp = t_0;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	t_0 = x_m * (1.0 - (y * z))
	tmp = 0
	if (t_0 <= -4e+154) or not (t_0 <= math.inf):
		tmp = x_m - (y * (x_m * z))
	else:
		tmp = t_0
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	t_0 = Float64(x_m * Float64(1.0 - Float64(y * z)))
	tmp = 0.0
	if ((t_0 <= -4e+154) || !(t_0 <= Inf))
		tmp = Float64(x_m - Float64(y * Float64(x_m * z)));
	else
		tmp = t_0;
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	t_0 = x_m * (1.0 - (y * z));
	tmp = 0.0;
	if ((t_0 <= -4e+154) || ~((t_0 <= Inf)))
		tmp = x_m - (y * (x_m * z));
	else
		tmp = t_0;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := Block[{t$95$0 = N[(x$95$m * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, N[(x$95$s * If[Or[LessEqual[t$95$0, -4e+154], N[Not[LessEqual[t$95$0, Infinity]], $MachinePrecision]], N[(x$95$m - N[(y * N[(x$95$m * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]), $MachinePrecision]]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
\begin{array}{l}
t_0 := x\_m \cdot \left(1 - y \cdot z\right)\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;t\_0 \leq -4 \cdot 10^{+154} \lor \neg \left(t\_0 \leq \infty\right):\\
\;\;\;\;x\_m - y \cdot \left(x\_m \cdot z\right)\\

\mathbf{else}:\\
\;\;\;\;t\_0\\


\end{array}
\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 x (-.f64 1 (*.f64 y z))) < -4.00000000000000015e154 or +inf.0 < (*.f64 x (-.f64 1 (*.f64 y z)))

    1. Initial program 88.9%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. sub-neg88.9%

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(-y \cdot z\right)\right)} \]
      2. distribute-rgt-in88.9%

        \[\leadsto \color{blue}{1 \cdot x + \left(-y \cdot z\right) \cdot x} \]
      3. *-un-lft-identity88.9%

        \[\leadsto \color{blue}{x} + \left(-y \cdot z\right) \cdot x \]
      4. distribute-rgt-neg-in88.9%

        \[\leadsto x + \color{blue}{\left(y \cdot \left(-z\right)\right)} \cdot x \]
    4. Applied egg-rr88.9%

      \[\leadsto \color{blue}{x + \left(y \cdot \left(-z\right)\right) \cdot x} \]
    5. Step-by-step derivation
      1. *-commutative88.9%

        \[\leadsto x + \color{blue}{x \cdot \left(y \cdot \left(-z\right)\right)} \]
      2. associate-*r*87.4%

        \[\leadsto x + \color{blue}{\left(x \cdot y\right) \cdot \left(-z\right)} \]
      3. distribute-rgt-neg-in87.4%

        \[\leadsto x + \color{blue}{\left(-\left(x \cdot y\right) \cdot z\right)} \]
      4. distribute-lft-neg-in87.4%

        \[\leadsto x + \color{blue}{\left(-x \cdot y\right) \cdot z} \]
      5. add-sqr-sqrt40.1%

        \[\leadsto x + \left(-x \cdot y\right) \cdot \color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \]
      6. sqrt-unprod35.7%

        \[\leadsto x + \left(-x \cdot y\right) \cdot \color{blue}{\sqrt{z \cdot z}} \]
      7. sqr-neg35.7%

        \[\leadsto x + \left(-x \cdot y\right) \cdot \sqrt{\color{blue}{\left(-z\right) \cdot \left(-z\right)}} \]
      8. sqrt-unprod3.5%

        \[\leadsto x + \left(-x \cdot y\right) \cdot \color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)} \]
      9. add-sqr-sqrt17.0%

        \[\leadsto x + \left(-x \cdot y\right) \cdot \color{blue}{\left(-z\right)} \]
      10. cancel-sign-sub-inv17.0%

        \[\leadsto \color{blue}{x - \left(x \cdot y\right) \cdot \left(-z\right)} \]
      11. associate-*r*23.5%

        \[\leadsto x - \color{blue}{x \cdot \left(y \cdot \left(-z\right)\right)} \]
      12. *-commutative23.5%

        \[\leadsto x - \color{blue}{\left(y \cdot \left(-z\right)\right) \cdot x} \]
      13. associate-*l*18.5%

        \[\leadsto x - \color{blue}{y \cdot \left(\left(-z\right) \cdot x\right)} \]
      14. add-sqr-sqrt6.8%

        \[\leadsto x - y \cdot \left(\color{blue}{\left(\sqrt{-z} \cdot \sqrt{-z}\right)} \cdot x\right) \]
      15. sqrt-unprod39.7%

        \[\leadsto x - y \cdot \left(\color{blue}{\sqrt{\left(-z\right) \cdot \left(-z\right)}} \cdot x\right) \]
      16. sqr-neg39.7%

        \[\leadsto x - y \cdot \left(\sqrt{\color{blue}{z \cdot z}} \cdot x\right) \]
      17. sqrt-unprod38.8%

        \[\leadsto x - y \cdot \left(\color{blue}{\left(\sqrt{z} \cdot \sqrt{z}\right)} \cdot x\right) \]
      18. add-sqr-sqrt93.8%

        \[\leadsto x - y \cdot \left(\color{blue}{z} \cdot x\right) \]
    6. Applied egg-rr93.8%

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

    if -4.00000000000000015e154 < (*.f64 x (-.f64 1 (*.f64 y z))) < +inf.0

    1. Initial program 97.0%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification96.3%

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

Alternative 4: 73.5% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+101} \lor \neg \left(y \leq 6.8 \cdot 10^{-74}\right):\\ \;\;\;\;x\_m \cdot \left(y \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (*
  x_s
  (if (or (<= y -6.2e+101) (not (<= y 6.8e-74))) (* x_m (* y (- z))) x_m)))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if ((y <= -6.2e+101) || !(y <= 6.8e-74)) {
		tmp = x_m * (y * -z);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((y <= (-6.2d+101)) .or. (.not. (y <= 6.8d-74))) then
        tmp = x_m * (y * -z)
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if ((y <= -6.2e+101) || !(y <= 6.8e-74)) {
		tmp = x_m * (y * -z);
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	tmp = 0
	if (y <= -6.2e+101) or not (y <= 6.8e-74):
		tmp = x_m * (y * -z)
	else:
		tmp = x_m
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	tmp = 0.0
	if ((y <= -6.2e+101) || !(y <= 6.8e-74))
		tmp = Float64(x_m * Float64(y * Float64(-z)));
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if ((y <= -6.2e+101) || ~((y <= 6.8e-74)))
		tmp = x_m * (y * -z);
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[Or[LessEqual[y, -6.2e+101], N[Not[LessEqual[y, 6.8e-74]], $MachinePrecision]], N[(x$95$m * N[(y * (-z)), $MachinePrecision]), $MachinePrecision], x$95$m]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -6.2 \cdot 10^{+101} \lor \neg \left(y \leq 6.8 \cdot 10^{-74}\right):\\
\;\;\;\;x\_m \cdot \left(y \cdot \left(-z\right)\right)\\

\mathbf{else}:\\
\;\;\;\;x\_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999998e101 or 6.8000000000000001e-74 < y

    1. Initial program 91.4%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 66.5%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg66.5%

        \[\leadsto \color{blue}{-x \cdot \left(y \cdot z\right)} \]
      2. associate-*r*71.4%

        \[\leadsto -\color{blue}{\left(x \cdot y\right) \cdot z} \]
      3. *-commutative71.4%

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot y\right)} \]
      4. distribute-lft-neg-in71.4%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \left(x \cdot y\right)} \]
    5. Simplified71.4%

      \[\leadsto \color{blue}{\left(-z\right) \cdot \left(x \cdot y\right)} \]
    6. Taylor expanded in z around 0 66.5%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    7. Step-by-step derivation
      1. mul-1-neg66.5%

        \[\leadsto \color{blue}{-x \cdot \left(y \cdot z\right)} \]
      2. *-commutative66.5%

        \[\leadsto -x \cdot \color{blue}{\left(z \cdot y\right)} \]
      3. distribute-rgt-neg-in66.5%

        \[\leadsto \color{blue}{x \cdot \left(-z \cdot y\right)} \]
      4. *-commutative66.5%

        \[\leadsto x \cdot \left(-\color{blue}{y \cdot z}\right) \]
      5. distribute-rgt-neg-in66.5%

        \[\leadsto x \cdot \color{blue}{\left(y \cdot \left(-z\right)\right)} \]
    8. Simplified66.5%

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

    if -6.19999999999999998e101 < y < 6.8000000000000001e-74

    1. Initial program 99.1%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 73.5%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification69.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.2 \cdot 10^{+101} \lor \neg \left(y \leq 6.8 \cdot 10^{-74}\right):\\ \;\;\;\;x \cdot \left(y \cdot \left(-z\right)\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 75.6% accurate, 0.4× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+52} \lor \neg \left(y \leq 6 \cdot 10^{-74}\right):\\ \;\;\;\;\left(x\_m \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\_m\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (* x_s (if (or (<= y -4.3e+52) (not (<= y 6e-74))) (* (* x_m y) (- z)) x_m)))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if ((y <= -4.3e+52) || !(y <= 6e-74)) {
		tmp = (x_m * y) * -z;
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((y <= (-4.3d+52)) .or. (.not. (y <= 6d-74))) then
        tmp = (x_m * y) * -z
    else
        tmp = x_m
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if ((y <= -4.3e+52) || !(y <= 6e-74)) {
		tmp = (x_m * y) * -z;
	} else {
		tmp = x_m;
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	tmp = 0
	if (y <= -4.3e+52) or not (y <= 6e-74):
		tmp = (x_m * y) * -z
	else:
		tmp = x_m
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	tmp = 0.0
	if ((y <= -4.3e+52) || !(y <= 6e-74))
		tmp = Float64(Float64(x_m * y) * Float64(-z));
	else
		tmp = x_m;
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if ((y <= -4.3e+52) || ~((y <= 6e-74)))
		tmp = (x_m * y) * -z;
	else
		tmp = x_m;
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[Or[LessEqual[y, -4.3e+52], N[Not[LessEqual[y, 6e-74]], $MachinePrecision]], N[(N[(x$95$m * y), $MachinePrecision] * (-z)), $MachinePrecision], x$95$m]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;y \leq -4.3 \cdot 10^{+52} \lor \neg \left(y \leq 6 \cdot 10^{-74}\right):\\
\;\;\;\;\left(x\_m \cdot y\right) \cdot \left(-z\right)\\

\mathbf{else}:\\
\;\;\;\;x\_m\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3e52 or 6.00000000000000014e-74 < y

    1. Initial program 91.6%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 63.4%

      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg63.4%

        \[\leadsto \color{blue}{-x \cdot \left(y \cdot z\right)} \]
      2. associate-*r*68.4%

        \[\leadsto -\color{blue}{\left(x \cdot y\right) \cdot z} \]
      3. *-commutative68.4%

        \[\leadsto -\color{blue}{z \cdot \left(x \cdot y\right)} \]
      4. distribute-lft-neg-in68.4%

        \[\leadsto \color{blue}{\left(-z\right) \cdot \left(x \cdot y\right)} \]
    5. Simplified68.4%

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

    if -4.3e52 < y < 6.00000000000000014e-74

    1. Initial program 99.9%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 76.5%

      \[\leadsto \color{blue}{x} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification71.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.3 \cdot 10^{+52} \lor \neg \left(y \leq 6 \cdot 10^{-74}\right):\\ \;\;\;\;\left(x \cdot y\right) \cdot \left(-z\right)\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 97.7% accurate, 0.6× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ x\_s \cdot \begin{array}{l} \mathbf{if}\;x\_m \leq 10^{-55}:\\ \;\;\;\;x\_m - \left(x\_m \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x\_m \cdot \left(1 - y \cdot z\right)\\ \end{array} \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z)
 :precision binary64
 (* x_s (if (<= x_m 1e-55) (- x_m (* (* x_m y) z)) (* x_m (- 1.0 (* y z))))))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (x_m <= 1e-55) {
		tmp = x_m - ((x_m * y) * z);
	} else {
		tmp = x_m * (1.0 - (y * z));
	}
	return x_s * tmp;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if (x_m <= 1d-55) then
        tmp = x_m - ((x_m * y) * z)
    else
        tmp = x_m * (1.0d0 - (y * z))
    end if
    code = x_s * tmp
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	double tmp;
	if (x_m <= 1e-55) {
		tmp = x_m - ((x_m * y) * z);
	} else {
		tmp = x_m * (1.0 - (y * z));
	}
	return x_s * tmp;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	tmp = 0
	if x_m <= 1e-55:
		tmp = x_m - ((x_m * y) * z)
	else:
		tmp = x_m * (1.0 - (y * z))
	return x_s * tmp
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	tmp = 0.0
	if (x_m <= 1e-55)
		tmp = Float64(x_m - Float64(Float64(x_m * y) * z));
	else
		tmp = Float64(x_m * Float64(1.0 - Float64(y * z)));
	end
	return Float64(x_s * tmp)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp_2 = code(x_s, x_m, y, z)
	tmp = 0.0;
	if (x_m <= 1e-55)
		tmp = x_m - ((x_m * y) * z);
	else
		tmp = x_m * (1.0 - (y * z));
	end
	tmp_2 = x_s * tmp;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * If[LessEqual[x$95$m, 1e-55], N[(x$95$m - N[(N[(x$95$m * y), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(x$95$m * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
x\_s \cdot \begin{array}{l}
\mathbf{if}\;x\_m \leq 10^{-55}:\\
\;\;\;\;x\_m - \left(x\_m \cdot y\right) \cdot z\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < 9.99999999999999995e-56

    1. Initial program 93.3%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 93.3%

      \[\leadsto \color{blue}{x + -1 \cdot \left(x \cdot \left(y \cdot z\right)\right)} \]
    4. Step-by-step derivation
      1. mul-1-neg93.3%

        \[\leadsto x + \color{blue}{\left(-x \cdot \left(y \cdot z\right)\right)} \]
      2. associate-*r*93.7%

        \[\leadsto x + \left(-\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
    5. Simplified93.7%

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

    if 9.99999999999999995e-56 < x

    1. Initial program 99.8%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
  3. Recombined 2 regimes into one program.
  4. Final simplification95.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq 10^{-55}:\\ \;\;\;\;x - \left(x \cdot y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.3% accurate, 7.0× speedup?

\[\begin{array}{l} x_m = \left|x\right| \\ x_s = \mathsf{copysign}\left(1, x\right) \\ [x_m, y, z] = \mathsf{sort}([x_m, y, z])\\ \\ x\_s \cdot x\_m \end{array} \]
x_m = (fabs.f64 x)
x_s = (copysign.f64 1 x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
(FPCore (x_s x_m y z) :precision binary64 (* x_s x_m))
x_m = fabs(x);
x_s = copysign(1.0, x);
assert(x_m < y && y < z);
double code(double x_s, double x_m, double y, double z) {
	return x_s * x_m;
}
x_m = abs(x)
x_s = copysign(1.0d0, x)
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x_s, x_m, y, z)
    real(8), intent (in) :: x_s
    real(8), intent (in) :: x_m
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    code = x_s * x_m
end function
x_m = Math.abs(x);
x_s = Math.copySign(1.0, x);
assert x_m < y && y < z;
public static double code(double x_s, double x_m, double y, double z) {
	return x_s * x_m;
}
x_m = math.fabs(x)
x_s = math.copysign(1.0, x)
[x_m, y, z] = sort([x_m, y, z])
def code(x_s, x_m, y, z):
	return x_s * x_m
x_m = abs(x)
x_s = copysign(1.0, x)
x_m, y, z = sort([x_m, y, z])
function code(x_s, x_m, y, z)
	return Float64(x_s * x_m)
end
x_m = abs(x);
x_s = sign(x) * abs(1.0);
x_m, y, z = num2cell(sort([x_m, y, z])){:}
function tmp = code(x_s, x_m, y, z)
	tmp = x_s * x_m;
end
x_m = N[Abs[x], $MachinePrecision]
x_s = N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision]
NOTE: x_m, y, and z should be sorted in increasing order before calling this function.
code[x$95$s_, x$95$m_, y_, z_] := N[(x$95$s * x$95$m), $MachinePrecision]
\begin{array}{l}
x_m = \left|x\right|
\\
x_s = \mathsf{copysign}\left(1, x\right)
\\
[x_m, y, z] = \mathsf{sort}([x_m, y, z])\\
\\
x\_s \cdot x\_m
\end{array}
Derivation
  1. Initial program 95.1%

    \[x \cdot \left(1 - y \cdot z\right) \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 49.4%

    \[\leadsto \color{blue}{x} \]
  4. Final simplification49.4%

    \[\leadsto x \]
  5. Add Preprocessing

Reproduce

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