Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E

Percentage Accurate: 99.7% → 99.8%
Time: 9.9s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\begin{array}{l} \\ x + \left(\left(y - x\right) \cdot 6\right) \cdot z \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * 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 + (((y - x) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * z);
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * z)
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * z);
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(\left(y - x\right) \cdot 6\right) \cdot z
\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 11 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: 99.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(\left(y - x\right) \cdot 6\right) \cdot z \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (* (- y x) 6.0) z)))
double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * 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 + (((y - x) * 6.0d0) * z)
end function
public static double code(double x, double y, double z) {
	return x + (((y - x) * 6.0) * z);
}
def code(x, y, z):
	return x + (((y - x) * 6.0) * z)
function code(x, y, z)
	return Float64(x + Float64(Float64(Float64(y - x) * 6.0) * z))
end
function tmp = code(x, y, z)
	tmp = x + (((y - x) * 6.0) * z);
end
code[x_, y_, z_] := N[(x + N[(N[(N[(y - x), $MachinePrecision] * 6.0), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - x\right) \cdot \left(6 \cdot z\right) \end{array} \]
(FPCore (x y z) :precision binary64 (+ x (* (- y x) (* 6.0 z))))
double code(double x, double y, double z) {
	return x + ((y - x) * (6.0 * 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 + ((y - x) * (6.0d0 * z))
end function
public static double code(double x, double y, double z) {
	return x + ((y - x) * (6.0 * z));
}
def code(x, y, z):
	return x + ((y - x) * (6.0 * z))
function code(x, y, z)
	return Float64(x + Float64(Float64(y - x) * Float64(6.0 * z)))
end
function tmp = code(x, y, z)
	tmp = x + ((y - x) * (6.0 * z));
end
code[x_, y_, z_] := N[(x + N[(N[(y - x), $MachinePrecision] * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x + \left(y - x\right) \cdot \left(6 \cdot z\right)
\end{array}
Derivation
  1. Initial program 99.1%

    \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z \]
  2. Step-by-step derivation
    1. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\left(\left(y - x\right) \cdot 6\right) \cdot z\right)}\right) \]
    2. associate-*l*N/A

      \[\leadsto \mathsf{+.f64}\left(x, \left(\left(y - x\right) \cdot \color{blue}{\left(6 \cdot z\right)}\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(y - x\right), \color{blue}{\left(6 \cdot z\right)}\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot z\right)\right)\right) \]
    5. *-lowering-*.f6499.8%

      \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{*.f64}\left(6, \color{blue}{z}\right)\right)\right) \]
  3. Simplified99.8%

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

Alternative 2: 61.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \left(x \cdot -6\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \left(6 \cdot z\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -6.4e+16)
   (* z (* x -6.0))
   (if (<= z -3.4e-54)
     (* y (* 6.0 z))
     (if (<= z 1.35e-27) x (* z (* y 6.0))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -6.4e+16) {
		tmp = z * (x * -6.0);
	} else if (z <= -3.4e-54) {
		tmp = y * (6.0 * z);
	} else if (z <= 1.35e-27) {
		tmp = x;
	} else {
		tmp = z * (y * 6.0);
	}
	return tmp;
}
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 <= (-6.4d+16)) then
        tmp = z * (x * (-6.0d0))
    else if (z <= (-3.4d-54)) then
        tmp = y * (6.0d0 * z)
    else if (z <= 1.35d-27) then
        tmp = x
    else
        tmp = z * (y * 6.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double tmp;
	if (z <= -6.4e+16) {
		tmp = z * (x * -6.0);
	} else if (z <= -3.4e-54) {
		tmp = y * (6.0 * z);
	} else if (z <= 1.35e-27) {
		tmp = x;
	} else {
		tmp = z * (y * 6.0);
	}
	return tmp;
}
def code(x, y, z):
	tmp = 0
	if z <= -6.4e+16:
		tmp = z * (x * -6.0)
	elif z <= -3.4e-54:
		tmp = y * (6.0 * z)
	elif z <= 1.35e-27:
		tmp = x
	else:
		tmp = z * (y * 6.0)
	return tmp
function code(x, y, z)
	tmp = 0.0
	if (z <= -6.4e+16)
		tmp = Float64(z * Float64(x * -6.0));
	elseif (z <= -3.4e-54)
		tmp = Float64(y * Float64(6.0 * z));
	elseif (z <= 1.35e-27)
		tmp = x;
	else
		tmp = Float64(z * Float64(y * 6.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	tmp = 0.0;
	if (z <= -6.4e+16)
		tmp = z * (x * -6.0);
	elseif (z <= -3.4e-54)
		tmp = y * (6.0 * z);
	elseif (z <= 1.35e-27)
		tmp = x;
	else
		tmp = z * (y * 6.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := If[LessEqual[z, -6.4e+16], N[(z * N[(x * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.4e-54], N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.35e-27], x, N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -6.4 \cdot 10^{+16}:\\
\;\;\;\;z \cdot \left(x \cdot -6\right)\\

\mathbf{elif}\;z \leq -3.4 \cdot 10^{-54}:\\
\;\;\;\;y \cdot \left(6 \cdot z\right)\\

\mathbf{elif}\;z \leq 1.35 \cdot 10^{-27}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6.4e16

    1. Initial program 99.7%

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

      \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
      3. --lowering--.f6499.7%

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
    5. Simplified99.7%

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

      \[\leadsto \color{blue}{-6 \cdot \left(x \cdot z\right)} \]
    7. Step-by-step derivation
      1. associate-*r*N/A

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

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

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

        \[\leadsto \mathsf{*.f64}\left(z, \left(x \cdot \color{blue}{-6}\right)\right) \]
      5. *-lowering-*.f6456.2%

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, \color{blue}{-6}\right)\right) \]
    8. Simplified56.2%

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

    if -6.4e16 < z < -3.39999999999999987e-54

    1. Initial program 99.5%

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

      \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
    4. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
      2. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
      3. --lowering--.f6468.8%

        \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
    5. Simplified68.8%

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

      \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{y}\right)\right) \]
    7. Step-by-step derivation
      1. Simplified59.8%

        \[\leadsto 6 \cdot \left(z \cdot \color{blue}{y}\right) \]
      2. Step-by-step derivation
        1. *-commutativeN/A

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

          \[\leadsto \left(y \cdot z\right) \cdot 6 \]
        3. associate-*l*N/A

          \[\leadsto y \cdot \color{blue}{\left(z \cdot 6\right)} \]
        4. metadata-evalN/A

          \[\leadsto y \cdot \left(z \cdot \frac{1}{\color{blue}{\frac{1}{6}}}\right) \]
        5. div-invN/A

          \[\leadsto y \cdot \frac{z}{\color{blue}{\frac{1}{6}}} \]
        6. *-commutativeN/A

          \[\leadsto \frac{z}{\frac{1}{6}} \cdot \color{blue}{y} \]
        7. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\left(\frac{z}{\frac{1}{6}}\right), \color{blue}{y}\right) \]
        8. /-lowering-/.f6459.6%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(z, \frac{1}{6}\right), y\right) \]
      3. Applied egg-rr59.6%

        \[\leadsto \color{blue}{\frac{z}{0.16666666666666666} \cdot y} \]
      4. Step-by-step derivation
        1. div-invN/A

          \[\leadsto \mathsf{*.f64}\left(\left(z \cdot \frac{1}{\frac{1}{6}}\right), y\right) \]
        2. metadata-evalN/A

          \[\leadsto \mathsf{*.f64}\left(\left(z \cdot 6\right), y\right) \]
        3. *-lowering-*.f6460.1%

          \[\leadsto \mathsf{*.f64}\left(\mathsf{*.f64}\left(z, 6\right), y\right) \]
      5. Applied egg-rr60.1%

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

      if -3.39999999999999987e-54 < z < 1.34999999999999994e-27

      1. Initial program 98.4%

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

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

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

        if 1.34999999999999994e-27 < z

        1. Initial program 99.8%

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

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot z\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot y\right)}\right) \]
          4. *-lowering-*.f6457.2%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{y}\right)\right) \]
        5. Simplified57.2%

          \[\leadsto \color{blue}{z \cdot \left(6 \cdot y\right)} \]
      5. Recombined 4 regimes into one program.
      6. Final simplification64.2%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{+16}:\\ \;\;\;\;z \cdot \left(x \cdot -6\right)\\ \mathbf{elif}\;z \leq -3.4 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \left(6 \cdot z\right)\\ \mathbf{elif}\;z \leq 1.35 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 3: 61.3% accurate, 0.4× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \left(y \cdot 6\right)\\ \mathbf{if}\;z \leq -6.8 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \left(x \cdot -6\right)\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-54}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* z (* y 6.0))))
         (if (<= z -6.8e+17)
           (* z (* x -6.0))
           (if (<= z -2.3e-54) t_0 (if (<= z 2.2e-27) x t_0)))))
      double code(double x, double y, double z) {
      	double t_0 = z * (y * 6.0);
      	double tmp;
      	if (z <= -6.8e+17) {
      		tmp = z * (x * -6.0);
      	} else if (z <= -2.3e-54) {
      		tmp = t_0;
      	} else if (z <= 2.2e-27) {
      		tmp = x;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      real(8) function code(x, y, z)
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: tmp
          t_0 = z * (y * 6.0d0)
          if (z <= (-6.8d+17)) then
              tmp = z * (x * (-6.0d0))
          else if (z <= (-2.3d-54)) then
              tmp = t_0
          else if (z <= 2.2d-27) then
              tmp = x
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = z * (y * 6.0);
      	double tmp;
      	if (z <= -6.8e+17) {
      		tmp = z * (x * -6.0);
      	} else if (z <= -2.3e-54) {
      		tmp = t_0;
      	} else if (z <= 2.2e-27) {
      		tmp = x;
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = z * (y * 6.0)
      	tmp = 0
      	if z <= -6.8e+17:
      		tmp = z * (x * -6.0)
      	elif z <= -2.3e-54:
      		tmp = t_0
      	elif z <= 2.2e-27:
      		tmp = x
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(z * Float64(y * 6.0))
      	tmp = 0.0
      	if (z <= -6.8e+17)
      		tmp = Float64(z * Float64(x * -6.0));
      	elseif (z <= -2.3e-54)
      		tmp = t_0;
      	elseif (z <= 2.2e-27)
      		tmp = x;
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = z * (y * 6.0);
      	tmp = 0.0;
      	if (z <= -6.8e+17)
      		tmp = z * (x * -6.0);
      	elseif (z <= -2.3e-54)
      		tmp = t_0;
      	elseif (z <= 2.2e-27)
      		tmp = x;
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -6.8e+17], N[(z * N[(x * -6.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.3e-54], t$95$0, If[LessEqual[z, 2.2e-27], x, t$95$0]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := z \cdot \left(y \cdot 6\right)\\
      \mathbf{if}\;z \leq -6.8 \cdot 10^{+17}:\\
      \;\;\;\;z \cdot \left(x \cdot -6\right)\\
      
      \mathbf{elif}\;z \leq -2.3 \cdot 10^{-54}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;z \leq 2.2 \cdot 10^{-27}:\\
      \;\;\;\;x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if z < -6.8e17

        1. Initial program 99.7%

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

          \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
        4. Step-by-step derivation
          1. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
          2. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
          3. --lowering--.f6499.7%

            \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
        5. Simplified99.7%

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

          \[\leadsto \color{blue}{-6 \cdot \left(x \cdot z\right)} \]
        7. Step-by-step derivation
          1. associate-*r*N/A

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

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \left(x \cdot \color{blue}{-6}\right)\right) \]
          5. *-lowering-*.f6456.2%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(x, \color{blue}{-6}\right)\right) \]
        8. Simplified56.2%

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

        if -6.8e17 < z < -2.2999999999999999e-54 or 2.19999999999999987e-27 < z

        1. Initial program 99.7%

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

          \[\leadsto \color{blue}{6 \cdot \left(y \cdot z\right)} \]
        4. Step-by-step derivation
          1. associate-*r*N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot y\right)}\right) \]
          4. *-lowering-*.f6457.8%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{y}\right)\right) \]
        5. Simplified57.8%

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

        if -2.2999999999999999e-54 < z < 2.19999999999999987e-27

        1. Initial program 98.4%

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.8 \cdot 10^{+17}:\\ \;\;\;\;z \cdot \left(x \cdot -6\right)\\ \mathbf{elif}\;z \leq -2.3 \cdot 10^{-54}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-27}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \end{array} \]
        7. Add Preprocessing

        Alternative 4: 98.6% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -310000:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 6.8:\\ \;\;\;\;x + y \cdot \left(6 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* 6.0 (* (- y x) z))))
           (if (<= z -310000.0) t_0 (if (<= z 6.8) (+ x (* y (* 6.0 z))) t_0))))
        double code(double x, double y, double z) {
        	double t_0 = 6.0 * ((y - x) * z);
        	double tmp;
        	if (z <= -310000.0) {
        		tmp = t_0;
        	} else if (z <= 6.8) {
        		tmp = x + (y * (6.0 * z));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = 6.0d0 * ((y - x) * z)
            if (z <= (-310000.0d0)) then
                tmp = t_0
            else if (z <= 6.8d0) then
                tmp = x + (y * (6.0d0 * z))
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = 6.0 * ((y - x) * z);
        	double tmp;
        	if (z <= -310000.0) {
        		tmp = t_0;
        	} else if (z <= 6.8) {
        		tmp = x + (y * (6.0 * z));
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = 6.0 * ((y - x) * z)
        	tmp = 0
        	if z <= -310000.0:
        		tmp = t_0
        	elif z <= 6.8:
        		tmp = x + (y * (6.0 * z))
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(6.0 * Float64(Float64(y - x) * z))
        	tmp = 0.0
        	if (z <= -310000.0)
        		tmp = t_0;
        	elseif (z <= 6.8)
        		tmp = Float64(x + Float64(y * Float64(6.0 * z)));
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = 6.0 * ((y - x) * z);
        	tmp = 0.0;
        	if (z <= -310000.0)
        		tmp = t_0;
        	elseif (z <= 6.8)
        		tmp = x + (y * (6.0 * z));
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -310000.0], t$95$0, If[LessEqual[z, 6.8], N[(x + N[(y * N[(6.0 * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\
        \mathbf{if}\;z \leq -310000:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 6.8:\\
        \;\;\;\;x + y \cdot \left(6 \cdot z\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -3.1e5 or 6.79999999999999982 < z

          1. Initial program 99.7%

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

            \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
          4. Step-by-step derivation
            1. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
            2. *-lowering-*.f64N/A

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
            3. --lowering--.f6498.8%

              \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
          5. Simplified98.8%

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

          if -3.1e5 < z < 6.79999999999999982

          1. Initial program 98.6%

            \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z \]
          2. Step-by-step derivation
            1. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \color{blue}{\left(\left(\left(y - x\right) \cdot 6\right) \cdot z\right)}\right) \]
            2. associate-*l*N/A

              \[\leadsto \mathsf{+.f64}\left(x, \left(\left(y - x\right) \cdot \color{blue}{\left(6 \cdot z\right)}\right)\right) \]
            3. *-lowering-*.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\left(y - x\right), \color{blue}{\left(6 \cdot z\right)}\right)\right) \]
            4. --lowering--.f64N/A

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\color{blue}{6} \cdot z\right)\right)\right) \]
            5. *-lowering-*.f6499.9%

              \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{*.f64}\left(6, \color{blue}{z}\right)\right)\right) \]
          3. Simplified99.9%

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

            \[\leadsto \mathsf{+.f64}\left(x, \mathsf{*.f64}\left(\color{blue}{y}, \mathsf{*.f64}\left(6, z\right)\right)\right) \]
          6. Step-by-step derivation
            1. Simplified98.6%

              \[\leadsto x + \color{blue}{y} \cdot \left(6 \cdot z\right) \]
          7. Recombined 2 regimes into one program.
          8. Final simplification98.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -310000:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq 6.8:\\ \;\;\;\;x + y \cdot \left(6 \cdot z\right)\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]
          9. Add Preprocessing

          Alternative 5: 84.7% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq 0.00056:\\ \;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{0.16666666666666666}\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -3.2e-54)
             (* 6.0 (* (- y x) z))
             (if (<= z 0.00056)
               (* x (+ 1.0 (* z -6.0)))
               (* (- y x) (/ z 0.16666666666666666)))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -3.2e-54) {
          		tmp = 6.0 * ((y - x) * z);
          	} else if (z <= 0.00056) {
          		tmp = x * (1.0 + (z * -6.0));
          	} else {
          		tmp = (y - x) * (z / 0.16666666666666666);
          	}
          	return tmp;
          }
          
          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 <= (-3.2d-54)) then
                  tmp = 6.0d0 * ((y - x) * z)
              else if (z <= 0.00056d0) then
                  tmp = x * (1.0d0 + (z * (-6.0d0)))
              else
                  tmp = (y - x) * (z / 0.16666666666666666d0)
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -3.2e-54) {
          		tmp = 6.0 * ((y - x) * z);
          	} else if (z <= 0.00056) {
          		tmp = x * (1.0 + (z * -6.0));
          	} else {
          		tmp = (y - x) * (z / 0.16666666666666666);
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -3.2e-54:
          		tmp = 6.0 * ((y - x) * z)
          	elif z <= 0.00056:
          		tmp = x * (1.0 + (z * -6.0))
          	else:
          		tmp = (y - x) * (z / 0.16666666666666666)
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -3.2e-54)
          		tmp = Float64(6.0 * Float64(Float64(y - x) * z));
          	elseif (z <= 0.00056)
          		tmp = Float64(x * Float64(1.0 + Float64(z * -6.0)));
          	else
          		tmp = Float64(Float64(y - x) * Float64(z / 0.16666666666666666));
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (z <= -3.2e-54)
          		tmp = 6.0 * ((y - x) * z);
          	elseif (z <= 0.00056)
          		tmp = x * (1.0 + (z * -6.0));
          	else
          		tmp = (y - x) * (z / 0.16666666666666666);
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -3.2e-54], N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 0.00056], N[(x * N[(1.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / 0.16666666666666666), $MachinePrecision]), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -3.2 \cdot 10^{-54}:\\
          \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\
          
          \mathbf{elif}\;z \leq 0.00056:\\
          \;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(y - x\right) \cdot \frac{z}{0.16666666666666666}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -3.19999999999999998e-54

            1. Initial program 99.7%

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

              \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
              3. --lowering--.f6492.3%

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
            5. Simplified92.3%

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

            if -3.19999999999999998e-54 < z < 5.5999999999999995e-4

            1. Initial program 98.5%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot z\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot z\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(z \cdot \color{blue}{-6}\right)\right)\right) \]
              4. *-lowering-*.f6470.8%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \color{blue}{-6}\right)\right)\right) \]
            5. Simplified70.8%

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

            if 5.5999999999999995e-4 < z

            1. Initial program 99.8%

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

              \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
              3. --lowering--.f6498.9%

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
            5. Simplified98.9%

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

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

                \[\leadsto \left(6 \cdot \left(y - x\right)\right) \cdot \color{blue}{z} \]
              3. metadata-evalN/A

                \[\leadsto \left(\frac{6}{1} \cdot \left(y - x\right)\right) \cdot z \]
              4. associate-/r/N/A

                \[\leadsto \frac{6}{\frac{1}{y - x}} \cdot z \]
              5. clear-numN/A

                \[\leadsto \frac{1}{\frac{\frac{1}{y - x}}{6}} \cdot z \]
              6. associate-*l/N/A

                \[\leadsto \frac{1 \cdot z}{\color{blue}{\frac{\frac{1}{y - x}}{6}}} \]
              7. div-invN/A

                \[\leadsto \frac{1 \cdot z}{\frac{1}{y - x} \cdot \color{blue}{\frac{1}{6}}} \]
              8. times-fracN/A

                \[\leadsto \frac{1}{\frac{1}{y - x}} \cdot \color{blue}{\frac{z}{\frac{1}{6}}} \]
              9. remove-double-divN/A

                \[\leadsto \left(y - x\right) \cdot \frac{\color{blue}{z}}{\frac{1}{6}} \]
              10. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\left(y - x\right), \color{blue}{\left(\frac{z}{\frac{1}{6}}\right)}\right) \]
              11. --lowering--.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \left(\frac{\color{blue}{z}}{\frac{1}{6}}\right)\right) \]
              12. /-lowering-/.f64N/A

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{/.f64}\left(z, \color{blue}{\left(\frac{1}{6}\right)}\right)\right) \]
              13. metadata-eval98.9%

                \[\leadsto \mathsf{*.f64}\left(\mathsf{\_.f64}\left(y, x\right), \mathsf{/.f64}\left(z, \frac{1}{6}\right)\right) \]
            7. Applied egg-rr98.9%

              \[\leadsto \color{blue}{\left(y - x\right) \cdot \frac{z}{0.16666666666666666}} \]
          3. Recombined 3 regimes into one program.
          4. Final simplification82.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq 0.00056:\\ \;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{0.16666666666666666}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 6: 84.8% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{-54}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 0.00056:\\ \;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0 (* 6.0 (* (- y x) z))))
             (if (<= z -3e-54) t_0 (if (<= z 0.00056) (* x (+ 1.0 (* z -6.0))) t_0))))
          double code(double x, double y, double z) {
          	double t_0 = 6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -3e-54) {
          		tmp = t_0;
          	} else if (z <= 0.00056) {
          		tmp = x * (1.0 + (z * -6.0));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8) :: t_0
              real(8) :: tmp
              t_0 = 6.0d0 * ((y - x) * z)
              if (z <= (-3d-54)) then
                  tmp = t_0
              else if (z <= 0.00056d0) then
                  tmp = x * (1.0d0 + (z * (-6.0d0)))
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = 6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -3e-54) {
          		tmp = t_0;
          	} else if (z <= 0.00056) {
          		tmp = x * (1.0 + (z * -6.0));
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = 6.0 * ((y - x) * z)
          	tmp = 0
          	if z <= -3e-54:
          		tmp = t_0
          	elif z <= 0.00056:
          		tmp = x * (1.0 + (z * -6.0))
          	else:
          		tmp = t_0
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(6.0 * Float64(Float64(y - x) * z))
          	tmp = 0.0
          	if (z <= -3e-54)
          		tmp = t_0;
          	elseif (z <= 0.00056)
          		tmp = Float64(x * Float64(1.0 + Float64(z * -6.0)));
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = 6.0 * ((y - x) * z);
          	tmp = 0.0;
          	if (z <= -3e-54)
          		tmp = t_0;
          	elseif (z <= 0.00056)
          		tmp = x * (1.0 + (z * -6.0));
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-54], t$95$0, If[LessEqual[z, 0.00056], N[(x * N[(1.0 + N[(z * -6.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\
          \mathbf{if}\;z \leq -3 \cdot 10^{-54}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq 0.00056:\\
          \;\;\;\;x \cdot \left(1 + z \cdot -6\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -3.00000000000000009e-54 or 5.5999999999999995e-4 < z

            1. Initial program 99.7%

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

              \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
              3. --lowering--.f6494.9%

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
            5. Simplified94.9%

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

            if -3.00000000000000009e-54 < z < 5.5999999999999995e-4

            1. Initial program 98.5%

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

              \[\leadsto \color{blue}{x \cdot \left(1 + -6 \cdot z\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \color{blue}{\left(1 + -6 \cdot z\right)}\right) \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \color{blue}{\left(-6 \cdot z\right)}\right)\right) \]
              3. *-commutativeN/A

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \left(z \cdot \color{blue}{-6}\right)\right)\right) \]
              4. *-lowering-*.f6470.8%

                \[\leadsto \mathsf{*.f64}\left(x, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(z, \color{blue}{-6}\right)\right)\right) \]
            5. Simplified70.8%

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

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

          Alternative 7: 84.6% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{if}\;z \leq -2.8 \cdot 10^{-54}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (let* ((t_0 (* 6.0 (* (- y x) z))))
             (if (<= z -2.8e-54) t_0 (if (<= z 8.5e-28) x t_0))))
          double code(double x, double y, double z) {
          	double t_0 = 6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -2.8e-54) {
          		tmp = t_0;
          	} else if (z <= 8.5e-28) {
          		tmp = x;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8) :: t_0
              real(8) :: tmp
              t_0 = 6.0d0 * ((y - x) * z)
              if (z <= (-2.8d-54)) then
                  tmp = t_0
              else if (z <= 8.5d-28) then
                  tmp = x
              else
                  tmp = t_0
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double t_0 = 6.0 * ((y - x) * z);
          	double tmp;
          	if (z <= -2.8e-54) {
          		tmp = t_0;
          	} else if (z <= 8.5e-28) {
          		tmp = x;
          	} else {
          		tmp = t_0;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	t_0 = 6.0 * ((y - x) * z)
          	tmp = 0
          	if z <= -2.8e-54:
          		tmp = t_0
          	elif z <= 8.5e-28:
          		tmp = x
          	else:
          		tmp = t_0
          	return tmp
          
          function code(x, y, z)
          	t_0 = Float64(6.0 * Float64(Float64(y - x) * z))
          	tmp = 0.0
          	if (z <= -2.8e-54)
          		tmp = t_0;
          	elseif (z <= 8.5e-28)
          		tmp = x;
          	else
          		tmp = t_0;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	t_0 = 6.0 * ((y - x) * z);
          	tmp = 0.0;
          	if (z <= -2.8e-54)
          		tmp = t_0;
          	elseif (z <= 8.5e-28)
          		tmp = x;
          	else
          		tmp = t_0;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(N[(y - x), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.8e-54], t$95$0, If[LessEqual[z, 8.5e-28], x, t$95$0]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_0 := 6 \cdot \left(\left(y - x\right) \cdot z\right)\\
          \mathbf{if}\;z \leq -2.8 \cdot 10^{-54}:\\
          \;\;\;\;t\_0\\
          
          \mathbf{elif}\;z \leq 8.5 \cdot 10^{-28}:\\
          \;\;\;\;x\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_0\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -2.8000000000000002e-54 or 8.49999999999999925e-28 < z

            1. Initial program 99.7%

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

              \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
            4. Step-by-step derivation
              1. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
              2. *-lowering-*.f64N/A

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
              3. --lowering--.f6493.6%

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
            5. Simplified93.6%

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

            if -2.8000000000000002e-54 < z < 8.49999999999999925e-28

            1. Initial program 98.4%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.8 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(\left(y - x\right) \cdot z\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 8: 61.3% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -3.4e-54) (* 6.0 (* y z)) (if (<= z 2.9e-28) x (* z (* y 6.0)))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -3.4e-54) {
            		tmp = 6.0 * (y * z);
            	} else if (z <= 2.9e-28) {
            		tmp = x;
            	} else {
            		tmp = z * (y * 6.0);
            	}
            	return tmp;
            }
            
            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 <= (-3.4d-54)) then
                    tmp = 6.0d0 * (y * z)
                else if (z <= 2.9d-28) then
                    tmp = x
                else
                    tmp = z * (y * 6.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -3.4e-54) {
            		tmp = 6.0 * (y * z);
            	} else if (z <= 2.9e-28) {
            		tmp = x;
            	} else {
            		tmp = z * (y * 6.0);
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if z <= -3.4e-54:
            		tmp = 6.0 * (y * z)
            	elif z <= 2.9e-28:
            		tmp = x
            	else:
            		tmp = z * (y * 6.0)
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -3.4e-54)
            		tmp = Float64(6.0 * Float64(y * z));
            	elseif (z <= 2.9e-28)
            		tmp = x;
            	else
            		tmp = Float64(z * Float64(y * 6.0));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (z <= -3.4e-54)
            		tmp = 6.0 * (y * z);
            	elseif (z <= 2.9e-28)
            		tmp = x;
            	else
            		tmp = z * (y * 6.0);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -3.4e-54], N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.9e-28], x, N[(z * N[(y * 6.0), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -3.4 \cdot 10^{-54}:\\
            \;\;\;\;6 \cdot \left(y \cdot z\right)\\
            
            \mathbf{elif}\;z \leq 2.9 \cdot 10^{-28}:\\
            \;\;\;\;x\\
            
            \mathbf{else}:\\
            \;\;\;\;z \cdot \left(y \cdot 6\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -3.39999999999999987e-54

              1. Initial program 99.7%

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

                \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
              4. Step-by-step derivation
                1. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
                2. *-lowering-*.f64N/A

                  \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
                3. --lowering--.f6492.3%

                  \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
              5. Simplified92.3%

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

                \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{y}\right)\right) \]
              7. Step-by-step derivation
                1. Simplified51.1%

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

                if -3.39999999999999987e-54 < z < 2.90000000000000013e-28

                1. Initial program 98.4%

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

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

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

                  if 2.90000000000000013e-28 < z

                  1. Initial program 99.8%

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

                    \[\leadsto \color{blue}{6 \cdot \left(y \cdot z\right)} \]
                  4. Step-by-step derivation
                    1. associate-*r*N/A

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

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

                      \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(6 \cdot y\right)}\right) \]
                    4. *-lowering-*.f6457.2%

                      \[\leadsto \mathsf{*.f64}\left(z, \mathsf{*.f64}\left(6, \color{blue}{y}\right)\right) \]
                  5. Simplified57.2%

                    \[\leadsto \color{blue}{z \cdot \left(6 \cdot y\right)} \]
                5. Recombined 3 regimes into one program.
                6. Final simplification62.4%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.4 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(y \cdot 6\right)\\ \end{array} \]
                7. Add Preprocessing

                Alternative 9: 61.3% accurate, 0.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_0 := 6 \cdot \left(y \cdot z\right)\\ \mathbf{if}\;z \leq -3 \cdot 10^{-54}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (let* ((t_0 (* 6.0 (* y z)))) (if (<= z -3e-54) t_0 (if (<= z 3e-28) x t_0))))
                double code(double x, double y, double z) {
                	double t_0 = 6.0 * (y * z);
                	double tmp;
                	if (z <= -3e-54) {
                		tmp = t_0;
                	} else if (z <= 3e-28) {
                		tmp = x;
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                real(8) function code(x, y, z)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8) :: t_0
                    real(8) :: tmp
                    t_0 = 6.0d0 * (y * z)
                    if (z <= (-3d-54)) then
                        tmp = t_0
                    else if (z <= 3d-28) then
                        tmp = x
                    else
                        tmp = t_0
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double t_0 = 6.0 * (y * z);
                	double tmp;
                	if (z <= -3e-54) {
                		tmp = t_0;
                	} else if (z <= 3e-28) {
                		tmp = x;
                	} else {
                		tmp = t_0;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	t_0 = 6.0 * (y * z)
                	tmp = 0
                	if z <= -3e-54:
                		tmp = t_0
                	elif z <= 3e-28:
                		tmp = x
                	else:
                		tmp = t_0
                	return tmp
                
                function code(x, y, z)
                	t_0 = Float64(6.0 * Float64(y * z))
                	tmp = 0.0
                	if (z <= -3e-54)
                		tmp = t_0;
                	elseif (z <= 3e-28)
                		tmp = x;
                	else
                		tmp = t_0;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	t_0 = 6.0 * (y * z);
                	tmp = 0.0;
                	if (z <= -3e-54)
                		tmp = t_0;
                	elseif (z <= 3e-28)
                		tmp = x;
                	else
                		tmp = t_0;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := Block[{t$95$0 = N[(6.0 * N[(y * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3e-54], t$95$0, If[LessEqual[z, 3e-28], x, t$95$0]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_0 := 6 \cdot \left(y \cdot z\right)\\
                \mathbf{if}\;z \leq -3 \cdot 10^{-54}:\\
                \;\;\;\;t\_0\\
                
                \mathbf{elif}\;z \leq 3 \cdot 10^{-28}:\\
                \;\;\;\;x\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_0\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if z < -3.00000000000000009e-54 or 3.00000000000000003e-28 < z

                  1. Initial program 99.7%

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

                    \[\leadsto \color{blue}{6 \cdot \left(z \cdot \left(y - x\right)\right)} \]
                  4. Step-by-step derivation
                    1. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(6, \color{blue}{\left(z \cdot \left(y - x\right)\right)}\right) \]
                    2. *-lowering-*.f64N/A

                      \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{\left(y - x\right)}\right)\right) \]
                    3. --lowering--.f6493.6%

                      \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \mathsf{\_.f64}\left(y, \color{blue}{x}\right)\right)\right) \]
                  5. Simplified93.6%

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

                    \[\leadsto \mathsf{*.f64}\left(6, \mathsf{*.f64}\left(z, \color{blue}{y}\right)\right) \]
                  7. Step-by-step derivation
                    1. Simplified53.6%

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

                    if -3.00000000000000009e-54 < z < 3.00000000000000003e-28

                    1. Initial program 98.4%

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3 \cdot 10^{-54}:\\ \;\;\;\;6 \cdot \left(y \cdot z\right)\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-28}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;6 \cdot \left(y \cdot z\right)\\ \end{array} \]
                    7. Add Preprocessing

                    Alternative 10: 99.7% accurate, 1.0× speedup?

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

                      \[x + \left(\left(y - x\right) \cdot 6\right) \cdot z \]
                    2. Add Preprocessing
                    3. Final simplification99.1%

                      \[\leadsto x + z \cdot \left(\left(y - x\right) \cdot 6\right) \]
                    4. Add Preprocessing

                    Alternative 11: 36.4% accurate, 9.0× speedup?

                    \[\begin{array}{l} \\ x \end{array} \]
                    (FPCore (x y z) :precision binary64 x)
                    double code(double x, double y, double z) {
                    	return x;
                    }
                    
                    real(8) function code(x, y, z)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        code = x
                    end function
                    
                    public static double code(double x, double y, double z) {
                    	return x;
                    }
                    
                    def code(x, y, z):
                    	return x
                    
                    function code(x, y, z)
                    	return x
                    end
                    
                    function tmp = code(x, y, z)
                    	tmp = x;
                    end
                    
                    code[x_, y_, z_] := x
                    
                    \begin{array}{l}
                    
                    \\
                    x
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.1%

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

                      \[\leadsto \color{blue}{x} \]
                    4. Step-by-step derivation
                      1. Simplified38.7%

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

                      Developer Target 1: 99.8% accurate, 1.0× speedup?

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

                      Reproduce

                      ?
                      herbie shell --seed 2024152 
                      (FPCore (x y z)
                        :name "Data.Colour.RGBSpace.HSL:hsl from colour-2.3.3, E"
                        :precision binary64
                      
                        :alt
                        (! :herbie-platform default (- x (* (* 6 z) (- x y))))
                      
                        (+ x (* (* (- y x) 6.0) z)))