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

Percentage Accurate: 96.2% → 97.8%
Time: 1.5s
Alternatives: 6
Speedup: 1.0×

Specification

?
\[x \cdot \left(1 - y \cdot z\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (* 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)
use fmin_fmax_functions
    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]
f(x, y, z):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z: real): real =
	x * ((1) - (y * z))
END code
x \cdot \left(1 - y \cdot z\right)

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: 96.2% accurate, 1.0× speedup?

\[x \cdot \left(1 - y \cdot z\right) \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (* 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)
use fmin_fmax_functions
    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]
f(x, y, z):
	x in [-inf, +inf],
	y in [-inf, +inf],
	z in [-inf, +inf]
code: THEORY
BEGIN
f(x, y, z: real): real =
	x * ((1) - (y * z))
END code
x \cdot \left(1 - y \cdot z\right)

Alternative 1: 97.8% accurate, 0.2× speedup?

\[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{min}\left(y, z\right), \frac{1}{{\left(-\mathsf{max}\left(y, z\right)\right)}^{-1}} \cdot \left|x\right|, \left|x\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.5, \left|x\right|, \left|x\right| \cdot \left(0.5 - \mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right)\right)\\ \end{array} \]
(FPCore (x y z)
  :precision binary64
  :pre TRUE
  (*
 (copysign 1.0 x)
 (if (<= (fabs x) 3.790276828303043e-54)
   (fma
    (fmin y z)
    (* (/ 1.0 (pow (- (fmax y z)) -1.0)) (fabs x))
    (fabs x))
   (fma 0.5 (fabs x) (* (fabs x) (- 0.5 (* (fmax y z) (fmin y z))))))))
