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

Percentage Accurate: 95.7% → 99.5%
Time: 7.8s
Alternatives: 6
Speedup: 0.4×

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 6 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.7% 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: 99.5% accurate, 0.4× speedup?

\[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot z \leq -5 \cdot 10^{+139}:\\ \;\;\;\;\left(\left(-z\right) \cdot x\right) \cdot y\\ \mathbf{elif}\;y \cdot z \leq 4 \cdot 10^{+266}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\ \end{array} \end{array} \]
NOTE: x, y, and z should be sorted in increasing order before calling this function.
(FPCore (x y z)
 :precision binary64
 (if (<= (* y z) -5e+139)
   (* (* (- z) x) y)
   (if (<= (* y z) 4e+266) (* x (- 1.0 (* y z))) (* (- z) (* y x)))))
assert(x < y && y < z);
double code(double x, double y, double z) {
	double tmp;
	if ((y * z) <= -5e+139) {
		tmp = (-z * x) * y;
	} else if ((y * z) <= 4e+266) {
		tmp = x * (1.0 - (y * z));
	} else {
		tmp = -z * (y * x);
	}
	return tmp;
}
NOTE: x, y, and z should be sorted in increasing order before calling this function.
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: tmp
    if ((y * z) <= (-5d+139)) then
        tmp = (-z * x) * y
    else if ((y * z) <= 4d+266) then
        tmp = x * (1.0d0 - (y * z))
    else
        tmp = -z * (y * x)
    end if
    code = tmp
end function
assert x < y && y < z;
public static double code(double x, double y, double z) {
	double tmp;
	if ((y * z) <= -5e+139) {
		tmp = (-z * x) * y;
	} else if ((y * z) <= 4e+266) {
		tmp = x * (1.0 - (y * z));
	} else {
		tmp = -z * (y * x);
	}
	return tmp;
}
[x, y, z] = sort([x, y, z])
def code(x, y, z):
	tmp = 0
	if (y * z) <= -5e+139:
		tmp = (-z * x) * y
	elif (y * z) <= 4e+266:
		tmp = x * (1.0 - (y * z))
	else:
		tmp = -z * (y * x)
	return tmp
x, y, z = sort([x, y, z])
function code(x, y, z)
	tmp = 0.0
	if (Float64(y * z) <= -5e+139)
		tmp = Float64(Float64(Float64(-z) * x) * y);
	elseif (Float64(y * z) <= 4e+266)
		tmp = Float64(x * Float64(1.0 - Float64(y * z)));
	else
		tmp = Float64(Float64(-z) * Float64(y * x));
	end
	return tmp
end
x, y, z = num2cell(sort([x, y, z])){:}
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if ((y * z) <= -5e+139)
		tmp = (-z * x) * y;
	elseif ((y * z) <= 4e+266)
		tmp = x * (1.0 - (y * z));
	else
		tmp = -z * (y * x);
	end
	tmp_2 = tmp;
