Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C

Percentage Accurate: 99.9% → 99.9%
Time: 13.1s
Alternatives: 15
Speedup: 1.0×

Specification

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

\\
\left(x + \sin y\right) + z \cdot \cos y
\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 15 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.9% accurate, 1.0× speedup?

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

\\
\left(x + \sin y\right) + z \cdot \cos y
\end{array}

Alternative 1: 99.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\cos y, z, x + \sin y\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma (cos y) z (+ x (sin y))))
double code(double x, double y, double z) {
	return fma(cos(y), z, (x + sin(y)));
}
function code(x, y, z)
	return fma(cos(y), z, Float64(x + sin(y)))
end
code[x_, y_, z_] := N[(N[Cos[y], $MachinePrecision] * z + N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\cos y, z, x + \sin y\right)
\end{array}
Derivation
  1. Initial program 99.9%

    \[\left(x + \sin y\right) + z \cdot \cos y \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. +-commutativeN/A

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

      \[\leadsto \cos y \cdot z + \left(\color{blue}{x} + \sin y\right) \]
    3. accelerator-lowering-fma.f64N/A

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

      \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \left(x + \sin y\right)\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \mathsf{+.f64}\left(x, \sin y\right)\right) \]
    6. sin-lowering-sin.f6499.9%

      \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right)\right) \]
  4. Applied egg-rr99.9%

    \[\leadsto \color{blue}{\mathsf{fma}\left(\cos y, z, x + \sin y\right)} \]
  5. Add Preprocessing

Alternative 2: 94.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.05 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(\cos y, z, x\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= z -3.05e-35)
   (fma (cos y) z x)
   (if (<= z 2.1e-53) (+ x (sin y)) (* z (+ (cos y) (/ x z))))))