double code(double x, double y, double z) {
	double tmp;
	if (fabs(x) <= 3.790276828303043e-54) {
		tmp = fma(fmin(y, z), ((1.0 / pow(-fmax(y, z), -1.0)) * fabs(x)), fabs(x));
	} else {
		tmp = fma(0.5, fabs(x), (fabs(x) * (0.5 - (fmax(y, z) * fmin(y, z)))));
	}
	return copysign(1.0, x) * tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (abs(x) <= 3.790276828303043e-54)
		tmp = fma(fmin(y, z), Float64(Float64(1.0 / (Float64(-fmax(y, z)) ^ -1.0)) * abs(x)), abs(x));
	else
		tmp = fma(0.5, abs(x), Float64(abs(x) * Float64(0.5 - Float64(fmax(y, z) * fmin(y, z)))));
	end
	return Float64(copysign(1.0, x) * tmp)
end
code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.790276828303043e-54], N[(N[Min[y, z], $MachinePrecision] * N[(N[(1.0 / N[Power[(-N[Max[y, z], $MachinePrecision]), -1.0], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision] + N[Abs[x], $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Abs[x], $MachinePrecision] + N[(N[Abs[x], $MachinePrecision] * N[(0.5 - N[(N[Max[y, z], $MachinePrecision] * N[Min[y, z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{min}\left(y, z\right), \frac{1}{{\left(-\mathsf{max}\left(y, z\right)\right)}^{-1}} \cdot \left|x\right|, \left|x\right|\right)\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(0.5, \left|x\right|, \left|x\right| \cdot \left(0.5 - \mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right)\right)\\


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

    1. Initial program 96.2%

      \[x \cdot \left(1 - y \cdot z\right) \]
    2. Step-by-step derivation
      1. Applied rewrites93.9%

        \[\leadsto \mathsf{fma}\left(y, \left(-z\right) \cdot x, x\right) \]
      2. Step-by-step derivation
        1. pow1N/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left({\left(-z\right)}^{1}\right)}^{-1}} \cdot x, x\right) \]
        2. remove-double-negN/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left({\left(-z\right)}^{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(1\right)\right)\right)\right)}\right)}^{-1}} \cdot x, x\right) \]
        3. pow-negN/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{\left(\mathsf{neg}\left(1\right)\right)}}\right)}^{-1}} \cdot x, x\right) \]
        4. remove-sound-/N/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{\left(\mathsf{neg}\left(1\right)\right)}}\right)}^{-1}} \cdot x, x\right) \]
        5. lower-/.f64N/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{\left(\mathsf{neg}\left(1\right)\right)}}\right)}^{-1}} \cdot x, x\right) \]
        6. remove-sound-powN/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{\left(\mathsf{neg}\left(1\right)\right)}}\right)}^{-1}} \cdot x, x\right) \]
        7. lower-pow.f64N/A

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{\left(\mathsf{neg}\left(1\right)\right)}}\right)}^{-1}} \cdot x, x\right) \]
        8. metadata-eval93.8%

          \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(\frac{1}{{\left(-z\right)}^{-1}}\right)}^{-1}} \cdot x, x\right) \]
      3. Applied rewrites93.8%

        \[\leadsto \mathsf{fma}\left(y, \frac{1}{{\left(-z\right)}^{-1}} \cdot x, x\right) \]

      if 3.790276828303043e-54 < x

      1. Initial program 96.2%

        \[x \cdot \left(1 - y \cdot z\right) \]
      2. Step-by-step derivation
        1. Applied rewrites96.2%

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

      Alternative 2: 97.8% accurate, 0.3× speedup?

      \[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\ \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(0.5, \left|x\right|, \left|x\right| \cdot \left(0.5 - \mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right)\right)\\ \end{array} \]
      (FPCore (x y z)
        :precision binary64
        :pre TRUE
        (*
       (copysign 1.0 x)
       (if (<= (fabs x) 3.790276828303043e-54)
         (- (fabs x) (* (fmin y z) (* (fmax y z) (fabs x))))
         (fma 0.5 (fabs x) (* (fabs x) (- 0.5 (* (fmax y z) (fmin y z))))))))
      double code(double x, double y, double z) {
      	double tmp;
      	if (fabs(x) <= 3.790276828303043e-54) {
      		tmp = fabs(x) - (fmin(y, z) * (fmax(y, z) * fabs(x)));
      	} else {
      		tmp = fma(0.5, fabs(x), (fabs(x) * (0.5 - (fmax(y, z) * fmin(y, z)))));
      	}
      	return copysign(1.0, x) * tmp;
      }
      
      function code(x, y, z)
      	tmp = 0.0
      	if (abs(x) <= 3.790276828303043e-54)
      		tmp = Float64(abs(x) - Float64(fmin(y, z) * Float64(fmax(y, z) * abs(x))));
      	else
      		tmp = fma(0.5, abs(x), Float64(abs(x) * Float64(0.5 - Float64(fmax(y, z) * fmin(y, z)))));
      	end
      	return Float64(copysign(1.0, x) * tmp)
      end
      
      code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.790276828303043e-54], N[(N[Abs[x], $MachinePrecision] - N[(N[Min[y, z], $MachinePrecision] * N[(N[Max[y, z], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(0.5 * N[Abs[x], $MachinePrecision] + N[(N[Abs[x], $MachinePrecision] * N[(0.5 - N[(N[Max[y, z], $MachinePrecision] * N[Min[y, z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
      
      \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
      \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\
      \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;\mathsf{fma}\left(0.5, \left|x\right|, \left|x\right| \cdot \left(0.5 - \mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right)\right)\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if x < 3.790276828303043e-54

        1. Initial program 96.2%

          \[x \cdot \left(1 - y \cdot z\right) \]
        2. Step-by-step derivation
          1. Applied rewrites96.2%

            \[\leadsto x - \left(z \cdot y\right) \cdot x \]
          2. Step-by-step derivation
            1. Applied rewrites93.9%

              \[\leadsto x - y \cdot \left(z \cdot x\right) \]

            if 3.790276828303043e-54 < x

            1. Initial program 96.2%

              \[x \cdot \left(1 - y \cdot z\right) \]
            2. Step-by-step derivation
              1. Applied rewrites96.2%

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

            Alternative 3: 97.8% accurate, 0.3× speedup?

            \[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\ \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left|x\right| - \left(\mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right) \cdot \left|x\right|\\ \end{array} \]
            (FPCore (x y z)
              :precision binary64
              :pre TRUE
              (*
             (copysign 1.0 x)
             (if (<= (fabs x) 3.790276828303043e-54)
               (- (fabs x) (* (fmin y z) (* (fmax y z) (fabs x))))
               (- (fabs x) (* (* (fmax y z) (fmin y z)) (fabs x))))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (fabs(x) <= 3.790276828303043e-54) {
            		tmp = fabs(x) - (fmin(y, z) * (fmax(y, z) * fabs(x)));
            	} else {
            		tmp = fabs(x) - ((fmax(y, z) * fmin(y, z)) * fabs(x));
            	}
            	return copysign(1.0, x) * tmp;
            }
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (Math.abs(x) <= 3.790276828303043e-54) {
            		tmp = Math.abs(x) - (fmin(y, z) * (fmax(y, z) * Math.abs(x)));
            	} else {
            		tmp = Math.abs(x) - ((fmax(y, z) * fmin(y, z)) * Math.abs(x));
            	}
            	return Math.copySign(1.0, x) * tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if math.fabs(x) <= 3.790276828303043e-54:
            		tmp = math.fabs(x) - (fmin(y, z) * (fmax(y, z) * math.fabs(x)))
            	else:
            		tmp = math.fabs(x) - ((fmax(y, z) * fmin(y, z)) * math.fabs(x))
            	return math.copysign(1.0, x) * tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (abs(x) <= 3.790276828303043e-54)
            		tmp = Float64(abs(x) - Float64(fmin(y, z) * Float64(fmax(y, z) * abs(x))));
            	else
            		tmp = Float64(abs(x) - Float64(Float64(fmax(y, z) * fmin(y, z)) * abs(x)));
            	end
            	return Float64(copysign(1.0, x) * tmp)
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (abs(x) <= 3.790276828303043e-54)
            		tmp = abs(x) - (min(y, z) * (max(y, z) * abs(x)));
            	else
            		tmp = abs(x) - ((max(y, z) * min(y, z)) * abs(x));
            	end
            	tmp_2 = (sign(x) * abs(1.0)) * tmp;
            end
            
            code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.790276828303043e-54], N[(N[Abs[x], $MachinePrecision] - N[(N[Min[y, z], $MachinePrecision] * N[(N[Max[y, z], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] - N[(N[(N[Max[y, z], $MachinePrecision] * N[Min[y, z], $MachinePrecision]), $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
            
            \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
            \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\
            \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\left|x\right| - \left(\mathsf{max}\left(y, z\right) \cdot \mathsf{min}\left(y, z\right)\right) \cdot \left|x\right|\\
            
            
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < 3.790276828303043e-54

              1. Initial program 96.2%

                \[x \cdot \left(1 - y \cdot z\right) \]
              2. Step-by-step derivation
                1. Applied rewrites96.2%

                  \[\leadsto x - \left(z \cdot y\right) \cdot x \]
                2. Step-by-step derivation
                  1. Applied rewrites93.9%

                    \[\leadsto x - y \cdot \left(z \cdot x\right) \]

                  if 3.790276828303043e-54 < x

                  1. Initial program 96.2%

                    \[x \cdot \left(1 - y \cdot z\right) \]
                  2. Step-by-step derivation
                    1. Applied rewrites96.2%

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

                  Alternative 4: 97.8% accurate, 0.3× speedup?

                  \[\mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l} \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\ \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\ \mathbf{else}:\\ \;\;\;\;\left|x\right| \cdot \left(1 - \mathsf{min}\left(y, z\right) \cdot \mathsf{max}\left(y, z\right)\right)\\ \end{array} \]
                  (FPCore (x y z)
                    :precision binary64
                    :pre TRUE
                    (*
                   (copysign 1.0 x)
                   (if (<= (fabs x) 3.790276828303043e-54)
                     (- (fabs x) (* (fmin y z) (* (fmax y z) (fabs x))))
                     (* (fabs x) (- 1.0 (* (fmin y z) (fmax y z)))))))
                  double code(double x, double y, double z) {
                  	double tmp;
                  	if (fabs(x) <= 3.790276828303043e-54) {
                  		tmp = fabs(x) - (fmin(y, z) * (fmax(y, z) * fabs(x)));
                  	} else {
                  		tmp = fabs(x) * (1.0 - (fmin(y, z) * fmax(y, z)));
                  	}
                  	return copysign(1.0, x) * tmp;
                  }
                  
                  public static double code(double x, double y, double z) {
                  	double tmp;
                  	if (Math.abs(x) <= 3.790276828303043e-54) {
                  		tmp = Math.abs(x) - (fmin(y, z) * (fmax(y, z) * Math.abs(x)));
                  	} else {
                  		tmp = Math.abs(x) * (1.0 - (fmin(y, z) * fmax(y, z)));
                  	}
                  	return Math.copySign(1.0, x) * tmp;
                  }
                  
                  def code(x, y, z):
                  	tmp = 0
                  	if math.fabs(x) <= 3.790276828303043e-54:
                  		tmp = math.fabs(x) - (fmin(y, z) * (fmax(y, z) * math.fabs(x)))
                  	else:
                  		tmp = math.fabs(x) * (1.0 - (fmin(y, z) * fmax(y, z)))
                  	return math.copysign(1.0, x) * tmp
                  
                  function code(x, y, z)
                  	tmp = 0.0
                  	if (abs(x) <= 3.790276828303043e-54)
                  		tmp = Float64(abs(x) - Float64(fmin(y, z) * Float64(fmax(y, z) * abs(x))));
                  	else
                  		tmp = Float64(abs(x) * Float64(1.0 - Float64(fmin(y, z) * fmax(y, z))));
                  	end
                  	return Float64(copysign(1.0, x) * tmp)
                  end
                  
                  function tmp_2 = code(x, y, z)
                  	tmp = 0.0;
                  	if (abs(x) <= 3.790276828303043e-54)
                  		tmp = abs(x) - (min(y, z) * (max(y, z) * abs(x)));
                  	else
                  		tmp = abs(x) * (1.0 - (min(y, z) * max(y, z)));
                  	end
                  	tmp_2 = (sign(x) * abs(1.0)) * tmp;
                  end
                  
                  code[x_, y_, z_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[x]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[x], $MachinePrecision], 3.790276828303043e-54], N[(N[Abs[x], $MachinePrecision] - N[(N[Min[y, z], $MachinePrecision] * N[(N[Max[y, z], $MachinePrecision] * N[Abs[x], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Abs[x], $MachinePrecision] * N[(1.0 - N[(N[Min[y, z], $MachinePrecision] * N[Max[y, z], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]), $MachinePrecision]
                  
                  \mathsf{copysign}\left(1, x\right) \cdot \begin{array}{l}
                  \mathbf{if}\;\left|x\right| \leq 3.790276828303043 \cdot 10^{-54}:\\
                  \;\;\;\;\left|x\right| - \mathsf{min}\left(y, z\right) \cdot \left(\mathsf{max}\left(y, z\right) \cdot \left|x\right|\right)\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\left|x\right| \cdot \left(1 - \mathsf{min}\left(y, z\right) \cdot \mathsf{max}\left(y, z\right)\right)\\
                  
                  
                  \end{array}
                  
                  Derivation
                  1. Split input into 2 regimes
                  2. if x < 3.790276828303043e-54

                    1. Initial program 96.2%

                      \[x \cdot \left(1 - y \cdot z\right) \]
                    2. Step-by-step derivation
                      1. Applied rewrites96.2%

                        \[\leadsto x - \left(z \cdot y\right) \cdot x \]
                      2. Step-by-step derivation
                        1. Applied rewrites93.9%

                          \[\leadsto x - y \cdot \left(z \cdot x\right) \]

                        if 3.790276828303043e-54 < x

                        1. Initial program 96.2%

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

                      Alternative 5: 51.5% accurate, 2.4× speedup?

                      \[x \cdot 1 \]
                      (FPCore (x y z)
                        :precision binary64
                        :pre TRUE
                        (* x 1.0))
                      double code(double x, double y, double z) {
                      	return x * 1.0;
                      }
                      
                      real(8) function code(x, y, z)
                      use fmin_fmax_functions
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          real(8), intent (in) :: z
                          code = x * 1.0d0
                      end function
                      
                      public static double code(double x, double y, double z) {
                      	return x * 1.0;
                      }
                      
                      def code(x, y, z):
                      	return x * 1.0
                      
                      function code(x, y, z)
                      	return Float64(x * 1.0)
                      end
                      
                      function tmp = code(x, y, z)
                      	tmp = x * 1.0;
                      end
                      
                      code[x_, y_, z_] := N[(x * 1.0), $MachinePrecision]
                      
                      f(x, y, z):
                      	x in [-inf, +inf],
                      	y in [-inf, +inf],
                      	z in [-inf, +inf]
                      code: THEORY
                      BEGIN
                      f(x, y, z: real): real =
                      	x * (1)
                      END code
                      x \cdot 1
                      
                      Derivation
                      1. Initial program 96.2%

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

                        \[\leadsto x \cdot 1 \]
                      3. Step-by-step derivation
                        1. Applied rewrites51.5%

                          \[\leadsto x \cdot 1 \]
                        2. Add Preprocessing

                        Reproduce

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