end
NOTE: x, y, and z should be sorted in increasing order before calling this function.
code[x_, y_, z_] := If[LessEqual[N[(y * z), $MachinePrecision], -5e+139], N[(N[((-z) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(y * z), $MachinePrecision], 4e+266], N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-z) * N[(y * x), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
[x, y, z] = \mathsf{sort}([x, y, z])\\
\\
\begin{array}{l}
\mathbf{if}\;y \cdot z \leq -5 \cdot 10^{+139}:\\
\;\;\;\;\left(\left(-z\right) \cdot x\right) \cdot y\\

\mathbf{elif}\;y \cdot z \leq 4 \cdot 10^{+266}:\\
\;\;\;\;x \cdot \left(1 - y \cdot z\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 y z) < -5.0000000000000003e139

    1. Initial program 83.2%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. lift-*.f64N/A

        \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
      2. lift--.f64N/A

        \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
      3. lift-*.f64N/A

        \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
      4. fp-cancel-sub-sign-invN/A

        \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
      5. +-commutativeN/A

        \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
      6. distribute-lft-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
      7. associate-*r*N/A

        \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
      8. *-rgt-identityN/A

        \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
      9. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
      10. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
      11. lower-neg.f6499.8

        \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
    4. Applied rewrites99.8%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
    5. Applied rewrites99.9%

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

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

        \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)} \]
      2. associate-*r*N/A

        \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
      3. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
      4. *-commutativeN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
      5. lower-*.f64N/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
      6. lower-neg.f64N/A

        \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(x \cdot y\right) \]
      7. *-commutativeN/A

        \[\leadsto \left(-z\right) \cdot \color{blue}{\left(y \cdot x\right)} \]
      8. lower-*.f6499.8

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

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

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

      if -5.0000000000000003e139 < (*.f64 y z) < 4.0000000000000001e266

      1. Initial program 99.9%

        \[x \cdot \left(1 - y \cdot z\right) \]
      2. Add Preprocessing

      if 4.0000000000000001e266 < (*.f64 y z)

      1. Initial program 81.2%

        \[x \cdot \left(1 - y \cdot z\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
        2. lift--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
        3. lift-*.f64N/A

          \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
        4. fp-cancel-sub-sign-invN/A

          \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
        5. +-commutativeN/A

          \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
        6. distribute-lft-inN/A

          \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
        7. associate-*r*N/A

          \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
        8. *-rgt-identityN/A

          \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
        11. lower-neg.f6499.9

          \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
      4. Applied rewrites99.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
      5. Applied rewrites99.9%

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

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

          \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)} \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
        4. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
        6. lower-neg.f64N/A

          \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(x \cdot y\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(-z\right) \cdot \color{blue}{\left(y \cdot x\right)} \]
        8. lower-*.f6499.9

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

        \[\leadsto \color{blue}{\left(-z\right) \cdot \left(y \cdot x\right)} \]
    10. Recombined 3 regimes into one program.
    11. Add Preprocessing

    Alternative 2: 94.4% accurate, 0.4× speedup?

    \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot z \leq -20 \lor \neg \left(y \cdot z \leq 0.005\right):\\ \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1\\ \end{array} \end{array} \]
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    (FPCore (x y z)
     :precision binary64
     (if (or (<= (* y z) -20.0) (not (<= (* y z) 0.005)))
       (* (- z) (* y x))
       (* x 1.0)))
    assert(x < y && y < z);
    double code(double x, double y, double z) {
    	double tmp;
    	if (((y * z) <= -20.0) || !((y * z) <= 0.005)) {
    		tmp = -z * (y * x);
    	} else {
    		tmp = x * 1.0;
    	}
    	return tmp;
    }
    
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    real(8) function code(x, y, z)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8) :: tmp
        if (((y * z) <= (-20.0d0)) .or. (.not. ((y * z) <= 0.005d0))) then
            tmp = -z * (y * x)
        else
            tmp = x * 1.0d0
        end if
        code = tmp
    end function
    
    assert x < y && y < z;
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (((y * z) <= -20.0) || !((y * z) <= 0.005)) {
    		tmp = -z * (y * x);
    	} else {
    		tmp = x * 1.0;
    	}
    	return tmp;
    }
    
    [x, y, z] = sort([x, y, z])
    def code(x, y, z):
    	tmp = 0
    	if ((y * z) <= -20.0) or not ((y * z) <= 0.005):
    		tmp = -z * (y * x)
    	else:
    		tmp = x * 1.0
    	return tmp
    
    x, y, z = sort([x, y, z])
    function code(x, y, z)
    	tmp = 0.0
    	if ((Float64(y * z) <= -20.0) || !(Float64(y * z) <= 0.005))
    		tmp = Float64(Float64(-z) * Float64(y * x));
    	else
    		tmp = Float64(x * 1.0);
    	end
    	return tmp
    end
    
    x, y, z = num2cell(sort([x, y, z])){:}
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (((y * z) <= -20.0) || ~(((y * z) <= 0.005)))
    		tmp = -z * (y * x);
    	else
    		tmp = x * 1.0;
    	end
    	tmp_2 = tmp;
    end
    
    NOTE: x, y, and z should be sorted in increasing order before calling this function.
    code[x_, y_, z_] := If[Or[LessEqual[N[(y * z), $MachinePrecision], -20.0], N[Not[LessEqual[N[(y * z), $MachinePrecision], 0.005]], $MachinePrecision]], N[((-z) * N[(y * x), $MachinePrecision]), $MachinePrecision], N[(x * 1.0), $MachinePrecision]]
    
    \begin{array}{l}
    [x, y, z] = \mathsf{sort}([x, y, z])\\
    \\
    \begin{array}{l}
    \mathbf{if}\;y \cdot z \leq -20 \lor \neg \left(y \cdot z \leq 0.005\right):\\
    \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;x \cdot 1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (*.f64 y z) < -20 or 0.0050000000000000001 < (*.f64 y z)

      1. Initial program 91.1%

        \[x \cdot \left(1 - y \cdot z\right) \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. lift-*.f64N/A

          \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
        2. lift--.f64N/A

          \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
        3. lift-*.f64N/A

          \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
        4. fp-cancel-sub-sign-invN/A

          \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
        5. +-commutativeN/A

          \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
        6. distribute-lft-inN/A

          \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
        7. associate-*r*N/A

          \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
        8. *-rgt-identityN/A

          \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
        9. lower-fma.f64N/A

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
        10. lower-*.f64N/A

          \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
        11. lower-neg.f6495.1

          \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
      4. Applied rewrites95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
      5. Applied rewrites91.6%

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

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

          \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)} \]
        2. associate-*r*N/A

          \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
        3. distribute-rgt-neg-inN/A

          \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
        4. *-commutativeN/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
        5. lower-*.f64N/A

          \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
        6. lower-neg.f64N/A

          \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(x \cdot y\right) \]
        7. *-commutativeN/A

          \[\leadsto \left(-z\right) \cdot \color{blue}{\left(y \cdot x\right)} \]
        8. lower-*.f6492.1

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

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

      if -20 < (*.f64 y z) < 0.0050000000000000001

      1. Initial program 100.0%

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

        \[\leadsto x \cdot \color{blue}{1} \]
      4. Step-by-step derivation
        1. Applied rewrites96.8%

          \[\leadsto x \cdot \color{blue}{1} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification94.6%

        \[\leadsto \begin{array}{l} \mathbf{if}\;y \cdot z \leq -20 \lor \neg \left(y \cdot z \leq 0.005\right):\\ \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\ \mathbf{else}:\\ \;\;\;\;x \cdot 1\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 94.2% accurate, 0.4× speedup?

      \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;y \cdot z \leq -2:\\ \;\;\;\;\left(\left(-z\right) \cdot x\right) \cdot y\\ \mathbf{elif}\;y \cdot z \leq 0.005:\\ \;\;\;\;x \cdot 1\\ \mathbf{else}:\\ \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\ \end{array} \end{array} \]
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      (FPCore (x y z)
       :precision binary64
       (if (<= (* y z) -2.0)
         (* (* (- z) x) y)
         (if (<= (* y z) 0.005) (* x 1.0) (* (- z) (* y x)))))
      assert(x < y && y < z);
      double code(double x, double y, double z) {
      	double tmp;
      	if ((y * z) <= -2.0) {
      		tmp = (-z * x) * y;
      	} else if ((y * z) <= 0.005) {
      		tmp = x * 1.0;
      	} else {
      		tmp = -z * (y * x);
      	}
      	return tmp;
      }
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: tmp
          if ((y * z) <= (-2.0d0)) then
              tmp = (-z * x) * y
          else if ((y * z) <= 0.005d0) then
              tmp = x * 1.0d0
          else
              tmp = -z * (y * x)
          end if
          code = tmp
      end function
      
      assert x < y && y < z;
      public static double code(double x, double y, double z) {
      	double tmp;
      	if ((y * z) <= -2.0) {
      		tmp = (-z * x) * y;
      	} else if ((y * z) <= 0.005) {
      		tmp = x * 1.0;
      	} else {
      		tmp = -z * (y * x);
      	}
      	return tmp;
      }
      
      [x, y, z] = sort([x, y, z])
      def code(x, y, z):
      	tmp = 0
      	if (y * z) <= -2.0:
      		tmp = (-z * x) * y
      	elif (y * z) <= 0.005:
      		tmp = x * 1.0
      	else:
      		tmp = -z * (y * x)
      	return tmp
      
      x, y, z = sort([x, y, z])
      function code(x, y, z)
      	tmp = 0.0
      	if (Float64(y * z) <= -2.0)
      		tmp = Float64(Float64(Float64(-z) * x) * y);
      	elseif (Float64(y * z) <= 0.005)
      		tmp = Float64(x * 1.0);
      	else
      		tmp = Float64(Float64(-z) * Float64(y * x));
      	end
      	return tmp
      end
      
      x, y, z = num2cell(sort([x, y, z])){:}
      function tmp_2 = code(x, y, z)
      	tmp = 0.0;
      	if ((y * z) <= -2.0)
      		tmp = (-z * x) * y;
      	elseif ((y * z) <= 0.005)
      		tmp = x * 1.0;
      	else
      		tmp = -z * (y * x);
      	end
      	tmp_2 = tmp;
      end
      
      NOTE: x, y, and z should be sorted in increasing order before calling this function.
      code[x_, y_, z_] := If[LessEqual[N[(y * z), $MachinePrecision], -2.0], N[(N[((-z) * x), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[N[(y * z), $MachinePrecision], 0.005], N[(x * 1.0), $MachinePrecision], N[((-z) * N[(y * x), $MachinePrecision]), $MachinePrecision]]]
      
      \begin{array}{l}
      [x, y, z] = \mathsf{sort}([x, y, z])\\
      \\
      \begin{array}{l}
      \mathbf{if}\;y \cdot z \leq -2:\\
      \;\;\;\;\left(\left(-z\right) \cdot x\right) \cdot y\\
      
      \mathbf{elif}\;y \cdot z \leq 0.005:\\
      \;\;\;\;x \cdot 1\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(-z\right) \cdot \left(y \cdot x\right)\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 y z) < -2

        1. Initial program 90.6%

          \[x \cdot \left(1 - y \cdot z\right) \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
          2. lift--.f64N/A

            \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
          3. lift-*.f64N/A

            \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
          4. fp-cancel-sub-sign-invN/A

            \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
          5. +-commutativeN/A

            \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
          6. distribute-lft-inN/A

            \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
          7. associate-*r*N/A

            \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
          8. *-rgt-identityN/A

            \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
          9. lower-fma.f64N/A

            \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
          10. lower-*.f64N/A

            \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
          11. lower-neg.f6492.7

            \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
        4. Applied rewrites92.7%

          \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
        5. Applied rewrites93.9%

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

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

            \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)} \]
          2. associate-*r*N/A

            \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
          3. distribute-rgt-neg-inN/A

            \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
          4. *-commutativeN/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
          5. lower-*.f64N/A

            \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
          6. lower-neg.f64N/A

            \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(x \cdot y\right) \]
          7. *-commutativeN/A

            \[\leadsto \left(-z\right) \cdot \color{blue}{\left(y \cdot x\right)} \]
          8. lower-*.f6488.9

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

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

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

          if -2 < (*.f64 y z) < 0.0050000000000000001

          1. Initial program 100.0%

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

            \[\leadsto x \cdot \color{blue}{1} \]
          4. Step-by-step derivation
            1. Applied rewrites97.4%

              \[\leadsto x \cdot \color{blue}{1} \]

            if 0.0050000000000000001 < (*.f64 y z)

            1. Initial program 91.9%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
              2. lift--.f64N/A

                \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
              3. lift-*.f64N/A

                \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
              4. fp-cancel-sub-sign-invN/A

                \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
              5. +-commutativeN/A

                \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
              6. distribute-lft-inN/A

                \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
              7. associate-*r*N/A

                \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
              8. *-rgt-identityN/A

                \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
              9. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
              10. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
              11. lower-neg.f6497.8

                \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
            4. Applied rewrites97.8%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
            5. Applied rewrites87.9%

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

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

                \[\leadsto \color{blue}{\mathsf{neg}\left(x \cdot \left(y \cdot z\right)\right)} \]
              2. associate-*r*N/A

                \[\leadsto \mathsf{neg}\left(\color{blue}{\left(x \cdot y\right) \cdot z}\right) \]
              3. distribute-rgt-neg-inN/A

                \[\leadsto \color{blue}{\left(x \cdot y\right) \cdot \left(\mathsf{neg}\left(z\right)\right)} \]
              4. *-commutativeN/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
              5. lower-*.f64N/A

                \[\leadsto \color{blue}{\left(\mathsf{neg}\left(z\right)\right) \cdot \left(x \cdot y\right)} \]
              6. lower-neg.f64N/A

                \[\leadsto \color{blue}{\left(-z\right)} \cdot \left(x \cdot y\right) \]
              7. *-commutativeN/A

                \[\leadsto \left(-z\right) \cdot \color{blue}{\left(y \cdot x\right)} \]
              8. lower-*.f6494.3

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

              \[\leadsto \color{blue}{\left(-z\right) \cdot \left(y \cdot x\right)} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 4: 95.1% accurate, 0.7× speedup?

          \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x \cdot z, -y, x\right)\\ \end{array} \end{array} \]
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          (FPCore (x y z)
           :precision binary64
           (if (<= z 4.2e+112) (* x (- 1.0 (* y z))) (fma (* x z) (- y) x)))
          assert(x < y && y < z);
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= 4.2e+112) {
          		tmp = x * (1.0 - (y * z));
          	} else {
          		tmp = fma((x * z), -y, x);
          	}
          	return tmp;
          }
          
          x, y, z = sort([x, y, z])
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= 4.2e+112)
          		tmp = Float64(x * Float64(1.0 - Float64(y * z)));
          	else
          		tmp = fma(Float64(x * z), Float64(-y), x);
          	end
          	return tmp
          end
          
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          code[x_, y_, z_] := If[LessEqual[z, 4.2e+112], N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * z), $MachinePrecision] * (-y) + x), $MachinePrecision]]
          
          \begin{array}{l}
          [x, y, z] = \mathsf{sort}([x, y, z])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq 4.2 \cdot 10^{+112}:\\
          \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(x \cdot z, -y, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < 4.1999999999999998e112

            1. Initial program 97.3%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Add Preprocessing

            if 4.1999999999999998e112 < z

            1. Initial program 85.7%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
              2. lift--.f64N/A

                \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
              3. lift-*.f64N/A

                \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
              4. fp-cancel-sub-sign-invN/A

                \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
              5. +-commutativeN/A

                \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
              6. distribute-lft-inN/A

                \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
              7. *-commutativeN/A

                \[\leadsto x \cdot \color{blue}{\left(z \cdot \left(\mathsf{neg}\left(y\right)\right)\right)} + x \cdot 1 \]
              8. associate-*r*N/A

                \[\leadsto \color{blue}{\left(x \cdot z\right) \cdot \left(\mathsf{neg}\left(y\right)\right)} + x \cdot 1 \]
              9. *-rgt-identityN/A

                \[\leadsto \left(x \cdot z\right) \cdot \left(\mathsf{neg}\left(y\right)\right) + \color{blue}{x} \]
              10. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot z, \mathsf{neg}\left(y\right), x\right)} \]
              11. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot z}, \mathsf{neg}\left(y\right), x\right) \]
              12. lower-neg.f64100.0

                \[\leadsto \mathsf{fma}\left(x \cdot z, \color{blue}{-y}, x\right) \]
            4. Applied rewrites100.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot z, -y, x\right)} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 5: 95.1% accurate, 0.7× speedup?

          \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ \begin{array}{l} \mathbf{if}\;z \leq 4.2 \cdot 10^{+112}:\\ \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(z \cdot x\right) \cdot y\\ \end{array} \end{array} \]
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          (FPCore (x y z)
           :precision binary64
           (if (<= z 4.2e+112) (* x (- 1.0 (* y z))) (- x (* (* z x) y))))
          assert(x < y && y < z);
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= 4.2e+112) {
          		tmp = x * (1.0 - (y * z));
          	} else {
          		tmp = x - ((z * x) * y);
          	}
          	return tmp;
          }
          
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8) :: tmp
              if (z <= 4.2d+112) then
                  tmp = x * (1.0d0 - (y * z))
              else
                  tmp = x - ((z * x) * y)
              end if
              code = tmp
          end function
          
          assert x < y && y < z;
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (z <= 4.2e+112) {
          		tmp = x * (1.0 - (y * z));
          	} else {
          		tmp = x - ((z * x) * y);
          	}
          	return tmp;
          }
          
          [x, y, z] = sort([x, y, z])
          def code(x, y, z):
          	tmp = 0
          	if z <= 4.2e+112:
          		tmp = x * (1.0 - (y * z))
          	else:
          		tmp = x - ((z * x) * y)
          	return tmp
          
          x, y, z = sort([x, y, z])
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= 4.2e+112)
          		tmp = Float64(x * Float64(1.0 - Float64(y * z)));
          	else
          		tmp = Float64(x - Float64(Float64(z * x) * y));
          	end
          	return tmp
          end
          
          x, y, z = num2cell(sort([x, y, z])){:}
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (z <= 4.2e+112)
          		tmp = x * (1.0 - (y * z));
          	else
          		tmp = x - ((z * x) * y);
          	end
          	tmp_2 = tmp;
          end
          
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          code[x_, y_, z_] := If[LessEqual[z, 4.2e+112], N[(x * N[(1.0 - N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(z * x), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          [x, y, z] = \mathsf{sort}([x, y, z])\\
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq 4.2 \cdot 10^{+112}:\\
          \;\;\;\;x \cdot \left(1 - y \cdot z\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x - \left(z \cdot x\right) \cdot y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < 4.1999999999999998e112

            1. Initial program 97.3%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Add Preprocessing

            if 4.1999999999999998e112 < z

            1. Initial program 85.7%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Add Preprocessing
            3. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \color{blue}{x \cdot \left(1 - y \cdot z\right)} \]
              2. lift--.f64N/A

                \[\leadsto x \cdot \color{blue}{\left(1 - y \cdot z\right)} \]
              3. lift-*.f64N/A

                \[\leadsto x \cdot \left(1 - \color{blue}{y \cdot z}\right) \]
              4. fp-cancel-sub-sign-invN/A

                \[\leadsto x \cdot \color{blue}{\left(1 + \left(\mathsf{neg}\left(y\right)\right) \cdot z\right)} \]
              5. +-commutativeN/A

                \[\leadsto x \cdot \color{blue}{\left(\left(\mathsf{neg}\left(y\right)\right) \cdot z + 1\right)} \]
              6. distribute-lft-inN/A

                \[\leadsto \color{blue}{x \cdot \left(\left(\mathsf{neg}\left(y\right)\right) \cdot z\right) + x \cdot 1} \]
              7. associate-*r*N/A

                \[\leadsto \color{blue}{\left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z} + x \cdot 1 \]
              8. *-rgt-identityN/A

                \[\leadsto \left(x \cdot \left(\mathsf{neg}\left(y\right)\right)\right) \cdot z + \color{blue}{x} \]
              9. lower-fma.f64N/A

                \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(\mathsf{neg}\left(y\right)\right), z, x\right)} \]
              10. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(\color{blue}{x \cdot \left(\mathsf{neg}\left(y\right)\right)}, z, x\right) \]
              11. lower-neg.f6496.1

                \[\leadsto \mathsf{fma}\left(x \cdot \color{blue}{\left(-y\right)}, z, x\right) \]
            4. Applied rewrites96.1%

              \[\leadsto \color{blue}{\mathsf{fma}\left(x \cdot \left(-y\right), z, x\right)} \]
            5. Applied rewrites100.0%

              \[\leadsto \color{blue}{x - \left(z \cdot x\right) \cdot y} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 6: 50.3% accurate, 2.3× speedup?

          \[\begin{array}{l} [x, y, z] = \mathsf{sort}([x, y, z])\\ \\ x \cdot 1 \end{array} \]
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          (FPCore (x y z) :precision binary64 (* x 1.0))
          assert(x < y && y < z);
          double code(double x, double y, double z) {
          	return x * 1.0;
          }
          
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          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
          end function
          
          assert x < y && y < z;
          public static double code(double x, double y, double z) {
          	return x * 1.0;
          }
          
          [x, y, z] = sort([x, y, z])
          def code(x, y, z):
          	return x * 1.0
          
          x, y, z = sort([x, y, z])
          function code(x, y, z)
          	return Float64(x * 1.0)
          end
          
          x, y, z = num2cell(sort([x, y, z])){:}
          function tmp = code(x, y, z)
          	tmp = x * 1.0;
          end
          
          NOTE: x, y, and z should be sorted in increasing order before calling this function.
          code[x_, y_, z_] := N[(x * 1.0), $MachinePrecision]
          
          \begin{array}{l}
          [x, y, z] = \mathsf{sort}([x, y, z])\\
          \\
          x \cdot 1
          \end{array}
          
          Derivation
          1. Initial program 95.8%

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

            \[\leadsto x \cdot \color{blue}{1} \]
          4. Step-by-step derivation
            1. Applied rewrites53.2%

              \[\leadsto x \cdot \color{blue}{1} \]
            2. Add Preprocessing

            Reproduce

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