double code(double x, double y, double z) {
	double tmp;
	if (z <= -3.05e-35) {
		tmp = fma(cos(y), z, x);
	} else if (z <= 2.1e-53) {
		tmp = x + sin(y);
	} else {
		tmp = z * (cos(y) + (x / z));
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (z <= -3.05e-35)
		tmp = fma(cos(y), z, x);
	elseif (z <= 2.1e-53)
		tmp = Float64(x + sin(y));
	else
		tmp = Float64(z * Float64(cos(y) + Float64(x / z)));
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[z, -3.05e-35], N[(N[Cos[y], $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[z, 2.1e-53], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(z * N[(N[Cos[y], $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.05 \cdot 10^{-35}:\\
\;\;\;\;\mathsf{fma}\left(\cos y, z, x\right)\\

\mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\
\;\;\;\;x + \sin y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.05e-35

    1. Initial program 99.8%

      \[\left(x + \sin y\right) + z \cdot \cos y \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. +-commutativeN/A

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

        \[\leadsto \cos y \cdot z + \left(\color{blue}{x} + \sin y\right) \]
      3. accelerator-lowering-fma.f64N/A

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

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \left(x + \sin y\right)\right) \]
      5. +-lowering-+.f64N/A

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \mathsf{+.f64}\left(x, \sin y\right)\right) \]
      6. sin-lowering-sin.f6499.9%

        \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right)\right) \]
    4. Applied egg-rr99.9%

      \[\leadsto \color{blue}{\mathsf{fma}\left(\cos y, z, x + \sin y\right)} \]
    5. Taylor expanded in x around inf

      \[\leadsto \mathsf{fma.f64}\left(\mathsf{cos.f64}\left(y\right), z, \color{blue}{x}\right) \]
    6. Step-by-step derivation
      1. Simplified97.4%

        \[\leadsto \mathsf{fma}\left(\cos y, z, \color{blue}{x}\right) \]

      if -3.05e-35 < z < 2.09999999999999977e-53

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x + \sin y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \sin y + \color{blue}{x} \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\sin y, \color{blue}{x}\right) \]
        3. sin-lowering-sin.f6497.9%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right) \]
      5. Simplified97.9%

        \[\leadsto \color{blue}{\sin y + x} \]

      if 2.09999999999999977e-53 < z

      1. Initial program 99.9%

        \[\left(x + \sin y\right) + z \cdot \cos y \]
      2. Add Preprocessing
      3. Step-by-step derivation
        1. flip-+N/A

          \[\leadsto \frac{\left(x + \sin y\right) \cdot \left(x + \sin y\right) - \left(z \cdot \cos y\right) \cdot \left(z \cdot \cos y\right)}{\color{blue}{\left(x + \sin y\right) - z \cdot \cos y}} \]
        2. div-invN/A

          \[\leadsto \left(\left(x + \sin y\right) \cdot \left(x + \sin y\right) - \left(z \cdot \cos y\right) \cdot \left(z \cdot \cos y\right)\right) \cdot \color{blue}{\frac{1}{\left(x + \sin y\right) - z \cdot \cos y}} \]
        3. difference-of-squaresN/A

          \[\leadsto \left(\left(\left(x + \sin y\right) + z \cdot \cos y\right) \cdot \left(\left(x + \sin y\right) - z \cdot \cos y\right)\right) \cdot \frac{\color{blue}{1}}{\left(x + \sin y\right) - z \cdot \cos y} \]
        4. associate-*l*N/A

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

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x + \sin y\right), \left(z \cdot \cos y\right)\right), \left(\color{blue}{\left(\left(x + \sin y\right) - z \cdot \cos y\right)} \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \sin y\right), \left(z \cdot \cos y\right)\right), \left(\left(\color{blue}{\left(x + \sin y\right)} - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
        8. sin-lowering-sin.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \left(z \cdot \cos y\right)\right), \left(\left(\left(x + \color{blue}{\sin y}\right) - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
        9. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \mathsf{*.f64}\left(z, \cos y\right)\right), \left(\left(\left(x + \sin y\right) - \color{blue}{z \cdot \cos y}\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
        10. cos-lowering-cos.f64N/A

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

          \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right), \mathsf{*.f64}\left(\left(\left(x + \sin y\right) - z \cdot \cos y\right), \color{blue}{\left(\frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)}\right)\right) \]
      4. Applied egg-rr99.8%

        \[\leadsto \color{blue}{\left(\left(x + \sin y\right) + z \cdot \cos y\right) \cdot \left(\left(\left(x + \sin y\right) - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)} \]
      5. Taylor expanded in z around -inf

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

          \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \cos y + -1 \cdot \frac{x + \sin y}{z}\right)\right) \]
        2. distribute-rgt-neg-inN/A

          \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \cos y + -1 \cdot \frac{x + \sin y}{z}\right)\right)\right)} \]
        3. distribute-lft-outN/A

          \[\leadsto z \cdot \left(\mathsf{neg}\left(-1 \cdot \left(\cos y + \frac{x + \sin y}{z}\right)\right)\right) \]
        4. mul-1-negN/A

          \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\cos y + \frac{x + \sin y}{z}\right)\right)\right)\right)\right) \]
        5. remove-double-negN/A

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

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\cos y + \frac{x + \sin y}{z}\right)}\right) \]
        7. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\cos y, \color{blue}{\left(\frac{x + \sin y}{z}\right)}\right)\right) \]
        8. cos-lowering-cos.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \left(\frac{\color{blue}{x + \sin y}}{z}\right)\right)\right) \]
        9. /-lowering-/.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\left(x + \sin y\right), \color{blue}{z}\right)\right)\right) \]
        10. +-commutativeN/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\left(\sin y + x\right), z\right)\right)\right) \]
        11. +-lowering-+.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\sin y, x\right), z\right)\right)\right) \]
        12. sin-lowering-sin.f6499.9%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right), z\right)\right)\right) \]
      7. Simplified99.9%

        \[\leadsto \color{blue}{z \cdot \left(\cos y + \frac{\sin y + x}{z}\right)} \]
      8. Taylor expanded in y around 0

        \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \color{blue}{\left(\frac{x}{z}\right)}\right)\right) \]
      9. Step-by-step derivation
        1. /-lowering-/.f6499.8%

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.05 \cdot 10^{-35}:\\ \;\;\;\;\mathsf{fma}\left(\cos y, z, x\right)\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{-53}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 3: 99.9% accurate, 1.0× speedup?

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

      \[\left(x + \sin y\right) + z \cdot \cos y \]
    2. Add Preprocessing
    3. Final simplification99.9%

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

    Alternative 4: 84.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -9.2 \cdot 10^{+200}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-35}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-73}:\\ \;\;\;\;x + \sin y\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+125}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* (cos y) z)))
       (if (<= z -9.2e+200)
         t_0
         (if (<= z -5e-35)
           (+ z x)
           (if (<= z 1.7e-73) (+ x (sin y)) (if (<= z 2e+125) (+ z x) t_0))))))
    double code(double x, double y, double z) {
    	double t_0 = cos(y) * z;
    	double tmp;
    	if (z <= -9.2e+200) {
    		tmp = t_0;
    	} else if (z <= -5e-35) {
    		tmp = z + x;
    	} else if (z <= 1.7e-73) {
    		tmp = x + sin(y);
    	} else if (z <= 2e+125) {
    		tmp = z + 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 = cos(y) * z
        if (z <= (-9.2d+200)) then
            tmp = t_0
        else if (z <= (-5d-35)) then
            tmp = z + x
        else if (z <= 1.7d-73) then
            tmp = x + sin(y)
        else if (z <= 2d+125) then
            tmp = z + x
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = Math.cos(y) * z;
    	double tmp;
    	if (z <= -9.2e+200) {
    		tmp = t_0;
    	} else if (z <= -5e-35) {
    		tmp = z + x;
    	} else if (z <= 1.7e-73) {
    		tmp = x + Math.sin(y);
    	} else if (z <= 2e+125) {
    		tmp = z + x;
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = math.cos(y) * z
    	tmp = 0
    	if z <= -9.2e+200:
    		tmp = t_0
    	elif z <= -5e-35:
    		tmp = z + x
    	elif z <= 1.7e-73:
    		tmp = x + math.sin(y)
    	elif z <= 2e+125:
    		tmp = z + x
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(cos(y) * z)
    	tmp = 0.0
    	if (z <= -9.2e+200)
    		tmp = t_0;
    	elseif (z <= -5e-35)
    		tmp = Float64(z + x);
    	elseif (z <= 1.7e-73)
    		tmp = Float64(x + sin(y));
    	elseif (z <= 2e+125)
    		tmp = Float64(z + x);
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = cos(y) * z;
    	tmp = 0.0;
    	if (z <= -9.2e+200)
    		tmp = t_0;
    	elseif (z <= -5e-35)
    		tmp = z + x;
    	elseif (z <= 1.7e-73)
    		tmp = x + sin(y);
    	elseif (z <= 2e+125)
    		tmp = z + x;
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[Cos[y], $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -9.2e+200], t$95$0, If[LessEqual[z, -5e-35], N[(z + x), $MachinePrecision], If[LessEqual[z, 1.7e-73], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2e+125], N[(z + x), $MachinePrecision], t$95$0]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos y \cdot z\\
    \mathbf{if}\;z \leq -9.2 \cdot 10^{+200}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;z \leq -5 \cdot 10^{-35}:\\
    \;\;\;\;z + x\\
    
    \mathbf{elif}\;z \leq 1.7 \cdot 10^{-73}:\\
    \;\;\;\;x + \sin y\\
    
    \mathbf{elif}\;z \leq 2 \cdot 10^{+125}:\\
    \;\;\;\;z + x\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -9.20000000000000013e200 or 1.9999999999999998e125 < z

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{z \cdot \cos y} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right) \]
        2. cos-lowering-cos.f6496.2%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right) \]
      5. Simplified96.2%

        \[\leadsto \color{blue}{z \cdot \cos y} \]

      if -9.20000000000000013e200 < z < -4.99999999999999964e-35 or 1.7000000000000001e-73 < z < 1.9999999999999998e125

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x + z} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto z + \color{blue}{x} \]
        2. +-lowering-+.f6483.7%

          \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
      5. Simplified83.7%

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

      if -4.99999999999999964e-35 < z < 1.7000000000000001e-73

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{x + \sin y} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \sin y + \color{blue}{x} \]
        2. +-lowering-+.f64N/A

          \[\leadsto \mathsf{+.f64}\left(\sin y, \color{blue}{x}\right) \]
        3. sin-lowering-sin.f6497.8%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right) \]
      5. Simplified97.8%

        \[\leadsto \color{blue}{\sin y + x} \]
    3. Recombined 3 regimes into one program.
    4. Final simplification92.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{+200}:\\ \;\;\;\;\cos y \cdot z\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-35}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{-73}:\\ \;\;\;\;x + \sin y\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+125}:\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;\cos y \cdot z\\ \end{array} \]
    5. Add Preprocessing

    Alternative 5: 69.4% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos y \cdot z\\ \mathbf{if}\;z \leq -1.9 \cdot 10^{+197}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-98}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-169}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+125}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* (cos y) z)))
       (if (<= z -1.9e+197)
         t_0
         (if (<= z -2.55e-98)
           (+ z x)
           (if (<= z -5e-169) (sin y) (if (<= z 1.26e+125) (+ y (+ z x)) t_0))))))
    double code(double x, double y, double z) {
    	double t_0 = cos(y) * z;
    	double tmp;
    	if (z <= -1.9e+197) {
    		tmp = t_0;
    	} else if (z <= -2.55e-98) {
    		tmp = z + x;
    	} else if (z <= -5e-169) {
    		tmp = sin(y);
    	} else if (z <= 1.26e+125) {
    		tmp = y + (z + 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 = cos(y) * z
        if (z <= (-1.9d+197)) then
            tmp = t_0
        else if (z <= (-2.55d-98)) then
            tmp = z + x
        else if (z <= (-5d-169)) then
            tmp = sin(y)
        else if (z <= 1.26d+125) then
            tmp = y + (z + x)
        else
            tmp = t_0
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double t_0 = Math.cos(y) * z;
    	double tmp;
    	if (z <= -1.9e+197) {
    		tmp = t_0;
    	} else if (z <= -2.55e-98) {
    		tmp = z + x;
    	} else if (z <= -5e-169) {
    		tmp = Math.sin(y);
    	} else if (z <= 1.26e+125) {
    		tmp = y + (z + x);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = math.cos(y) * z
    	tmp = 0
    	if z <= -1.9e+197:
    		tmp = t_0
    	elif z <= -2.55e-98:
    		tmp = z + x
    	elif z <= -5e-169:
    		tmp = math.sin(y)
    	elif z <= 1.26e+125:
    		tmp = y + (z + x)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(cos(y) * z)
    	tmp = 0.0
    	if (z <= -1.9e+197)
    		tmp = t_0;
    	elseif (z <= -2.55e-98)
    		tmp = Float64(z + x);
    	elseif (z <= -5e-169)
    		tmp = sin(y);
    	elseif (z <= 1.26e+125)
    		tmp = Float64(y + Float64(z + x));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = cos(y) * z;
    	tmp = 0.0;
    	if (z <= -1.9e+197)
    		tmp = t_0;
    	elseif (z <= -2.55e-98)
    		tmp = z + x;
    	elseif (z <= -5e-169)
    		tmp = sin(y);
    	elseif (z <= 1.26e+125)
    		tmp = y + (z + x);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[Cos[y], $MachinePrecision] * z), $MachinePrecision]}, If[LessEqual[z, -1.9e+197], t$95$0, If[LessEqual[z, -2.55e-98], N[(z + x), $MachinePrecision], If[LessEqual[z, -5e-169], N[Sin[y], $MachinePrecision], If[LessEqual[z, 1.26e+125], N[(y + N[(z + x), $MachinePrecision]), $MachinePrecision], t$95$0]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos y \cdot z\\
    \mathbf{if}\;z \leq -1.9 \cdot 10^{+197}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;z \leq -2.55 \cdot 10^{-98}:\\
    \;\;\;\;z + x\\
    
    \mathbf{elif}\;z \leq -5 \cdot 10^{-169}:\\
    \;\;\;\;\sin y\\
    
    \mathbf{elif}\;z \leq 1.26 \cdot 10^{+125}:\\
    \;\;\;\;y + \left(z + x\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if z < -1.9000000000000001e197 or 1.25999999999999993e125 < z

      1. Initial program 99.8%

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

        \[\leadsto \color{blue}{z \cdot \cos y} \]
      4. Step-by-step derivation
        1. *-lowering-*.f64N/A

          \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right) \]
        2. cos-lowering-cos.f6496.2%

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right) \]
      5. Simplified96.2%

        \[\leadsto \color{blue}{z \cdot \cos y} \]

      if -1.9000000000000001e197 < z < -2.55000000000000011e-98

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x + z} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto z + \color{blue}{x} \]
        2. +-lowering-+.f6480.1%

          \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
      5. Simplified80.1%

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

      if -2.55000000000000011e-98 < z < -5.0000000000000002e-169

      1. Initial program 100.0%

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

        \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
      4. Step-by-step derivation
        1. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right)\right) \]
        4. cos-lowering-cos.f6484.0%

          \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right) \]
      5. Simplified84.0%

        \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
      6. Taylor expanded in z around 0

        \[\leadsto \color{blue}{\sin y} \]
      7. Step-by-step derivation
        1. sin-lowering-sin.f6484.0%

          \[\leadsto \mathsf{sin.f64}\left(y\right) \]
      8. Simplified84.0%

        \[\leadsto \color{blue}{\sin y} \]

      if -5.0000000000000002e-169 < z < 1.25999999999999993e125

      1. Initial program 100.0%

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

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

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

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

          \[\leadsto y + \left(x + \color{blue}{z}\right) \]
        4. +-lowering-+.f64N/A

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

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

          \[\leadsto \mathsf{+.f64}\left(y, \mathsf{+.f64}\left(z, \color{blue}{x}\right)\right) \]
      5. Simplified69.9%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.9 \cdot 10^{+197}:\\ \;\;\;\;\cos y \cdot z\\ \mathbf{elif}\;z \leq -2.55 \cdot 10^{-98}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq -5 \cdot 10^{-169}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;z \leq 1.26 \cdot 10^{+125}:\\ \;\;\;\;y + \left(z + x\right)\\ \mathbf{else}:\\ \;\;\;\;\cos y \cdot z\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 94.7% accurate, 1.8× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-37}:\\ \;\;\;\;x + \cos y \cdot z\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-48}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (if (<= z -2.9e-37)
       (+ x (* (cos y) z))
       (if (<= z 5.8e-48) (+ x (sin y)) (* z (+ (cos y) (/ x z))))))
    double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -2.9e-37) {
    		tmp = x + (cos(y) * z);
    	} else if (z <= 5.8e-48) {
    		tmp = x + sin(y);
    	} else {
    		tmp = z * (cos(y) + (x / z));
    	}
    	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 <= (-2.9d-37)) then
            tmp = x + (cos(y) * z)
        else if (z <= 5.8d-48) then
            tmp = x + sin(y)
        else
            tmp = z * (cos(y) + (x / z))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z) {
    	double tmp;
    	if (z <= -2.9e-37) {
    		tmp = x + (Math.cos(y) * z);
    	} else if (z <= 5.8e-48) {
    		tmp = x + Math.sin(y);
    	} else {
    		tmp = z * (Math.cos(y) + (x / z));
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	tmp = 0
    	if z <= -2.9e-37:
    		tmp = x + (math.cos(y) * z)
    	elif z <= 5.8e-48:
    		tmp = x + math.sin(y)
    	else:
    		tmp = z * (math.cos(y) + (x / z))
    	return tmp
    
    function code(x, y, z)
    	tmp = 0.0
    	if (z <= -2.9e-37)
    		tmp = Float64(x + Float64(cos(y) * z));
    	elseif (z <= 5.8e-48)
    		tmp = Float64(x + sin(y));
    	else
    		tmp = Float64(z * Float64(cos(y) + Float64(x / z)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	tmp = 0.0;
    	if (z <= -2.9e-37)
    		tmp = x + (cos(y) * z);
    	elseif (z <= 5.8e-48)
    		tmp = x + sin(y);
    	else
    		tmp = z * (cos(y) + (x / z));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := If[LessEqual[z, -2.9e-37], N[(x + N[(N[Cos[y], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 5.8e-48], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(z * N[(N[Cos[y], $MachinePrecision] + N[(x / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -2.9 \cdot 10^{-37}:\\
    \;\;\;\;x + \cos y \cdot z\\
    
    \mathbf{elif}\;z \leq 5.8 \cdot 10^{-48}:\\
    \;\;\;\;x + \sin y\\
    
    \mathbf{else}:\\
    \;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -2.90000000000000005e-37

      1. Initial program 99.8%

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

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

          \[\leadsto \color{blue}{x} + z \cdot \cos y \]

        if -2.90000000000000005e-37 < z < 5.8000000000000006e-48

        1. Initial program 100.0%

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

          \[\leadsto \color{blue}{x + \sin y} \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \sin y + \color{blue}{x} \]
          2. +-lowering-+.f64N/A

            \[\leadsto \mathsf{+.f64}\left(\sin y, \color{blue}{x}\right) \]
          3. sin-lowering-sin.f6497.9%

            \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right) \]
        5. Simplified97.9%

          \[\leadsto \color{blue}{\sin y + x} \]

        if 5.8000000000000006e-48 < z

        1. Initial program 99.9%

          \[\left(x + \sin y\right) + z \cdot \cos y \]
        2. Add Preprocessing
        3. Step-by-step derivation
          1. flip-+N/A

            \[\leadsto \frac{\left(x + \sin y\right) \cdot \left(x + \sin y\right) - \left(z \cdot \cos y\right) \cdot \left(z \cdot \cos y\right)}{\color{blue}{\left(x + \sin y\right) - z \cdot \cos y}} \]
          2. div-invN/A

            \[\leadsto \left(\left(x + \sin y\right) \cdot \left(x + \sin y\right) - \left(z \cdot \cos y\right) \cdot \left(z \cdot \cos y\right)\right) \cdot \color{blue}{\frac{1}{\left(x + \sin y\right) - z \cdot \cos y}} \]
          3. difference-of-squaresN/A

            \[\leadsto \left(\left(\left(x + \sin y\right) + z \cdot \cos y\right) \cdot \left(\left(x + \sin y\right) - z \cdot \cos y\right)\right) \cdot \frac{\color{blue}{1}}{\left(x + \sin y\right) - z \cdot \cos y} \]
          4. associate-*l*N/A

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

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\left(x + \sin y\right), \left(z \cdot \cos y\right)\right), \left(\color{blue}{\left(\left(x + \sin y\right) - z \cdot \cos y\right)} \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \sin y\right), \left(z \cdot \cos y\right)\right), \left(\left(\color{blue}{\left(x + \sin y\right)} - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
          8. sin-lowering-sin.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \left(z \cdot \cos y\right)\right), \left(\left(\left(x + \color{blue}{\sin y}\right) - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
          9. *-lowering-*.f64N/A

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \mathsf{*.f64}\left(z, \cos y\right)\right), \left(\left(\left(x + \sin y\right) - \color{blue}{z \cdot \cos y}\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)\right) \]
          10. cos-lowering-cos.f64N/A

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

            \[\leadsto \mathsf{*.f64}\left(\mathsf{+.f64}\left(\mathsf{+.f64}\left(x, \mathsf{sin.f64}\left(y\right)\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right), \mathsf{*.f64}\left(\left(\left(x + \sin y\right) - z \cdot \cos y\right), \color{blue}{\left(\frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)}\right)\right) \]
        4. Applied egg-rr99.8%

          \[\leadsto \color{blue}{\left(\left(x + \sin y\right) + z \cdot \cos y\right) \cdot \left(\left(\left(x + \sin y\right) - z \cdot \cos y\right) \cdot \frac{1}{\left(x + \sin y\right) - z \cdot \cos y}\right)} \]
        5. Taylor expanded in z around -inf

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

            \[\leadsto \mathsf{neg}\left(z \cdot \left(-1 \cdot \cos y + -1 \cdot \frac{x + \sin y}{z}\right)\right) \]
          2. distribute-rgt-neg-inN/A

            \[\leadsto z \cdot \color{blue}{\left(\mathsf{neg}\left(\left(-1 \cdot \cos y + -1 \cdot \frac{x + \sin y}{z}\right)\right)\right)} \]
          3. distribute-lft-outN/A

            \[\leadsto z \cdot \left(\mathsf{neg}\left(-1 \cdot \left(\cos y + \frac{x + \sin y}{z}\right)\right)\right) \]
          4. mul-1-negN/A

            \[\leadsto z \cdot \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\left(\cos y + \frac{x + \sin y}{z}\right)\right)\right)\right)\right) \]
          5. remove-double-negN/A

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

            \[\leadsto \mathsf{*.f64}\left(z, \color{blue}{\left(\cos y + \frac{x + \sin y}{z}\right)}\right) \]
          7. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\cos y, \color{blue}{\left(\frac{x + \sin y}{z}\right)}\right)\right) \]
          8. cos-lowering-cos.f64N/A

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \left(\frac{\color{blue}{x + \sin y}}{z}\right)\right)\right) \]
          9. /-lowering-/.f64N/A

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\left(x + \sin y\right), \color{blue}{z}\right)\right)\right) \]
          10. +-commutativeN/A

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\left(\sin y + x\right), z\right)\right)\right) \]
          11. +-lowering-+.f64N/A

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\sin y, x\right), z\right)\right)\right) \]
          12. sin-lowering-sin.f6499.9%

            \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right), z\right)\right)\right) \]
        7. Simplified99.9%

          \[\leadsto \color{blue}{z \cdot \left(\cos y + \frac{\sin y + x}{z}\right)} \]
        8. Taylor expanded in y around 0

          \[\leadsto \mathsf{*.f64}\left(z, \mathsf{+.f64}\left(\mathsf{cos.f64}\left(y\right), \color{blue}{\left(\frac{x}{z}\right)}\right)\right) \]
        9. Step-by-step derivation
          1. /-lowering-/.f6499.8%

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

          \[\leadsto z \cdot \left(\cos y + \color{blue}{\frac{x}{z}}\right) \]
      5. Recombined 3 regimes into one program.
      6. Final simplification98.3%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.9 \cdot 10^{-37}:\\ \;\;\;\;x + \cos y \cdot z\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-48}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \left(\cos y + \frac{x}{z}\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 7: 94.8% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \cos y \cdot z\\ \mathbf{if}\;z \leq -4.1 \cdot 10^{-34}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-71}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (+ x (* (cos y) z))))
         (if (<= z -4.1e-34) t_0 (if (<= z 3.2e-71) (+ x (sin y)) t_0))))
      double code(double x, double y, double z) {
      	double t_0 = x + (cos(y) * z);
      	double tmp;
      	if (z <= -4.1e-34) {
      		tmp = t_0;
      	} else if (z <= 3.2e-71) {
      		tmp = x + sin(y);
      	} 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 = x + (cos(y) * z)
          if (z <= (-4.1d-34)) then
              tmp = t_0
          else if (z <= 3.2d-71) then
              tmp = x + sin(y)
          else
              tmp = t_0
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z) {
      	double t_0 = x + (Math.cos(y) * z);
      	double tmp;
      	if (z <= -4.1e-34) {
      		tmp = t_0;
      	} else if (z <= 3.2e-71) {
      		tmp = x + Math.sin(y);
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = x + (math.cos(y) * z)
      	tmp = 0
      	if z <= -4.1e-34:
      		tmp = t_0
      	elif z <= 3.2e-71:
      		tmp = x + math.sin(y)
      	else:
      		tmp = t_0
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(x + Float64(cos(y) * z))
      	tmp = 0.0
      	if (z <= -4.1e-34)
      		tmp = t_0;
      	elseif (z <= 3.2e-71)
      		tmp = Float64(x + sin(y));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = x + (cos(y) * z);
      	tmp = 0.0;
      	if (z <= -4.1e-34)
      		tmp = t_0;
      	elseif (z <= 3.2e-71)
      		tmp = x + sin(y);
      	else
      		tmp = t_0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[(N[Cos[y], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.1e-34], t$95$0, If[LessEqual[z, 3.2e-71], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := x + \cos y \cdot z\\
      \mathbf{if}\;z \leq -4.1 \cdot 10^{-34}:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;z \leq 3.2 \cdot 10^{-71}:\\
      \;\;\;\;x + \sin y\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if z < -4.1000000000000004e-34 or 3.1999999999999999e-71 < z

        1. Initial program 99.9%

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

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

            \[\leadsto \color{blue}{x} + z \cdot \cos y \]

          if -4.1000000000000004e-34 < z < 3.1999999999999999e-71

          1. Initial program 100.0%

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

            \[\leadsto \color{blue}{x + \sin y} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \sin y + \color{blue}{x} \]
            2. +-lowering-+.f64N/A

              \[\leadsto \mathsf{+.f64}\left(\sin y, \color{blue}{x}\right) \]
            3. sin-lowering-sin.f6497.8%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right) \]
          5. Simplified97.8%

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{-34}:\\ \;\;\;\;x + \cos y \cdot z\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{-71}:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;x + \cos y \cdot z\\ \end{array} \]
        7. Add Preprocessing

        Alternative 8: 69.2% accurate, 2.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.4 \cdot 10^{+252}:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;y \leq -1.2 \cdot 10^{+42}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+29}:\\ \;\;\;\;\left(z + x\right) + y \cdot \left(1 + y \cdot \left(z \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -3.4e+252)
           (sin y)
           (if (<= y -1.2e+42)
             (+ z x)
             (if (<= y 2.15e+29) (+ (+ z x) (* y (+ 1.0 (* y (* z -0.5))))) (+ z x)))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -3.4e+252) {
        		tmp = sin(y);
        	} else if (y <= -1.2e+42) {
        		tmp = z + x;
        	} else if (y <= 2.15e+29) {
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	} else {
        		tmp = z + x;
        	}
        	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 (y <= (-3.4d+252)) then
                tmp = sin(y)
            else if (y <= (-1.2d+42)) then
                tmp = z + x
            else if (y <= 2.15d+29) then
                tmp = (z + x) + (y * (1.0d0 + (y * (z * (-0.5d0)))))
            else
                tmp = z + x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -3.4e+252) {
        		tmp = Math.sin(y);
        	} else if (y <= -1.2e+42) {
        		tmp = z + x;
        	} else if (y <= 2.15e+29) {
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	} else {
        		tmp = z + x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if y <= -3.4e+252:
        		tmp = math.sin(y)
        	elif y <= -1.2e+42:
        		tmp = z + x
        	elif y <= 2.15e+29:
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))))
        	else:
        		tmp = z + x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -3.4e+252)
        		tmp = sin(y);
        	elseif (y <= -1.2e+42)
        		tmp = Float64(z + x);
        	elseif (y <= 2.15e+29)
        		tmp = Float64(Float64(z + x) + Float64(y * Float64(1.0 + Float64(y * Float64(z * -0.5)))));
        	else
        		tmp = Float64(z + x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (y <= -3.4e+252)
        		tmp = sin(y);
        	elseif (y <= -1.2e+42)
        		tmp = z + x;
        	elseif (y <= 2.15e+29)
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	else
        		tmp = z + x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -3.4e+252], N[Sin[y], $MachinePrecision], If[LessEqual[y, -1.2e+42], N[(z + x), $MachinePrecision], If[LessEqual[y, 2.15e+29], N[(N[(z + x), $MachinePrecision] + N[(y * N[(1.0 + N[(y * N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + x), $MachinePrecision]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -3.4 \cdot 10^{+252}:\\
        \;\;\;\;\sin y\\
        
        \mathbf{elif}\;y \leq -1.2 \cdot 10^{+42}:\\
        \;\;\;\;z + x\\
        
        \mathbf{elif}\;y \leq 2.15 \cdot 10^{+29}:\\
        \;\;\;\;\left(z + x\right) + y \cdot \left(1 + y \cdot \left(z \cdot -0.5\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;z + x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if y < -3.4e252

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
          4. Step-by-step derivation
            1. +-lowering-+.f64N/A

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right)\right) \]
            4. cos-lowering-cos.f6489.9%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right) \]
          5. Simplified89.9%

            \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
          6. Taylor expanded in z around 0

            \[\leadsto \color{blue}{\sin y} \]
          7. Step-by-step derivation
            1. sin-lowering-sin.f6454.5%

              \[\leadsto \mathsf{sin.f64}\left(y\right) \]
          8. Simplified54.5%

            \[\leadsto \color{blue}{\sin y} \]

          if -3.4e252 < y < -1.1999999999999999e42 or 2.1500000000000001e29 < y

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{x + z} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto z + \color{blue}{x} \]
            2. +-lowering-+.f6439.6%

              \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
          5. Simplified39.6%

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

          if -1.1999999999999999e42 < y < 2.1500000000000001e29

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, x\right), \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(z \cdot \color{blue}{\frac{-1}{2}}\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f6495.7%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, x\right), \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \color{blue}{\frac{-1}{2}}\right)\right)\right)\right)\right) \]
          5. Simplified95.7%

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

        Alternative 9: 69.8% accurate, 9.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+42}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;y \leq 2.1 \cdot 10^{+27}:\\ \;\;\;\;\left(z + x\right) + y \cdot \left(1 + y \cdot \left(z \cdot -0.5\right)\right)\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -1.3e+42)
           (+ z x)
           (if (<= y 2.1e+27) (+ (+ z x) (* y (+ 1.0 (* y (* z -0.5))))) (+ z x))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.3e+42) {
        		tmp = z + x;
        	} else if (y <= 2.1e+27) {
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	} else {
        		tmp = z + x;
        	}
        	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 (y <= (-1.3d+42)) then
                tmp = z + x
            else if (y <= 2.1d+27) then
                tmp = (z + x) + (y * (1.0d0 + (y * (z * (-0.5d0)))))
            else
                tmp = z + x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.3e+42) {
        		tmp = z + x;
        	} else if (y <= 2.1e+27) {
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	} else {
        		tmp = z + x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if y <= -1.3e+42:
        		tmp = z + x
        	elif y <= 2.1e+27:
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))))
        	else:
        		tmp = z + x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -1.3e+42)
        		tmp = Float64(z + x);
        	elseif (y <= 2.1e+27)
        		tmp = Float64(Float64(z + x) + Float64(y * Float64(1.0 + Float64(y * Float64(z * -0.5)))));
        	else
        		tmp = Float64(z + x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (y <= -1.3e+42)
        		tmp = z + x;
        	elseif (y <= 2.1e+27)
        		tmp = (z + x) + (y * (1.0 + (y * (z * -0.5))));
        	else
        		tmp = z + x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -1.3e+42], N[(z + x), $MachinePrecision], If[LessEqual[y, 2.1e+27], N[(N[(z + x), $MachinePrecision] + N[(y * N[(1.0 + N[(y * N[(z * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z + x), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.3 \cdot 10^{+42}:\\
        \;\;\;\;z + x\\
        
        \mathbf{elif}\;y \leq 2.1 \cdot 10^{+27}:\\
        \;\;\;\;\left(z + x\right) + y \cdot \left(1 + y \cdot \left(z \cdot -0.5\right)\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;z + x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.29999999999999995e42 or 2.09999999999999995e27 < y

          1. Initial program 99.8%

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

            \[\leadsto \color{blue}{x + z} \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto z + \color{blue}{x} \]
            2. +-lowering-+.f6436.0%

              \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
          5. Simplified36.0%

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

          if -1.29999999999999995e42 < y < 2.09999999999999995e27

          1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, x\right), \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \left(z \cdot \color{blue}{\frac{-1}{2}}\right)\right)\right)\right)\right) \]
            12. *-lowering-*.f6495.7%

              \[\leadsto \mathsf{+.f64}\left(\mathsf{+.f64}\left(z, x\right), \mathsf{*.f64}\left(y, \mathsf{+.f64}\left(1, \mathsf{*.f64}\left(y, \mathsf{*.f64}\left(z, \color{blue}{\frac{-1}{2}}\right)\right)\right)\right)\right) \]
          5. Simplified95.7%

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

        Alternative 10: 69.2% accurate, 13.8× speedup?

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

          1. Initial program 99.8%

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

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

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

            if -3.7999999999999999e49 < y < 2e27

            1. Initial program 100.0%

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

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

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

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

                \[\leadsto y + \left(x + \color{blue}{z}\right) \]
              4. +-lowering-+.f64N/A

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

                \[\leadsto \mathsf{+.f64}\left(y, \left(z + \color{blue}{x}\right)\right) \]
              6. +-lowering-+.f6495.1%

                \[\leadsto \mathsf{+.f64}\left(y, \mathsf{+.f64}\left(z, \color{blue}{x}\right)\right) \]
            5. Simplified95.1%

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

            if 2e27 < y

            1. Initial program 99.8%

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

              \[\leadsto \color{blue}{x + z} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto z + \color{blue}{x} \]
              2. +-lowering-+.f6431.8%

                \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
            5. Simplified31.8%

              \[\leadsto \color{blue}{z + x} \]
          5. Recombined 3 regimes into one program.
          6. Add Preprocessing

          Alternative 11: 68.0% accurate, 15.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-123}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{-157}:\\ \;\;\;\;y + z\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= x -1.05e-123) (+ z x) (if (<= x 1.32e-157) (+ y z) (+ z x))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (x <= -1.05e-123) {
          		tmp = z + x;
          	} else if (x <= 1.32e-157) {
          		tmp = y + z;
          	} else {
          		tmp = z + x;
          	}
          	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 (x <= (-1.05d-123)) then
                  tmp = z + x
              else if (x <= 1.32d-157) then
                  tmp = y + z
              else
                  tmp = z + x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (x <= -1.05e-123) {
          		tmp = z + x;
          	} else if (x <= 1.32e-157) {
          		tmp = y + z;
          	} else {
          		tmp = z + x;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if x <= -1.05e-123:
          		tmp = z + x
          	elif x <= 1.32e-157:
          		tmp = y + z
          	else:
          		tmp = z + x
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (x <= -1.05e-123)
          		tmp = Float64(z + x);
          	elseif (x <= 1.32e-157)
          		tmp = Float64(y + z);
          	else
          		tmp = Float64(z + x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (x <= -1.05e-123)
          		tmp = z + x;
          	elseif (x <= 1.32e-157)
          		tmp = y + z;
          	else
          		tmp = z + x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[x, -1.05e-123], N[(z + x), $MachinePrecision], If[LessEqual[x, 1.32e-157], N[(y + z), $MachinePrecision], N[(z + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -1.05 \cdot 10^{-123}:\\
          \;\;\;\;z + x\\
          
          \mathbf{elif}\;x \leq 1.32 \cdot 10^{-157}:\\
          \;\;\;\;y + z\\
          
          \mathbf{else}:\\
          \;\;\;\;z + x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -1.05e-123 or 1.3200000000000001e-157 < x

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{x + z} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto z + \color{blue}{x} \]
              2. +-lowering-+.f6475.2%

                \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
            5. Simplified75.2%

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

            if -1.05e-123 < x < 1.3200000000000001e-157

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
            4. Step-by-step derivation
              1. +-lowering-+.f64N/A

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

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

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right)\right) \]
              4. cos-lowering-cos.f6499.2%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right) \]
            5. Simplified99.2%

              \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
            6. Taylor expanded in y around 0

              \[\leadsto \color{blue}{y + z} \]
            7. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto z + \color{blue}{y} \]
              2. +-lowering-+.f6458.1%

                \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{y}\right) \]
            8. Simplified58.1%

              \[\leadsto \color{blue}{z + y} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification70.3%

            \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.05 \cdot 10^{-123}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;x \leq 1.32 \cdot 10^{-157}:\\ \;\;\;\;y + z\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \]
          5. Add Preprocessing

          Alternative 12: 65.5% accurate, 15.9× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -9 \cdot 10^{-132}:\\ \;\;\;\;z + x\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-224}:\\ \;\;\;\;y + x\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -9e-132) (+ z x) (if (<= z 3.4e-224) (+ y x) (+ z x))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -9e-132) {
          		tmp = z + x;
          	} else if (z <= 3.4e-224) {
          		tmp = y + x;
          	} else {
          		tmp = z + x;
          	}
          	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 <= (-9d-132)) then
                  tmp = z + x
              else if (z <= 3.4d-224) then
                  tmp = y + x
              else
                  tmp = z + x
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -9e-132) {
          		tmp = z + x;
          	} else if (z <= 3.4e-224) {
          		tmp = y + x;
          	} else {
          		tmp = z + x;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -9e-132:
          		tmp = z + x
          	elif z <= 3.4e-224:
          		tmp = y + x
          	else:
          		tmp = z + x
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -9e-132)
          		tmp = Float64(z + x);
          	elseif (z <= 3.4e-224)
          		tmp = Float64(y + x);
          	else
          		tmp = Float64(z + x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if (z <= -9e-132)
          		tmp = z + x;
          	elseif (z <= 3.4e-224)
          		tmp = y + x;
          	else
          		tmp = z + x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -9e-132], N[(z + x), $MachinePrecision], If[LessEqual[z, 3.4e-224], N[(y + x), $MachinePrecision], N[(z + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -9 \cdot 10^{-132}:\\
          \;\;\;\;z + x\\
          
          \mathbf{elif}\;z \leq 3.4 \cdot 10^{-224}:\\
          \;\;\;\;y + x\\
          
          \mathbf{else}:\\
          \;\;\;\;z + x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -8.9999999999999999e-132 or 3.39999999999999992e-224 < z

            1. Initial program 99.9%

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

              \[\leadsto \color{blue}{x + z} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto z + \color{blue}{x} \]
              2. +-lowering-+.f6469.5%

                \[\leadsto \mathsf{+.f64}\left(z, \color{blue}{x}\right) \]
            5. Simplified69.5%

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

            if -8.9999999999999999e-132 < z < 3.39999999999999992e-224

            1. Initial program 100.0%

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

              \[\leadsto \color{blue}{x + \sin y} \]
            4. Step-by-step derivation
              1. +-commutativeN/A

                \[\leadsto \sin y + \color{blue}{x} \]
              2. +-lowering-+.f64N/A

                \[\leadsto \mathsf{+.f64}\left(\sin y, \color{blue}{x}\right) \]
              3. sin-lowering-sin.f64100.0%

                \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), x\right) \]
            5. Simplified100.0%

              \[\leadsto \color{blue}{\sin y + x} \]
            6. Taylor expanded in y around 0

              \[\leadsto \mathsf{+.f64}\left(\color{blue}{y}, x\right) \]
            7. Step-by-step derivation
              1. Simplified64.2%

                \[\leadsto \color{blue}{y} + x \]
            8. Recombined 2 regimes into one program.
            9. Add Preprocessing

            Alternative 13: 54.5% accurate, 18.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.4 \cdot 10^{-25}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 6.4 \cdot 10^{-19}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -1.4e-25) x (if (<= x 6.4e-19) z x)))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -1.4e-25) {
            		tmp = x;
            	} else if (x <= 6.4e-19) {
            		tmp = z;
            	} else {
            		tmp = x;
            	}
            	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 (x <= (-1.4d-25)) then
                    tmp = x
                else if (x <= 6.4d-19) then
                    tmp = z
                else
                    tmp = x
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -1.4e-25) {
            		tmp = x;
            	} else if (x <= 6.4e-19) {
            		tmp = z;
            	} else {
            		tmp = x;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if x <= -1.4e-25:
            		tmp = x
            	elif x <= 6.4e-19:
            		tmp = z
            	else:
            		tmp = x
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -1.4e-25)
            		tmp = x;
            	elseif (x <= 6.4e-19)
            		tmp = z;
            	else
            		tmp = x;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (x <= -1.4e-25)
            		tmp = x;
            	elseif (x <= 6.4e-19)
            		tmp = z;
            	else
            		tmp = x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -1.4e-25], x, If[LessEqual[x, 6.4e-19], z, x]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -1.4 \cdot 10^{-25}:\\
            \;\;\;\;x\\
            
            \mathbf{elif}\;x \leq 6.4 \cdot 10^{-19}:\\
            \;\;\;\;z\\
            
            \mathbf{else}:\\
            \;\;\;\;x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -1.39999999999999994e-25 or 6.39999999999999965e-19 < x

              1. Initial program 99.9%

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

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

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

                if -1.39999999999999994e-25 < x < 6.39999999999999965e-19

                1. Initial program 99.9%

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

                  \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
                4. Step-by-step derivation
                  1. +-lowering-+.f64N/A

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

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

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right)\right) \]
                  4. cos-lowering-cos.f6492.7%

                    \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right) \]
                5. Simplified92.7%

                  \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
                6. Taylor expanded in y around 0

                  \[\leadsto \color{blue}{z} \]
                7. Step-by-step derivation
                  1. Simplified39.5%

                    \[\leadsto \color{blue}{z} \]
                8. Recombined 2 regimes into one program.
                9. Add Preprocessing

                Alternative 14: 44.2% accurate, 18.8× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.16 \cdot 10^{-122}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 5.1 \cdot 10^{-158}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= x -1.16e-122) x (if (<= x 5.1e-158) y x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if (x <= -1.16e-122) {
                		tmp = x;
                	} else if (x <= 5.1e-158) {
                		tmp = y;
                	} else {
                		tmp = x;
                	}
                	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 (x <= (-1.16d-122)) then
                        tmp = x
                    else if (x <= 5.1d-158) then
                        tmp = y
                    else
                        tmp = x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (x <= -1.16e-122) {
                		tmp = x;
                	} else if (x <= 5.1e-158) {
                		tmp = y;
                	} else {
                		tmp = x;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if x <= -1.16e-122:
                		tmp = x
                	elif x <= 5.1e-158:
                		tmp = y
                	else:
                		tmp = x
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (x <= -1.16e-122)
                		tmp = x;
                	elseif (x <= 5.1e-158)
                		tmp = y;
                	else
                		tmp = x;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (x <= -1.16e-122)
                		tmp = x;
                	elseif (x <= 5.1e-158)
                		tmp = y;
                	else
                		tmp = x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[x, -1.16e-122], x, If[LessEqual[x, 5.1e-158], y, x]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x \leq -1.16 \cdot 10^{-122}:\\
                \;\;\;\;x\\
                
                \mathbf{elif}\;x \leq 5.1 \cdot 10^{-158}:\\
                \;\;\;\;y\\
                
                \mathbf{else}:\\
                \;\;\;\;x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -1.16000000000000001e-122 or 5.1000000000000003e-158 < x

                  1. Initial program 99.9%

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

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

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

                    if -1.16000000000000001e-122 < x < 5.1000000000000003e-158

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
                    4. Step-by-step derivation
                      1. +-lowering-+.f64N/A

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

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

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \color{blue}{\cos y}\right)\right) \]
                      4. cos-lowering-cos.f6499.2%

                        \[\leadsto \mathsf{+.f64}\left(\mathsf{sin.f64}\left(y\right), \mathsf{*.f64}\left(z, \mathsf{cos.f64}\left(y\right)\right)\right) \]
                    5. Simplified99.2%

                      \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
                    6. Taylor expanded in z around 0

                      \[\leadsto \color{blue}{\sin y} \]
                    7. Step-by-step derivation
                      1. sin-lowering-sin.f6443.4%

                        \[\leadsto \mathsf{sin.f64}\left(y\right) \]
                    8. Simplified43.4%

                      \[\leadsto \color{blue}{\sin y} \]
                    9. Taylor expanded in y around 0

                      \[\leadsto \color{blue}{y} \]
                    10. Step-by-step derivation
                      1. Simplified21.4%

                        \[\leadsto \color{blue}{y} \]
                    11. Recombined 2 regimes into one program.
                    12. Add Preprocessing

                    Alternative 15: 41.9% accurate, 207.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.9%

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

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

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

                      Reproduce

                      ?
                      herbie shell --seed 2024192 
                      (FPCore (x y z)
                        :name "Graphics.Rasterific.Svg.PathConverter:segmentToBezier from rasterific-svg-0.2.3.1, C"
                        :precision binary64
                        (+ (+ x (sin y)) (* z (cos y))))