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

Percentage Accurate: 99.9% → 99.9%
Time: 9.7s
Alternatives: 14
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 14 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, 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}
Derivation
  1. Initial program 99.9%

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

Alternative 2: 81.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + \sin y\right) + z \cdot \cos y\\ \mathbf{if}\;t\_0 \leq -500000:\\ \;\;\;\;x + z\\ \mathbf{elif}\;t\_0 \leq -0.01:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-13}:\\ \;\;\;\;y + \left(x + z\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\sin y\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (+ x (sin y)) (* z (cos y)))))
   (if (<= t_0 -500000.0)
     (+ x z)
     (if (<= t_0 -0.01)
       (sin y)
       (if (<= t_0 2e-13) (+ y (+ x z)) (if (<= t_0 1.0) (sin y) (+ x z)))))))
double code(double x, double y, double z) {
	double t_0 = (x + sin(y)) + (z * cos(y));
	double tmp;
	if (t_0 <= -500000.0) {
		tmp = x + z;
	} else if (t_0 <= -0.01) {
		tmp = sin(y);
	} else if (t_0 <= 2e-13) {
		tmp = y + (x + z);
	} else if (t_0 <= 1.0) {
		tmp = sin(y);
	} else {
		tmp = 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) :: t_0
    real(8) :: tmp
    t_0 = (x + sin(y)) + (z * cos(y))
    if (t_0 <= (-500000.0d0)) then
        tmp = x + z
    else if (t_0 <= (-0.01d0)) then
        tmp = sin(y)
    else if (t_0 <= 2d-13) then
        tmp = y + (x + z)
    else if (t_0 <= 1.0d0) then
        tmp = sin(y)
    else
        tmp = x + z
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = (x + Math.sin(y)) + (z * Math.cos(y));
	double tmp;
	if (t_0 <= -500000.0) {
		tmp = x + z;
	} else if (t_0 <= -0.01) {
		tmp = Math.sin(y);
	} else if (t_0 <= 2e-13) {
		tmp = y + (x + z);
	} else if (t_0 <= 1.0) {
		tmp = Math.sin(y);
	} else {
		tmp = x + z;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = (x + math.sin(y)) + (z * math.cos(y))
	tmp = 0
	if t_0 <= -500000.0:
		tmp = x + z
	elif t_0 <= -0.01:
		tmp = math.sin(y)
	elif t_0 <= 2e-13:
		tmp = y + (x + z)
	elif t_0 <= 1.0:
		tmp = math.sin(y)
	else:
		tmp = x + z
	return tmp
function code(x, y, z)
	t_0 = Float64(Float64(x + sin(y)) + Float64(z * cos(y)))
	tmp = 0.0
	if (t_0 <= -500000.0)
		tmp = Float64(x + z);
	elseif (t_0 <= -0.01)
		tmp = sin(y);
	elseif (t_0 <= 2e-13)
		tmp = Float64(y + Float64(x + z));
	elseif (t_0 <= 1.0)
		tmp = sin(y);
	else
		tmp = Float64(x + z);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = (x + sin(y)) + (z * cos(y));
	tmp = 0.0;
	if (t_0 <= -500000.0)
		tmp = x + z;
	elseif (t_0 <= -0.01)
		tmp = sin(y);
	elseif (t_0 <= 2e-13)
		tmp = y + (x + z);
	elseif (t_0 <= 1.0)
		tmp = sin(y);
	else
		tmp = x + z;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -500000.0], N[(x + z), $MachinePrecision], If[LessEqual[t$95$0, -0.01], N[Sin[y], $MachinePrecision], If[LessEqual[t$95$0, 2e-13], N[(y + N[(x + z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[Sin[y], $MachinePrecision], N[(x + z), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + \sin y\right) + z \cdot \cos y\\
\mathbf{if}\;t\_0 \leq -500000:\\
\;\;\;\;x + z\\

\mathbf{elif}\;t\_0 \leq -0.01:\\
\;\;\;\;\sin y\\

\mathbf{elif}\;t\_0 \leq 2 \cdot 10^{-13}:\\
\;\;\;\;y + \left(x + z\right)\\

\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin y\\

\mathbf{else}:\\
\;\;\;\;x + z\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < -5e5 or 1 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y)))

    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 \color{blue}{z + x} \]
      2. lower-+.f6474.3

        \[\leadsto \color{blue}{z + x} \]
    5. Applied rewrites74.3%

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

    if -5e5 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < -0.0100000000000000002 or 2.0000000000000001e-13 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 1

    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. +-commutativeN/A

        \[\leadsto \color{blue}{z \cdot \cos y + \sin y} \]
      2. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(z, \cos y, \sin y\right)} \]
      3. lower-cos.f64N/A

        \[\leadsto \mathsf{fma}\left(z, \color{blue}{\cos y}, \sin y\right) \]
      4. lower-sin.f64100.0

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

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

      \[\leadsto \sin y \]
    7. Step-by-step derivation
      1. Applied rewrites97.4%

        \[\leadsto \sin y \]

      if -0.0100000000000000002 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 2.0000000000000001e-13

      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 \color{blue}{\left(y + z\right) + x} \]
        2. associate-+l+N/A

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

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

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

          \[\leadsto y + \color{blue}{\left(z + x\right)} \]
        6. lower-+.f64100.0

          \[\leadsto y + \color{blue}{\left(z + x\right)} \]
      5. Applied rewrites100.0%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + \sin y\right) + z \cdot \cos y \leq -500000:\\ \;\;\;\;x + z\\ \mathbf{elif}\;\left(x + \sin y\right) + z \cdot \cos y \leq -0.01:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;\left(x + \sin y\right) + z \cdot \cos y \leq 2 \cdot 10^{-13}:\\ \;\;\;\;y + \left(x + z\right)\\ \mathbf{elif}\;\left(x + \sin y\right) + z \cdot \cos y \leq 1:\\ \;\;\;\;\sin y\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
    10. Add Preprocessing

    Alternative 3: 69.1% accurate, 0.5× speedup?

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

      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 \color{blue}{z + x} \]
        2. lower-+.f6471.3

          \[\leadsto \color{blue}{z + x} \]
      5. Applied rewrites71.3%

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

      if -5e51 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 0.299999999999999989

      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 \color{blue}{\left(y + z\right) + x} \]
        2. associate-+l+N/A

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

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

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

          \[\leadsto y + \color{blue}{\left(z + x\right)} \]
        6. lower-+.f6469.7

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(x + \sin y\right) + z \cdot \cos y \leq -5 \cdot 10^{+51}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;\left(x + \sin y\right) + z \cdot \cos y \leq 0.3:\\ \;\;\;\;y + \left(x + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
    5. Add Preprocessing

    Alternative 4: 99.9% accurate, 1.0× 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. lift-+.f64N/A

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

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

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

        \[\leadsto \color{blue}{\cos y \cdot z} + \left(x + \sin y\right) \]
      5. lower-fma.f6499.9

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

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

    Alternative 5: 82.5% accurate, 1.7× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \cos y\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+76}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;z \leq 8000000:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (* z (cos y))))
       (if (<= z -1.3e+76)
         t_0
         (if (<= z -4.8e-136) (+ x z) (if (<= z 8000000.0) (+ x (sin y)) t_0)))))
    double code(double x, double y, double z) {
    	double t_0 = z * cos(y);
    	double tmp;
    	if (z <= -1.3e+76) {
    		tmp = t_0;
    	} else if (z <= -4.8e-136) {
    		tmp = x + z;
    	} else if (z <= 8000000.0) {
    		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 = z * cos(y)
        if (z <= (-1.3d+76)) then
            tmp = t_0
        else if (z <= (-4.8d-136)) then
            tmp = x + z
        else if (z <= 8000000.0d0) 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 = z * Math.cos(y);
    	double tmp;
    	if (z <= -1.3e+76) {
    		tmp = t_0;
    	} else if (z <= -4.8e-136) {
    		tmp = x + z;
    	} else if (z <= 8000000.0) {
    		tmp = x + Math.sin(y);
    	} else {
    		tmp = t_0;
    	}
    	return tmp;
    }
    
    def code(x, y, z):
    	t_0 = z * math.cos(y)
    	tmp = 0
    	if z <= -1.3e+76:
    		tmp = t_0
    	elif z <= -4.8e-136:
    		tmp = x + z
    	elif z <= 8000000.0:
    		tmp = x + math.sin(y)
    	else:
    		tmp = t_0
    	return tmp
    
    function code(x, y, z)
    	t_0 = Float64(z * cos(y))
    	tmp = 0.0
    	if (z <= -1.3e+76)
    		tmp = t_0;
    	elseif (z <= -4.8e-136)
    		tmp = Float64(x + z);
    	elseif (z <= 8000000.0)
    		tmp = Float64(x + sin(y));
    	else
    		tmp = t_0;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z)
    	t_0 = z * cos(y);
    	tmp = 0.0;
    	if (z <= -1.3e+76)
    		tmp = t_0;
    	elseif (z <= -4.8e-136)
    		tmp = x + z;
    	elseif (z <= 8000000.0)
    		tmp = x + sin(y);
    	else
    		tmp = t_0;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.3e+76], t$95$0, If[LessEqual[z, -4.8e-136], N[(x + z), $MachinePrecision], If[LessEqual[z, 8000000.0], N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision], t$95$0]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := z \cdot \cos y\\
    \mathbf{if}\;z \leq -1.3 \cdot 10^{+76}:\\
    \;\;\;\;t\_0\\
    
    \mathbf{elif}\;z \leq -4.8 \cdot 10^{-136}:\\
    \;\;\;\;x + z\\
    
    \mathbf{elif}\;z \leq 8000000:\\
    \;\;\;\;x + \sin y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_0\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if z < -1.3e76 or 8e6 < 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. lower-*.f64N/A

          \[\leadsto \color{blue}{z \cdot \cos y} \]
        2. lower-cos.f6481.6

          \[\leadsto z \cdot \color{blue}{\cos y} \]
      5. Applied rewrites81.6%

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

      if -1.3e76 < z < -4.7999999999999997e-136

      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 + z} \]
      4. Step-by-step derivation
        1. +-commutativeN/A

          \[\leadsto \color{blue}{z + x} \]
        2. lower-+.f6493.2

          \[\leadsto \color{blue}{z + x} \]
      5. Applied rewrites93.2%

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

      if -4.7999999999999997e-136 < z < 8e6

      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 \color{blue}{\sin y + x} \]
        2. lower-+.f64N/A

          \[\leadsto \color{blue}{\sin y + x} \]
        3. lower-sin.f6492.5

          \[\leadsto \color{blue}{\sin y} + x \]
      5. Applied rewrites92.5%

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+76}:\\ \;\;\;\;z \cdot \cos y\\ \mathbf{elif}\;z \leq -4.8 \cdot 10^{-136}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;z \leq 8000000:\\ \;\;\;\;x + \sin y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \cos y\\ \end{array} \]
    5. Add Preprocessing

    Alternative 6: 88.4% accurate, 1.7× speedup?

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

          \[\leadsto \color{blue}{z \cdot \cos y} \]
        2. lower-cos.f6481.6

          \[\leadsto z \cdot \color{blue}{\cos y} \]
      5. Applied rewrites81.6%

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

      if -1.3e76 < z < 3e16

      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 \left(x + \sin y\right) + z \cdot \color{blue}{1} \]
      4. Step-by-step derivation
        1. Applied rewrites99.5%

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

      Alternative 7: 80.6% accurate, 1.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_0 := x + \sin y\\ \mathbf{if}\;y \leq -0.22:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (+ x (sin y))))
         (if (<= y -0.22)
           t_0
           (if (<= y 1.95e+15)
             (fma
              (fma y (* y (fma (* y y) 0.041666666666666664 -0.5)) 1.0)
              z
              (+ x y))
             t_0))))
      double code(double x, double y, double z) {
      	double t_0 = x + sin(y);
      	double tmp;
      	if (y <= -0.22) {
      		tmp = t_0;
      	} else if (y <= 1.95e+15) {
      		tmp = fma(fma(y, (y * fma((y * y), 0.041666666666666664, -0.5)), 1.0), z, (x + y));
      	} else {
      		tmp = t_0;
      	}
      	return tmp;
      }
      
      function code(x, y, z)
      	t_0 = Float64(x + sin(y))
      	tmp = 0.0
      	if (y <= -0.22)
      		tmp = t_0;
      	elseif (y <= 1.95e+15)
      		tmp = fma(fma(y, Float64(y * fma(Float64(y * y), 0.041666666666666664, -0.5)), 1.0), z, Float64(x + y));
      	else
      		tmp = t_0;
      	end
      	return tmp
      end
      
      code[x_, y_, z_] := Block[{t$95$0 = N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -0.22], t$95$0, If[LessEqual[y, 1.95e+15], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.041666666666666664 + -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * z + N[(x + y), $MachinePrecision]), $MachinePrecision], t$95$0]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := x + \sin y\\
      \mathbf{if}\;y \leq -0.22:\\
      \;\;\;\;t\_0\\
      
      \mathbf{elif}\;y \leq 1.95 \cdot 10^{+15}:\\
      \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_0\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if y < -0.220000000000000001 or 1.95e15 < y

        1. Initial program 99.8%

          \[\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 \color{blue}{\sin y + x} \]
          2. lower-+.f64N/A

            \[\leadsto \color{blue}{\sin y + x} \]
          3. lower-sin.f6461.3

            \[\leadsto \color{blue}{\sin y} + x \]
        5. Applied rewrites61.3%

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

        if -0.220000000000000001 < y < 1.95e15

        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}{\left(x + y\right)} + z \cdot \cos y \]
        4. Step-by-step derivation
          1. +-commutativeN/A

            \[\leadsto \color{blue}{\left(y + x\right)} + z \cdot \cos y \]
          2. lower-+.f64100.0

            \[\leadsto \color{blue}{\left(y + x\right)} + z \cdot \cos y \]
        5. Applied rewrites100.0%

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

          \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}\right)\right)} \]
        7. Step-by-step derivation
          1. +-commutativeN/A

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

            \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right)} \]
          3. unpow2N/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
          4. lower-*.f64N/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
          5. sub-negN/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{{y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, 1\right) \]
          6. metadata-evalN/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \color{blue}{\frac{-1}{2}}, 1\right) \]
          7. lower-fma.f64N/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right)}, 1\right) \]
          8. unpow2N/A

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

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right), 1\right) \]
          10. +-commutativeN/A

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{-1}{720} \cdot {y}^{2} + \frac{1}{24}}, \frac{-1}{2}\right), 1\right) \]
          11. unpow2N/A

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

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

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \left(\frac{-1}{720} \cdot y\right)} + \frac{1}{24}, \frac{-1}{2}\right), 1\right) \]
          14. lower-fma.f64N/A

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

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{720}}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
          16. lower-*.f6499.2

            \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, \color{blue}{y \cdot -0.001388888888888889}, 0.041666666666666664\right), -0.5\right), 1\right) \]
        8. Applied rewrites99.2%

          \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)} \]
        9. Step-by-step derivation
          1. lift-+.f64N/A

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

            \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) + \left(y + x\right)} \]
          3. lift-*.f64N/A

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \cdot z} + \left(y + x\right) \]
          5. lower-fma.f6499.2

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right), z, y + x\right)} \]
        10. Applied rewrites99.2%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right), z, x + y\right)} \]
        11. Taylor expanded in y around 0

          \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{24}, \frac{-1}{2}\right), 1\right), z, x + y\right) \]
        12. Step-by-step derivation
          1. Applied rewrites99.3%

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right) \]
        13. Recombined 2 regimes into one program.
        14. Final simplification80.6%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -0.22:\\ \;\;\;\;x + \sin y\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{+15}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + \sin y\\ \end{array} \]
        15. Add Preprocessing

        Alternative 8: 69.5% accurate, 3.0× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right), x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -1.16e+16)
           (+ x z)
           (if (<= y 3.1e-40)
             (+
              (fma y (fma y (* y -0.16666666666666666) 1.0) x)
              (*
               z
               (fma
                (* y y)
                (fma
                 (* y y)
                 (fma y (* y -0.001388888888888889) 0.041666666666666664)
                 -0.5)
                1.0)))
             (+ x z))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.16e+16) {
        		tmp = x + z;
        	} else if (y <= 3.1e-40) {
        		tmp = fma(y, fma(y, (y * -0.16666666666666666), 1.0), x) + (z * fma((y * y), fma((y * y), fma(y, (y * -0.001388888888888889), 0.041666666666666664), -0.5), 1.0));
        	} else {
        		tmp = x + z;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -1.16e+16)
        		tmp = Float64(x + z);
        	elseif (y <= 3.1e-40)
        		tmp = Float64(fma(y, fma(y, Float64(y * -0.16666666666666666), 1.0), x) + Float64(z * fma(Float64(y * y), fma(Float64(y * y), fma(y, Float64(y * -0.001388888888888889), 0.041666666666666664), -0.5), 1.0)));
        	else
        		tmp = Float64(x + z);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -1.16e+16], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.1e-40], N[(N[(y * N[(y * N[(y * -0.16666666666666666), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision] + N[(z * N[(N[(y * y), $MachinePrecision] * N[(N[(y * y), $MachinePrecision] * N[(y * N[(y * -0.001388888888888889), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] + -0.5), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\
        \;\;\;\;x + z\\
        
        \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\
        \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right), x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + z\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.16e16 or 3.10000000000000011e-40 < 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 \color{blue}{z + x} \]
            2. lower-+.f6445.1

              \[\leadsto \color{blue}{z + x} \]
          5. Applied rewrites45.1%

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

          if -1.16e16 < y < 3.10000000000000011e-40

          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}{\left(x + y\right)} + z \cdot \cos y \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\left(y + x\right)} + z \cdot \cos y \]
            2. lower-+.f6498.6

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

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

            \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

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

              \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right)} \]
            3. unpow2N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
            4. lower-*.f64N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
            5. sub-negN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{{y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, 1\right) \]
            6. metadata-evalN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \color{blue}{\frac{-1}{2}}, 1\right) \]
            7. lower-fma.f64N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right)}, 1\right) \]
            8. unpow2N/A

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right), 1\right) \]
            10. +-commutativeN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{-1}{720} \cdot {y}^{2} + \frac{1}{24}}, \frac{-1}{2}\right), 1\right) \]
            11. unpow2N/A

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

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \left(\frac{-1}{720} \cdot y\right)} + \frac{1}{24}, \frac{-1}{2}\right), 1\right) \]
            14. lower-fma.f64N/A

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{720}}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            16. lower-*.f6498.6

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, \color{blue}{y \cdot -0.001388888888888889}, 0.041666666666666664\right), -0.5\right), 1\right) \]
          8. Applied rewrites98.6%

            \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)} \]
          9. Taylor expanded in y around 0

            \[\leadsto \color{blue}{\left(x + y \cdot \left(1 + \frac{-1}{6} \cdot {y}^{2}\right)\right)} + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
          10. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\left(y \cdot \left(1 + \frac{-1}{6} \cdot {y}^{2}\right) + x\right)} + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            2. lower-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{\frac{-1}{6} \cdot {y}^{2} + 1}, x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            4. unpow2N/A

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

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

              \[\leadsto \mathsf{fma}\left(y, \color{blue}{y \cdot \left(\frac{-1}{6} \cdot y\right)} + 1, x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            7. lower-fma.f64N/A

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

              \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{6}}, 1\right), x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            9. lower-*.f6498.7

              \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{y \cdot -0.16666666666666666}, 1\right), x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right) \]
          11. Applied rewrites98.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right), x\right)} + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right) \]
        3. Recombined 2 regimes into one program.
        4. Final simplification71.1%

          \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, y \cdot -0.16666666666666666, 1\right), x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
        5. Add Preprocessing

        Alternative 9: 69.5% accurate, 4.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -400:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -400.0)
           (+ x z)
           (if (<= y 3.1e-40)
             (fma (fma y (* y (fma (* y y) 0.041666666666666664 -0.5)) 1.0) z (+ x y))
             (+ x z))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -400.0) {
        		tmp = x + z;
        	} else if (y <= 3.1e-40) {
        		tmp = fma(fma(y, (y * fma((y * y), 0.041666666666666664, -0.5)), 1.0), z, (x + y));
        	} else {
        		tmp = x + z;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -400.0)
        		tmp = Float64(x + z);
        	elseif (y <= 3.1e-40)
        		tmp = fma(fma(y, Float64(y * fma(Float64(y * y), 0.041666666666666664, -0.5)), 1.0), z, Float64(x + y));
        	else
        		tmp = Float64(x + z);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -400.0], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.1e-40], N[(N[(y * N[(y * N[(N[(y * y), $MachinePrecision] * 0.041666666666666664 + -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] * z + N[(x + y), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -400:\\
        \;\;\;\;x + z\\
        
        \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\
        \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x + z\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -400 or 3.10000000000000011e-40 < 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 \color{blue}{z + x} \]
            2. lower-+.f6444.8

              \[\leadsto \color{blue}{z + x} \]
          5. Applied rewrites44.8%

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

          if -400 < y < 3.10000000000000011e-40

          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}{\left(x + y\right)} + z \cdot \cos y \]
          4. Step-by-step derivation
            1. +-commutativeN/A

              \[\leadsto \color{blue}{\left(y + x\right)} + z \cdot \cos y \]
            2. lower-+.f6499.4

              \[\leadsto \color{blue}{\left(y + x\right)} + z \cdot \cos y \]
          5. Applied rewrites99.4%

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

            \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\left(1 + {y}^{2} \cdot \left({y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}\right)\right)} \]
          7. Step-by-step derivation
            1. +-commutativeN/A

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

              \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left({y}^{2}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right)} \]
            3. unpow2N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
            4. lower-*.f64N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(\color{blue}{y \cdot y}, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) - \frac{1}{2}, 1\right) \]
            5. sub-negN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{{y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \left(\mathsf{neg}\left(\frac{1}{2}\right)\right)}, 1\right) \]
            6. metadata-evalN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, {y}^{2} \cdot \left(\frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}\right) + \color{blue}{\frac{-1}{2}}, 1\right) \]
            7. lower-fma.f64N/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \color{blue}{\mathsf{fma}\left({y}^{2}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right)}, 1\right) \]
            8. unpow2N/A

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(\color{blue}{y \cdot y}, \frac{1}{24} + \frac{-1}{720} \cdot {y}^{2}, \frac{-1}{2}\right), 1\right) \]
            10. +-commutativeN/A

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{\frac{-1}{720} \cdot {y}^{2} + \frac{1}{24}}, \frac{-1}{2}\right), 1\right) \]
            11. unpow2N/A

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

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \color{blue}{y \cdot \left(\frac{-1}{720} \cdot y\right)} + \frac{1}{24}, \frac{-1}{2}\right), 1\right) \]
            14. lower-fma.f64N/A

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

              \[\leadsto \left(y + x\right) + z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, \color{blue}{y \cdot \frac{-1}{720}}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \]
            16. lower-*.f6499.4

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

            \[\leadsto \left(y + x\right) + z \cdot \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right)} \]
          9. Step-by-step derivation
            1. lift-+.f64N/A

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

              \[\leadsto \color{blue}{z \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) + \left(y + x\right)} \]
            3. lift-*.f64N/A

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

              \[\leadsto \color{blue}{\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot \frac{-1}{720}, \frac{1}{24}\right), \frac{-1}{2}\right), 1\right) \cdot z} + \left(y + x\right) \]
            5. lower-fma.f6499.4

              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y, y \cdot -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right), z, y + x\right)} \]
          10. Applied rewrites99.4%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \mathsf{fma}\left(y \cdot y, -0.001388888888888889, 0.041666666666666664\right), -0.5\right), 1\right), z, x + y\right)} \]
          11. Taylor expanded in y around 0

            \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, \frac{1}{24}, \frac{-1}{2}\right), 1\right), z, x + y\right) \]
          12. Step-by-step derivation
            1. Applied rewrites99.4%

              \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right) \]
          13. Recombined 2 regimes into one program.
          14. Final simplification71.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -400:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(y, y \cdot \mathsf{fma}\left(y \cdot y, 0.041666666666666664, -0.5\right), 1\right), z, x + y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
          15. Add Preprocessing

          Alternative 10: 69.5% accurate, 5.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.16666666666666666, z \cdot -0.5\right), 1\right), x + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= y -1.16e+16)
             (+ x z)
             (if (<= y 3.1e-40)
               (fma y (fma y (fma y -0.16666666666666666 (* z -0.5)) 1.0) (+ x z))
               (+ x z))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (y <= -1.16e+16) {
          		tmp = x + z;
          	} else if (y <= 3.1e-40) {
          		tmp = fma(y, fma(y, fma(y, -0.16666666666666666, (z * -0.5)), 1.0), (x + z));
          	} else {
          		tmp = x + z;
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if (y <= -1.16e+16)
          		tmp = Float64(x + z);
          	elseif (y <= 3.1e-40)
          		tmp = fma(y, fma(y, fma(y, -0.16666666666666666, Float64(z * -0.5)), 1.0), Float64(x + z));
          	else
          		tmp = Float64(x + z);
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[LessEqual[y, -1.16e+16], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.1e-40], N[(y * N[(y * N[(y * -0.16666666666666666 + N[(z * -0.5), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision] + N[(x + z), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\
          \;\;\;\;x + z\\
          
          \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\
          \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.16666666666666666, z \cdot -0.5\right), 1\right), x + z\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x + z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.16e16 or 3.10000000000000011e-40 < 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 \color{blue}{z + x} \]
              2. lower-+.f6445.1

                \[\leadsto \color{blue}{z + x} \]
            5. Applied rewrites45.1%

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

            if -1.16e16 < y < 3.10000000000000011e-40

            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 + y \cdot \left(\frac{-1}{2} \cdot z + \frac{-1}{6} \cdot y\right)\right)\right)} \]
            4. Step-by-step derivation
              1. associate-+r+N/A

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \color{blue}{y \cdot \left(\frac{-1}{2} \cdot z + \frac{-1}{6} \cdot y\right) + 1}, x + z\right) \]
              5. lower-fma.f64N/A

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, \frac{-1}{6}, z \cdot \frac{-1}{2}\right), 1\right), \color{blue}{z + x}\right) \]
              12. lower-+.f6498.5

                \[\leadsto \mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.16666666666666666, z \cdot -0.5\right), 1\right), \color{blue}{z + x}\right) \]
            5. Applied rewrites98.5%

              \[\leadsto \color{blue}{\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.16666666666666666, z \cdot -0.5\right), 1\right), z + x\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification71.0%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.16 \cdot 10^{+16}:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;\mathsf{fma}\left(y, \mathsf{fma}\left(y, \mathsf{fma}\left(y, -0.16666666666666666, z \cdot -0.5\right), 1\right), x + z\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
          5. Add Preprocessing

          Alternative 11: 69.5% accurate, 6.4× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -680:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;z + \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot -0.5, 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= y -680.0)
             (+ x z)
             (if (<= y 3.1e-40) (+ z (fma y (fma y (* z -0.5) 1.0) x)) (+ x z))))
          double code(double x, double y, double z) {
          	double tmp;
          	if (y <= -680.0) {
          		tmp = x + z;
          	} else if (y <= 3.1e-40) {
          		tmp = z + fma(y, fma(y, (z * -0.5), 1.0), x);
          	} else {
          		tmp = x + z;
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if (y <= -680.0)
          		tmp = Float64(x + z);
          	elseif (y <= 3.1e-40)
          		tmp = Float64(z + fma(y, fma(y, Float64(z * -0.5), 1.0), x));
          	else
          		tmp = Float64(x + z);
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[LessEqual[y, -680.0], N[(x + z), $MachinePrecision], If[LessEqual[y, 3.1e-40], N[(z + N[(y * N[(y * N[(z * -0.5), $MachinePrecision] + 1.0), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -680:\\
          \;\;\;\;x + z\\
          
          \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\
          \;\;\;\;z + \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot -0.5, 1\right), x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;x + z\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -680 or 3.10000000000000011e-40 < 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 \color{blue}{z + x} \]
              2. lower-+.f6444.8

                \[\leadsto \color{blue}{z + x} \]
            5. Applied rewrites44.8%

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

            if -680 < y < 3.10000000000000011e-40

            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 \color{blue}{\left(x + z\right) + y \cdot \left(1 + \frac{-1}{2} \cdot \left(y \cdot z\right)\right)} \]
              2. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto z + \mathsf{fma}\left(y, \mathsf{fma}\left(y, \color{blue}{z \cdot \frac{-1}{2}}, 1\right), x\right) \]
              13. lower-*.f6499.2

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

              \[\leadsto \color{blue}{z + \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot -0.5, 1\right), x\right)} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification70.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -680:\\ \;\;\;\;x + z\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-40}:\\ \;\;\;\;z + \mathsf{fma}\left(y, \mathsf{fma}\left(y, z \cdot -0.5, 1\right), x\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \]
          5. Add Preprocessing

          Alternative 12: 48.2% accurate, 13.2× speedup?

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

            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 \color{blue}{\left(y + z\right) + x} \]
              2. associate-+l+N/A

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

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

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

                \[\leadsto y + \color{blue}{\left(z + x\right)} \]
              6. lower-+.f6467.2

                \[\leadsto y + \color{blue}{\left(z + x\right)} \]
            5. Applied rewrites67.2%

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

              \[\leadsto x + \color{blue}{y} \]
            7. Step-by-step derivation
              1. Applied rewrites57.9%

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

              if -1.60000000000000008e150 < x < 9.4000000000000001e-63

              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. +-commutativeN/A

                  \[\leadsto \color{blue}{z \cdot \cos y + \sin y} \]
                2. lower-fma.f64N/A

                  \[\leadsto \color{blue}{\mathsf{fma}\left(z, \cos y, \sin y\right)} \]
                3. lower-cos.f64N/A

                  \[\leadsto \mathsf{fma}\left(z, \color{blue}{\cos y}, \sin y\right) \]
                4. lower-sin.f6486.5

                  \[\leadsto \mathsf{fma}\left(z, \cos y, \color{blue}{\sin y}\right) \]
              5. Applied rewrites86.5%

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

                \[\leadsto y + \color{blue}{z} \]
              7. Step-by-step derivation
                1. Applied rewrites47.4%

                  \[\leadsto z + \color{blue}{y} \]
              8. Recombined 2 regimes into one program.
              9. Final simplification51.9%

                \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.6 \cdot 10^{+150}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;x \leq 9.4 \cdot 10^{-63}:\\ \;\;\;\;y + z\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
              10. Add Preprocessing

              Alternative 13: 66.2% accurate, 53.0× speedup?

              \[\begin{array}{l} \\ x + z \end{array} \]
              (FPCore (x y z) :precision binary64 (+ x z))
              double code(double x, double y, double z) {
              	return x + 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 + z
              end function
              
              public static double code(double x, double y, double z) {
              	return x + z;
              }
              
              def code(x, y, z):
              	return x + z
              
              function code(x, y, z)
              	return Float64(x + z)
              end
              
              function tmp = code(x, y, z)
              	tmp = x + z;
              end
              
              code[x_, y_, z_] := N[(x + z), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x + z
              \end{array}
              
              Derivation
              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 \color{blue}{z + x} \]
                2. lower-+.f6465.6

                  \[\leadsto \color{blue}{z + x} \]
              5. Applied rewrites65.6%

                \[\leadsto \color{blue}{z + x} \]
              6. Final simplification65.6%

                \[\leadsto x + z \]
              7. Add Preprocessing

              Alternative 14: 37.4% accurate, 53.0× speedup?

              \[\begin{array}{l} \\ x + y \end{array} \]
              (FPCore (x y z) :precision binary64 (+ x y))
              double code(double x, double y, double z) {
              	return 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 + y
              end function
              
              public static double code(double x, double y, double z) {
              	return x + y;
              }
              
              def code(x, y, z):
              	return x + y
              
              function code(x, y, z)
              	return Float64(x + y)
              end
              
              function tmp = code(x, y, z)
              	tmp = x + y;
              end
              
              code[x_, y_, z_] := N[(x + y), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x + y
              \end{array}
              
              Derivation
              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 + \left(y + z\right)} \]
              4. Step-by-step derivation
                1. +-commutativeN/A

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

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

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

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

                  \[\leadsto y + \color{blue}{\left(z + x\right)} \]
                6. lower-+.f6461.4

                  \[\leadsto y + \color{blue}{\left(z + x\right)} \]
              5. Applied rewrites61.4%

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

                \[\leadsto x + \color{blue}{y} \]
              7. Step-by-step derivation
                1. Applied rewrites36.4%

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

                Reproduce

                ?
                herbie shell --seed 2024221 
                (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))))