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

Percentage Accurate: 99.9% → 99.9%
Time: 8.5s
Alternatives: 12
Speedup: 1.0×

Specification

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

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

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

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

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

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

Alternative 2: 98.7% accurate, 0.3× speedup?

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

\\
\begin{array}{l}
t_0 := \sin y \cdot z\\
t_1 := \left(\cos y + x\right) - t\_0\\
t_2 := \left(1 + x\right) - t\_0\\
\mathbf{if}\;t\_1 \leq -1000:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0.998:\\
\;\;\;\;\cos y - t\_0\\

\mathbf{else}:\\
\;\;\;\;t\_2\\


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

    1. Initial program 99.9%

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

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

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

      if -1e3 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.998

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{\cos y} - z \cdot \sin y \]
      4. Step-by-step derivation
        1. lower-cos.f6498.4

          \[\leadsto \color{blue}{\cos y} - z \cdot \sin y \]
      5. Applied rewrites98.4%

        \[\leadsto \color{blue}{\cos y} - z \cdot \sin y \]
    5. Recombined 2 regimes into one program.
    6. Final simplification99.6%

      \[\leadsto \begin{array}{l} \mathbf{if}\;\left(\cos y + x\right) - \sin y \cdot z \leq -1000:\\ \;\;\;\;\left(1 + x\right) - \sin y \cdot z\\ \mathbf{elif}\;\left(\cos y + x\right) - \sin y \cdot z \leq 0.998:\\ \;\;\;\;\cos y - \sin y \cdot z\\ \mathbf{else}:\\ \;\;\;\;\left(1 + x\right) - \sin y \cdot z\\ \end{array} \]
    7. Add Preprocessing

    Alternative 3: 98.4% accurate, 0.4× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos y + x\\ t_1 := t\_0 - \sin y \cdot z\\ t_2 := \mathsf{fma}\left(-\sin y, z, x\right)\\ \mathbf{if}\;t\_1 \leq -2000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2:\\ \;\;\;\;t\_0\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z)
     :precision binary64
     (let* ((t_0 (+ (cos y) x))
            (t_1 (- t_0 (* (sin y) z)))
            (t_2 (fma (- (sin y)) z x)))
       (if (<= t_1 -2000000000.0) t_2 (if (<= t_1 2.0) t_0 t_2))))
    double code(double x, double y, double z) {
    	double t_0 = cos(y) + x;
    	double t_1 = t_0 - (sin(y) * z);
    	double t_2 = fma(-sin(y), z, x);
    	double tmp;
    	if (t_1 <= -2000000000.0) {
    		tmp = t_2;
    	} else if (t_1 <= 2.0) {
    		tmp = t_0;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z)
    	t_0 = Float64(cos(y) + x)
    	t_1 = Float64(t_0 - Float64(sin(y) * z))
    	t_2 = fma(Float64(-sin(y)), z, x)
    	tmp = 0.0
    	if (t_1 <= -2000000000.0)
    		tmp = t_2;
    	elseif (t_1 <= 2.0)
    		tmp = t_0;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_] := Block[{t$95$0 = N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$1 = N[(t$95$0 - N[(N[Sin[y], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[((-N[Sin[y], $MachinePrecision]) * z + x), $MachinePrecision]}, If[LessEqual[t$95$1, -2000000000.0], t$95$2, If[LessEqual[t$95$1, 2.0], t$95$0, t$95$2]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_0 := \cos y + x\\
    t_1 := t\_0 - \sin y \cdot z\\
    t_2 := \mathsf{fma}\left(-\sin y, z, x\right)\\
    \mathbf{if}\;t\_1 \leq -2000000000:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq 2:\\
    \;\;\;\;t\_0\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -2e9 or 2 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y)))

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

            \[\leadsto \left(\frac{\cos y}{z} - \sin y\right) \cdot z + \color{blue}{\frac{x}{1} \cdot \frac{z}{z}} \]
          7. /-rgt-identityN/A

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(-1 \cdot \sin y, z, x\right) \]
        6. Step-by-step derivation
          1. Applied rewrites99.5%

            \[\leadsto \mathsf{fma}\left(-\sin y, z, x\right) \]

          if -2e9 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 2

          1. Initial program 100.0%

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

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

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

              \[\leadsto \color{blue}{\cos y + x} \]
            3. lower-cos.f6497.8

              \[\leadsto \color{blue}{\cos y} + x \]
          5. Applied rewrites97.8%

            \[\leadsto \color{blue}{\cos y + x} \]
        7. Recombined 2 regimes into one program.
        8. Final simplification99.0%

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

        Alternative 4: 74.9% accurate, 0.4× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(\cos y + x\right) - \sin y \cdot z\\ t_1 := x - \mathsf{fma}\left(z, y, -1\right)\\ \mathbf{if}\;t\_0 \leq -1000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_0 \leq 0.998:\\ \;\;\;\;\cos y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (- (+ (cos y) x) (* (sin y) z))) (t_1 (- x (fma z y -1.0))))
           (if (<= t_0 -1000.0) t_1 (if (<= t_0 0.998) (cos y) t_1))))
        double code(double x, double y, double z) {
        	double t_0 = (cos(y) + x) - (sin(y) * z);
        	double t_1 = x - fma(z, y, -1.0);
        	double tmp;
        	if (t_0 <= -1000.0) {
        		tmp = t_1;
        	} else if (t_0 <= 0.998) {
        		tmp = cos(y);
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	t_0 = Float64(Float64(cos(y) + x) - Float64(sin(y) * z))
        	t_1 = Float64(x - fma(z, y, -1.0))
        	tmp = 0.0
        	if (t_0 <= -1000.0)
        		tmp = t_1;
        	elseif (t_0 <= 0.998)
        		tmp = cos(y);
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[(N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision] - N[(N[Sin[y], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(x - N[(z * y + -1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -1000.0], t$95$1, If[LessEqual[t$95$0, 0.998], N[Cos[y], $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \left(\cos y + x\right) - \sin y \cdot z\\
        t_1 := x - \mathsf{fma}\left(z, y, -1\right)\\
        \mathbf{if}\;t\_0 \leq -1000:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_0 \leq 0.998:\\
        \;\;\;\;\cos y\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -1e3 or 0.998 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y)))

          1. Initial program 99.9%

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

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

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

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

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

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

              \[\leadsto \color{blue}{x - \left(y \cdot z - 1\right)} \]
            6. sub-negN/A

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

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

              \[\leadsto x - \left(z \cdot y + \color{blue}{-1}\right) \]
            9. lower-fma.f6466.7

              \[\leadsto x - \color{blue}{\mathsf{fma}\left(z, y, -1\right)} \]
          5. Applied rewrites66.7%

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

          if -1e3 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.998

          1. Initial program 99.9%

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

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

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

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

              \[\leadsto \color{blue}{\cos y} + x \]
          5. Applied rewrites97.5%

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

            \[\leadsto \cos y \]
          7. Step-by-step derivation
            1. Applied rewrites95.9%

              \[\leadsto \cos y \]
          8. Recombined 2 regimes into one program.
          9. Final simplification70.7%

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

          Alternative 5: 99.0% accurate, 1.7× speedup?

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

            1. Initial program 99.9%

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

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

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

              if -5.5e13 < z < 1.8e-25

              1. Initial program 100.0%

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

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

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

                  \[\leadsto \color{blue}{\cos y + x} \]
                3. lower-cos.f64100.0

                  \[\leadsto \color{blue}{\cos y} + x \]
              5. Applied rewrites100.0%

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

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

            Alternative 6: 82.4% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(-z\right) \cdot \sin y\\ \mathbf{if}\;z \leq -7.5 \cdot 10^{+135}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 8.8 \cdot 10^{+92}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (let* ((t_0 (* (- z) (sin y))))
               (if (<= z -7.5e+135) t_0 (if (<= z 8.8e+92) (+ (cos y) x) t_0))))
            double code(double x, double y, double z) {
            	double t_0 = -z * sin(y);
            	double tmp;
            	if (z <= -7.5e+135) {
            		tmp = t_0;
            	} else if (z <= 8.8e+92) {
            		tmp = cos(y) + x;
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: t_0
                real(8) :: tmp
                t_0 = -z * sin(y)
                if (z <= (-7.5d+135)) then
                    tmp = t_0
                else if (z <= 8.8d+92) then
                    tmp = cos(y) + x
                else
                    tmp = t_0
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double t_0 = -z * Math.sin(y);
            	double tmp;
            	if (z <= -7.5e+135) {
            		tmp = t_0;
            	} else if (z <= 8.8e+92) {
            		tmp = Math.cos(y) + x;
            	} else {
            		tmp = t_0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	t_0 = -z * math.sin(y)
            	tmp = 0
            	if z <= -7.5e+135:
            		tmp = t_0
            	elif z <= 8.8e+92:
            		tmp = math.cos(y) + x
            	else:
            		tmp = t_0
            	return tmp
            
            function code(x, y, z)
            	t_0 = Float64(Float64(-z) * sin(y))
            	tmp = 0.0
            	if (z <= -7.5e+135)
            		tmp = t_0;
            	elseif (z <= 8.8e+92)
            		tmp = Float64(cos(y) + x);
            	else
            		tmp = t_0;
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	t_0 = -z * sin(y);
            	tmp = 0.0;
            	if (z <= -7.5e+135)
            		tmp = t_0;
            	elseif (z <= 8.8e+92)
            		tmp = cos(y) + x;
            	else
            		tmp = t_0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := Block[{t$95$0 = N[((-z) * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -7.5e+135], t$95$0, If[LessEqual[z, 8.8e+92], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], t$95$0]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            t_0 := \left(-z\right) \cdot \sin y\\
            \mathbf{if}\;z \leq -7.5 \cdot 10^{+135}:\\
            \;\;\;\;t\_0\\
            
            \mathbf{elif}\;z \leq 8.8 \cdot 10^{+92}:\\
            \;\;\;\;\cos y + x\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_0\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -7.49999999999999947e135 or 8.79999999999999969e92 < z

              1. Initial program 99.9%

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(-z\right)} \cdot \sin y \]
                5. lower-sin.f6471.6

                  \[\leadsto \left(-z\right) \cdot \color{blue}{\sin y} \]
              5. Applied rewrites71.6%

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

              if -7.49999999999999947e135 < z < 8.79999999999999969e92

              1. Initial program 99.9%

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

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

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

                  \[\leadsto \color{blue}{\cos y + x} \]
                3. lower-cos.f6487.8

                  \[\leadsto \color{blue}{\cos y} + x \]
              5. Applied rewrites87.8%

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

            Alternative 7: 81.4% accurate, 1.8× speedup?

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

              1. Initial program 99.9%

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

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

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

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

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

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

              if -1.7e19 < y < 0.19500000000000001

              1. Initial program 100.0%

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

                \[\leadsto \left(x + \color{blue}{1}\right) - z \cdot \sin y \]
              4. Step-by-step derivation
                1. Applied rewrites100.0%

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

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

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

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

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

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

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

                    \[\leadsto \left(\frac{\cos y}{z} - \sin y\right) \cdot z + \color{blue}{\frac{x}{1} \cdot \frac{z}{z}} \]
                  7. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right) \cdot z, y, 1 + x\right) \]
                10. Recombined 2 regimes into one program.
                11. Add Preprocessing

                Alternative 8: 70.4% accurate, 5.2× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6.5 \cdot 10^{+24}:\\ \;\;\;\;1 + x\\ \mathbf{elif}\;y \leq 5.5 \cdot 10^{+27}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z \cdot y, -0.5\right) \cdot y - z, y, 1 + x\right)\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= y -6.5e+24)
                   (+ 1.0 x)
                   (if (<= y 5.5e+27)
                     (fma (- (* (fma 0.16666666666666666 (* z y) -0.5) y) z) y (+ 1.0 x))
                     (+ 1.0 x))))
                double code(double x, double y, double z) {
                	double tmp;
                	if (y <= -6.5e+24) {
                		tmp = 1.0 + x;
                	} else if (y <= 5.5e+27) {
                		tmp = fma(((fma(0.16666666666666666, (z * y), -0.5) * y) - z), y, (1.0 + x));
                	} else {
                		tmp = 1.0 + x;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	tmp = 0.0
                	if (y <= -6.5e+24)
                		tmp = Float64(1.0 + x);
                	elseif (y <= 5.5e+27)
                		tmp = fma(Float64(Float64(fma(0.16666666666666666, Float64(z * y), -0.5) * y) - z), y, Float64(1.0 + x));
                	else
                		tmp = Float64(1.0 + x);
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := If[LessEqual[y, -6.5e+24], N[(1.0 + x), $MachinePrecision], If[LessEqual[y, 5.5e+27], N[(N[(N[(N[(0.16666666666666666 * N[(z * y), $MachinePrecision] + -0.5), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision] * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -6.5 \cdot 10^{+24}:\\
                \;\;\;\;1 + x\\
                
                \mathbf{elif}\;y \leq 5.5 \cdot 10^{+27}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z \cdot y, -0.5\right) \cdot y - z, y, 1 + x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;1 + x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -6.4999999999999996e24 or 5.49999999999999966e27 < y

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{1 + x} \]
                  4. Step-by-step derivation
                    1. lower-+.f6440.2

                      \[\leadsto \color{blue}{1 + x} \]
                  5. Applied rewrites40.2%

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

                  if -6.4999999999999996e24 < y < 5.49999999999999966e27

                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 9: 70.5% accurate, 5.6× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.2 \cdot 10^{+24}:\\ \;\;\;\;1 + x\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+16}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right) \cdot z, y, 1 + x\right)\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
                (FPCore (x y z)
                 :precision binary64
                 (if (<= y -3.2e+24)
                   (+ 1.0 x)
                   (if (<= y 4.3e+16)
                     (fma (* (fma 0.16666666666666666 (* y y) -1.0) z) y (+ 1.0 x))
                     (+ 1.0 x))))
                double code(double x, double y, double z) {
                	double tmp;
                	if (y <= -3.2e+24) {
                		tmp = 1.0 + x;
                	} else if (y <= 4.3e+16) {
                		tmp = fma((fma(0.16666666666666666, (y * y), -1.0) * z), y, (1.0 + x));
                	} else {
                		tmp = 1.0 + x;
                	}
                	return tmp;
                }
                
                function code(x, y, z)
                	tmp = 0.0
                	if (y <= -3.2e+24)
                		tmp = Float64(1.0 + x);
                	elseif (y <= 4.3e+16)
                		tmp = fma(Float64(fma(0.16666666666666666, Float64(y * y), -1.0) * z), y, Float64(1.0 + x));
                	else
                		tmp = Float64(1.0 + x);
                	end
                	return tmp
                end
                
                code[x_, y_, z_] := If[LessEqual[y, -3.2e+24], N[(1.0 + x), $MachinePrecision], If[LessEqual[y, 4.3e+16], N[(N[(N[(0.16666666666666666 * N[(y * y), $MachinePrecision] + -1.0), $MachinePrecision] * z), $MachinePrecision] * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;y \leq -3.2 \cdot 10^{+24}:\\
                \;\;\;\;1 + x\\
                
                \mathbf{elif}\;y \leq 4.3 \cdot 10^{+16}:\\
                \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right) \cdot z, y, 1 + x\right)\\
                
                \mathbf{else}:\\
                \;\;\;\;1 + x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if y < -3.1999999999999997e24 or 4.3e16 < y

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{1 + x} \]
                  4. Step-by-step derivation
                    1. lower-+.f6439.7

                      \[\leadsto \color{blue}{1 + x} \]
                  5. Applied rewrites39.7%

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

                  if -3.1999999999999997e24 < y < 4.3e16

                  1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \left(\frac{\cos y}{z} - \sin y\right) \cdot z + \color{blue}{\frac{x}{1} \cdot \frac{z}{z}} \]
                      7. /-rgt-identityN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(z \cdot \left(\frac{1}{6} \cdot {y}^{2} - 1\right), y, 1 + x\right) \]
                    9. Step-by-step derivation
                      1. Applied rewrites96.8%

                        \[\leadsto \mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, y \cdot y, -1\right) \cdot z, y, 1 + x\right) \]
                    10. Recombined 2 regimes into one program.
                    11. Add Preprocessing

                    Alternative 10: 69.6% accurate, 9.6× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+152}:\\ \;\;\;\;1 + x\\ \mathbf{elif}\;y \leq 4 \cdot 10^{+22}:\\ \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
                    (FPCore (x y z)
                     :precision binary64
                     (if (<= y -1.1e+152)
                       (+ 1.0 x)
                       (if (<= y 4e+22) (- x (fma z y -1.0)) (+ 1.0 x))))
                    double code(double x, double y, double z) {
                    	double tmp;
                    	if (y <= -1.1e+152) {
                    		tmp = 1.0 + x;
                    	} else if (y <= 4e+22) {
                    		tmp = x - fma(z, y, -1.0);
                    	} else {
                    		tmp = 1.0 + x;
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z)
                    	tmp = 0.0
                    	if (y <= -1.1e+152)
                    		tmp = Float64(1.0 + x);
                    	elseif (y <= 4e+22)
                    		tmp = Float64(x - fma(z, y, -1.0));
                    	else
                    		tmp = Float64(1.0 + x);
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_] := If[LessEqual[y, -1.1e+152], N[(1.0 + x), $MachinePrecision], If[LessEqual[y, 4e+22], N[(x - N[(z * y + -1.0), $MachinePrecision]), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    \mathbf{if}\;y \leq -1.1 \cdot 10^{+152}:\\
                    \;\;\;\;1 + x\\
                    
                    \mathbf{elif}\;y \leq 4 \cdot 10^{+22}:\\
                    \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;1 + x\\
                    
                    
                    \end{array}
                    \end{array}
                    
                    Derivation
                    1. Split input into 2 regimes
                    2. if y < -1.0999999999999999e152 or 4e22 < y

                      1. Initial program 99.9%

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

                        \[\leadsto \color{blue}{1 + x} \]
                      4. Step-by-step derivation
                        1. lower-+.f6439.5

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

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

                      if -1.0999999999999999e152 < y < 4e22

                      1. Initial program 100.0%

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

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

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

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

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

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

                          \[\leadsto \color{blue}{x - \left(y \cdot z - 1\right)} \]
                        6. sub-negN/A

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

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

                          \[\leadsto x - \left(z \cdot y + \color{blue}{-1}\right) \]
                        9. lower-fma.f6488.7

                          \[\leadsto x - \color{blue}{\mathsf{fma}\left(z, y, -1\right)} \]
                      5. Applied rewrites88.7%

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

                    Alternative 11: 62.5% accurate, 53.0× speedup?

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

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

                      \[\leadsto \color{blue}{1 + x} \]
                    4. Step-by-step derivation
                      1. lower-+.f6456.6

                        \[\leadsto \color{blue}{1 + x} \]
                    5. Applied rewrites56.6%

                      \[\leadsto \color{blue}{1 + x} \]
                    6. Add Preprocessing

                    Alternative 12: 22.2% accurate, 212.0× speedup?

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

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

                      \[\leadsto \color{blue}{1 + x} \]
                    4. Step-by-step derivation
                      1. lower-+.f6456.6

                        \[\leadsto \color{blue}{1 + x} \]
                    5. Applied rewrites56.6%

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

                      \[\leadsto 1 \]
                    7. Step-by-step derivation
                      1. Applied rewrites19.5%

                        \[\leadsto 1 \]
                      2. Add Preprocessing

                      Reproduce

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