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

Percentage Accurate: 99.9% → 99.9%
Time: 9.8s
Alternatives: 13
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 13 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(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}
Derivation
  1. Initial program 99.9%

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

Alternative 2: 99.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := z \cdot \sin y\\ t_1 := \left(x + \cos y\right) - t\_0\\ \mathbf{if}\;t\_1 \leq -1000000 \lor \neg \left(t\_1 \leq 0.999999999999999\right):\\ \;\;\;\;\left(x + 1\right) - t\_0\\ \mathbf{else}:\\ \;\;\;\;\cos y + x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* z (sin y))) (t_1 (- (+ x (cos y)) t_0)))
   (if (or (<= t_1 -1000000.0) (not (<= t_1 0.999999999999999)))
     (- (+ x 1.0) t_0)
     (+ (cos y) x))))
double code(double x, double y, double z) {
	double t_0 = z * sin(y);
	double t_1 = (x + cos(y)) - t_0;
	double tmp;
	if ((t_1 <= -1000000.0) || !(t_1 <= 0.999999999999999)) {
		tmp = (x + 1.0) - t_0;
	} else {
		tmp = cos(y) + x;
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = z * sin(y)
    t_1 = (x + cos(y)) - t_0
    if ((t_1 <= (-1000000.0d0)) .or. (.not. (t_1 <= 0.999999999999999d0))) then
        tmp = (x + 1.0d0) - t_0
    else
        tmp = cos(y) + x
    end if
    code = tmp
end function
public static double code(double x, double y, double z) {
	double t_0 = z * Math.sin(y);
	double t_1 = (x + Math.cos(y)) - t_0;
	double tmp;
	if ((t_1 <= -1000000.0) || !(t_1 <= 0.999999999999999)) {
		tmp = (x + 1.0) - t_0;
	} else {
		tmp = Math.cos(y) + x;
	}
	return tmp;
}
def code(x, y, z):
	t_0 = z * math.sin(y)
	t_1 = (x + math.cos(y)) - t_0
	tmp = 0
	if (t_1 <= -1000000.0) or not (t_1 <= 0.999999999999999):
		tmp = (x + 1.0) - t_0
	else:
		tmp = math.cos(y) + x
	return tmp
function code(x, y, z)
	t_0 = Float64(z * sin(y))
	t_1 = Float64(Float64(x + cos(y)) - t_0)
	tmp = 0.0
	if ((t_1 <= -1000000.0) || !(t_1 <= 0.999999999999999))
		tmp = Float64(Float64(x + 1.0) - t_0);
	else
		tmp = Float64(cos(y) + x);
	end
	return tmp
end
function tmp_2 = code(x, y, z)
	t_0 = z * sin(y);
	t_1 = (x + cos(y)) - t_0;
	tmp = 0.0;
	if ((t_1 <= -1000000.0) || ~((t_1 <= 0.999999999999999)))
		tmp = (x + 1.0) - t_0;
	else
		tmp = cos(y) + x;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_] := Block[{t$95$0 = N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(N[(x + N[Cos[y], $MachinePrecision]), $MachinePrecision] - t$95$0), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1000000.0], N[Not[LessEqual[t$95$1, 0.999999999999999]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\cos y + x\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -1e6 or 0.999999999999999001 < (-.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.6%

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

      if -1e6 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.999999999999999001

      1. Initial program 100.0%

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \cos y} \]
      6. 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.f6496.6

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

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

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

    Alternative 3: 72.9% accurate, 0.4× speedup?

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

      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. associate-+r+N/A

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\color{blue}{-z}, y, 1 + x\right) \]
        8. lower-+.f6465.5

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

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

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

      1. Initial program 100.0%

        \[\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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 1 + \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
      7. Step-by-step derivation
        1. Applied rewrites10.2%

          \[\leadsto \mathsf{fma}\left(-z, \color{blue}{y}, 1\right) \]
        2. Taylor expanded in y around inf

          \[\leadsto -1 \cdot \left(y \cdot \color{blue}{z}\right) \]
        3. Step-by-step derivation
          1. Applied rewrites4.5%

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

            \[\leadsto \cos y \]
          3. Step-by-step derivation
            1. Applied rewrites96.0%

              \[\leadsto \cos y \]

            if 0.999999999999999001 < (-.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 + x} \]
            4. Step-by-step derivation
              1. lower-+.f6475.0

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

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

          Alternative 4: 98.7% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 2.6 \cdot 10^{-32}\right):\\ \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \sin y, \cos y\right)\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (or (<= x -0.38) (not (<= x 2.6e-32)))
             (- (+ x 1.0) (* z (sin y)))
             (fma (- z) (sin y) (cos y))))
          double code(double x, double y, double z) {
          	double tmp;
          	if ((x <= -0.38) || !(x <= 2.6e-32)) {
          		tmp = (x + 1.0) - (z * sin(y));
          	} else {
          		tmp = fma(-z, sin(y), cos(y));
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if ((x <= -0.38) || !(x <= 2.6e-32))
          		tmp = Float64(Float64(x + 1.0) - Float64(z * sin(y)));
          	else
          		tmp = fma(Float64(-z), sin(y), cos(y));
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[Or[LessEqual[x, -0.38], N[Not[LessEqual[x, 2.6e-32]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] - N[(z * N[Sin[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[((-z) * N[Sin[y], $MachinePrecision] + N[Cos[y], $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 2.6 \cdot 10^{-32}\right):\\
          \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(-z, \sin y, \cos y\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if x < -0.38 or 2.5999999999999997e-32 < x

            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 \]

              if -0.38 < x < 2.5999999999999997e-32

              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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(-z, \sin y, \cos y\right)} \]
            5. Recombined 2 regimes into one program.
            6. Final simplification99.7%

              \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.38 \lor \neg \left(x \leq 2.6 \cdot 10^{-32}\right):\\ \;\;\;\;\left(x + 1\right) - z \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, \sin y, \cos y\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 5: 82.0% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+102} \lor \neg \left(z \leq 7 \cdot 10^{+141}\right):\\ \;\;\;\;\left(-z\right) \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;\cos y + x\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (or (<= z -1.85e+102) (not (<= z 7e+141)))
               (* (- z) (sin y))
               (+ (cos y) x)))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((z <= -1.85e+102) || !(z <= 7e+141)) {
            		tmp = -z * sin(y);
            	} else {
            		tmp = cos(y) + x;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: tmp
                if ((z <= (-1.85d+102)) .or. (.not. (z <= 7d+141))) then
                    tmp = -z * sin(y)
                else
                    tmp = cos(y) + x
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if ((z <= -1.85e+102) || !(z <= 7e+141)) {
            		tmp = -z * Math.sin(y);
            	} else {
            		tmp = Math.cos(y) + x;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if (z <= -1.85e+102) or not (z <= 7e+141):
            		tmp = -z * math.sin(y)
            	else:
            		tmp = math.cos(y) + x
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if ((z <= -1.85e+102) || !(z <= 7e+141))
            		tmp = Float64(Float64(-z) * sin(y));
            	else
            		tmp = Float64(cos(y) + x);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if ((z <= -1.85e+102) || ~((z <= 7e+141)))
            		tmp = -z * sin(y);
            	else
            		tmp = cos(y) + x;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[Or[LessEqual[z, -1.85e+102], N[Not[LessEqual[z, 7e+141]], $MachinePrecision]], N[((-z) * N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -1.85 \cdot 10^{+102} \lor \neg \left(z \leq 7 \cdot 10^{+141}\right):\\
            \;\;\;\;\left(-z\right) \cdot \sin y\\
            
            \mathbf{else}:\\
            \;\;\;\;\cos y + x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.85000000000000011e102 or 6.9999999999999999e141 < 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.f6469.4

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

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

              if -1.85000000000000011e102 < z < 6.9999999999999999e141

              1. Initial program 100.0%

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(\left(x + \cos y\right) \cdot \left(x + \cos y\right) + \left(\left(z \cdot \sin y\right) \cdot \left(z \cdot \sin y\right) + \left(x + \cos y\right) \cdot \left(z \cdot \sin y\right)\right)\right) \cdot \frac{\left(x + \cos y\right) - z \cdot \sin y}{\left(x + \cos y\right) \cdot \left(x + \cos y\right) + \left(\left(z \cdot \sin y\right) \cdot \left(z \cdot \sin y\right) + \left(x + \cos y\right) \cdot \left(z \cdot \sin y\right)\right)}} \]
              4. Applied rewrites72.7%

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

                \[\leadsto \color{blue}{x + \cos y} \]
              6. 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.f6491.4

                  \[\leadsto \color{blue}{\cos y} + x \]
              7. Applied rewrites91.4%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+102} \lor \neg \left(z \leq 7 \cdot 10^{+141}\right):\\ \;\;\;\;\left(-z\right) \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;\cos y + x\\ \end{array} \]
            5. Add Preprocessing

            Alternative 6: 80.5% accurate, 1.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 450\right):\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(0.16666666666666666 \cdot z\right) \cdot y - 0.5, y, -z\right), y, 1 + x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (or (<= y -3.8e+16) (not (<= y 450.0)))
               (+ (cos y) x)
               (fma (fma (- (* (* 0.16666666666666666 z) y) 0.5) y (- z)) y (+ 1.0 x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((y <= -3.8e+16) || !(y <= 450.0)) {
            		tmp = cos(y) + x;
            	} else {
            		tmp = fma(fma((((0.16666666666666666 * z) * y) - 0.5), y, -z), y, (1.0 + x));
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if ((y <= -3.8e+16) || !(y <= 450.0))
            		tmp = Float64(cos(y) + x);
            	else
            		tmp = fma(fma(Float64(Float64(Float64(0.16666666666666666 * z) * y) - 0.5), y, Float64(-z)), y, Float64(1.0 + x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[Or[LessEqual[y, -3.8e+16], N[Not[LessEqual[y, 450.0]], $MachinePrecision]], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(N[(N[(0.16666666666666666 * z), $MachinePrecision] * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + (-z)), $MachinePrecision] * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 450\right):\\
            \;\;\;\;\cos y + x\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(0.16666666666666666 \cdot z\right) \cdot y - 0.5, y, -z\right), y, 1 + x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -3.8e16 or 450 < y

              1. Initial program 99.9%

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(\left(x + \cos y\right) \cdot \left(x + \cos y\right) + \left(\left(z \cdot \sin y\right) \cdot \left(z \cdot \sin y\right) + \left(x + \cos y\right) \cdot \left(z \cdot \sin y\right)\right)\right) \cdot \frac{\left(x + \cos y\right) - z \cdot \sin y}{\left(x + \cos y\right) \cdot \left(x + \cos y\right) + \left(\left(z \cdot \sin y\right) \cdot \left(z \cdot \sin y\right) + \left(x + \cos y\right) \cdot \left(z \cdot \sin y\right)\right)}} \]
              4. Applied rewrites57.0%

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

                \[\leadsto \color{blue}{x + \cos y} \]
              6. 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.f6460.3

                  \[\leadsto \color{blue}{\cos y} + x \]
              7. Applied rewrites60.3%

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

              if -3.8e16 < y < 450

              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. Applied rewrites99.2%

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

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

            Alternative 7: 69.8% accurate, 4.9× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 1000\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(0.16666666666666666 \cdot z\right) \cdot y - 0.5, y, -z\right), y, 1 + x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (or (<= y -3.8e+16) (not (<= y 1000.0)))
               (+ 1.0 x)
               (fma (fma (- (* (* 0.16666666666666666 z) y) 0.5) y (- z)) y (+ 1.0 x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((y <= -3.8e+16) || !(y <= 1000.0)) {
            		tmp = 1.0 + x;
            	} else {
            		tmp = fma(fma((((0.16666666666666666 * z) * y) - 0.5), y, -z), y, (1.0 + x));
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if ((y <= -3.8e+16) || !(y <= 1000.0))
            		tmp = Float64(1.0 + x);
            	else
            		tmp = fma(fma(Float64(Float64(Float64(0.16666666666666666 * z) * y) - 0.5), y, Float64(-z)), y, Float64(1.0 + x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[Or[LessEqual[y, -3.8e+16], N[Not[LessEqual[y, 1000.0]], $MachinePrecision]], N[(1.0 + x), $MachinePrecision], N[(N[(N[(N[(N[(0.16666666666666666 * z), $MachinePrecision] * y), $MachinePrecision] - 0.5), $MachinePrecision] * y + (-z)), $MachinePrecision] * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -3.8 \cdot 10^{+16} \lor \neg \left(y \leq 1000\right):\\
            \;\;\;\;1 + x\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(\left(0.16666666666666666 \cdot z\right) \cdot y - 0.5, y, -z\right), y, 1 + x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -3.8e16 or 1e3 < 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-+.f6441.8

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

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

              if -3.8e16 < y < 1e3

              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. Applied rewrites99.2%

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

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

            Alternative 8: 69.6% accurate, 8.8× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+32} \lor \neg \left(y \leq 8.5 \cdot 10^{+54}\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, y, 1 + x\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (or (<= y -1.42e+32) (not (<= y 8.5e+54)))
               (+ 1.0 x)
               (fma (- z) y (+ 1.0 x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((y <= -1.42e+32) || !(y <= 8.5e+54)) {
            		tmp = 1.0 + x;
            	} else {
            		tmp = fma(-z, y, (1.0 + x));
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if ((y <= -1.42e+32) || !(y <= 8.5e+54))
            		tmp = Float64(1.0 + x);
            	else
            		tmp = fma(Float64(-z), y, Float64(1.0 + x));
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[Or[LessEqual[y, -1.42e+32], N[Not[LessEqual[y, 8.5e+54]], $MachinePrecision]], N[(1.0 + x), $MachinePrecision], N[((-z) * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;y \leq -1.42 \cdot 10^{+32} \lor \neg \left(y \leq 8.5 \cdot 10^{+54}\right):\\
            \;\;\;\;1 + x\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(-z, y, 1 + x\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if y < -1.41999999999999992e32 or 8.4999999999999995e54 < 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-+.f6442.5

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

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

              if -1.41999999999999992e32 < y < 8.4999999999999995e54

              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. associate-+r+N/A

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.42 \cdot 10^{+32} \lor \neg \left(y \leq 8.5 \cdot 10^{+54}\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, y, 1 + x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 9: 66.8% accurate, 10.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5 \cdot 10^{-10} \lor \neg \left(x \leq 7.2 \cdot 10^{-26}\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-z, y, 1\right)\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (or (<= x -5e-10) (not (<= x 7.2e-26))) (+ 1.0 x) (fma (- z) y 1.0)))
            double code(double x, double y, double z) {
            	double tmp;
            	if ((x <= -5e-10) || !(x <= 7.2e-26)) {
            		tmp = 1.0 + x;
            	} else {
            		tmp = fma(-z, y, 1.0);
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if ((x <= -5e-10) || !(x <= 7.2e-26))
            		tmp = Float64(1.0 + x);
            	else
            		tmp = fma(Float64(-z), y, 1.0);
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[Or[LessEqual[x, -5e-10], N[Not[LessEqual[x, 7.2e-26]], $MachinePrecision]], N[(1.0 + x), $MachinePrecision], N[((-z) * y + 1.0), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -5 \cdot 10^{-10} \lor \neg \left(x \leq 7.2 \cdot 10^{-26}\right):\\
            \;\;\;\;1 + x\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(-z, y, 1\right)\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -5.00000000000000031e-10 or 7.2000000000000003e-26 < x

              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 + x} \]
              4. Step-by-step derivation
                1. lower-+.f6484.5

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

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

              if -5.00000000000000031e-10 < x < 7.2000000000000003e-26

              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. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(-z, \color{blue}{\sin y}, \cos y\right) \]
                10. lower-cos.f6499.8

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

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

                \[\leadsto 1 + \color{blue}{-1 \cdot \left(y \cdot z\right)} \]
              7. Step-by-step derivation
                1. Applied rewrites53.2%

                  \[\leadsto \mathsf{fma}\left(-z, \color{blue}{y}, 1\right) \]
              8. Recombined 2 regimes into one program.
              9. Final simplification69.9%

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

              Alternative 10: 62.5% accurate, 10.6× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.52 \cdot 10^{+271} \lor \neg \left(z \leq 1.06 \cdot 10^{+216}\right):\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
              (FPCore (x y z)
               :precision binary64
               (if (or (<= z -1.52e+271) (not (<= z 1.06e+216))) (* (- y) z) (+ 1.0 x)))
              double code(double x, double y, double z) {
              	double tmp;
              	if ((z <= -1.52e+271) || !(z <= 1.06e+216)) {
              		tmp = -y * z;
              	} else {
              		tmp = 1.0 + x;
              	}
              	return tmp;
              }
              
              real(8) function code(x, y, z)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8) :: tmp
                  if ((z <= (-1.52d+271)) .or. (.not. (z <= 1.06d+216))) then
                      tmp = -y * z
                  else
                      tmp = 1.0d0 + x
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z) {
              	double tmp;
              	if ((z <= -1.52e+271) || !(z <= 1.06e+216)) {
              		tmp = -y * z;
              	} else {
              		tmp = 1.0 + x;
              	}
              	return tmp;
              }
              
              def code(x, y, z):
              	tmp = 0
              	if (z <= -1.52e+271) or not (z <= 1.06e+216):
              		tmp = -y * z
              	else:
              		tmp = 1.0 + x
              	return tmp
              
              function code(x, y, z)
              	tmp = 0.0
              	if ((z <= -1.52e+271) || !(z <= 1.06e+216))
              		tmp = Float64(Float64(-y) * z);
              	else
              		tmp = Float64(1.0 + x);
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z)
              	tmp = 0.0;
              	if ((z <= -1.52e+271) || ~((z <= 1.06e+216)))
              		tmp = -y * z;
              	else
              		tmp = 1.0 + x;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_] := If[Or[LessEqual[z, -1.52e+271], N[Not[LessEqual[z, 1.06e+216]], $MachinePrecision]], N[((-y) * z), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              \mathbf{if}\;z \leq -1.52 \cdot 10^{+271} \lor \neg \left(z \leq 1.06 \cdot 10^{+216}\right):\\
              \;\;\;\;\left(-y\right) \cdot z\\
              
              \mathbf{else}:\\
              \;\;\;\;1 + x\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -1.52000000000000007e271 or 1.06e216 < 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.f6492.7

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

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

                  \[\leadsto -1 \cdot \color{blue}{\left(y \cdot z\right)} \]
                7. Step-by-step derivation
                  1. Applied rewrites49.0%

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

                  if -1.52000000000000007e271 < z < 1.06e216

                  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-+.f6470.8

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

                    \[\leadsto \color{blue}{1 + x} \]
                8. Recombined 2 regimes into one program.
                9. Final simplification68.6%

                  \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.52 \cdot 10^{+271} \lor \neg \left(z \leq 1.06 \cdot 10^{+216}\right):\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \]
                10. Add Preprocessing

                Alternative 11: 60.6% accurate, 16.3× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -0.37:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 0.45:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                (FPCore (x y z) :precision binary64 (if (<= x -0.37) x (if (<= x 0.45) 1.0 x)))
                double code(double x, double y, double z) {
                	double tmp;
                	if (x <= -0.37) {
                		tmp = x;
                	} else if (x <= 0.45) {
                		tmp = 1.0;
                	} else {
                		tmp = x;
                	}
                	return tmp;
                }
                
                real(8) function code(x, y, z)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8) :: tmp
                    if (x <= (-0.37d0)) then
                        tmp = x
                    else if (x <= 0.45d0) then
                        tmp = 1.0d0
                    else
                        tmp = x
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z) {
                	double tmp;
                	if (x <= -0.37) {
                		tmp = x;
                	} else if (x <= 0.45) {
                		tmp = 1.0;
                	} else {
                		tmp = x;
                	}
                	return tmp;
                }
                
                def code(x, y, z):
                	tmp = 0
                	if x <= -0.37:
                		tmp = x
                	elif x <= 0.45:
                		tmp = 1.0
                	else:
                		tmp = x
                	return tmp
                
                function code(x, y, z)
                	tmp = 0.0
                	if (x <= -0.37)
                		tmp = x;
                	elseif (x <= 0.45)
                		tmp = 1.0;
                	else
                		tmp = x;
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z)
                	tmp = 0.0;
                	if (x <= -0.37)
                		tmp = x;
                	elseif (x <= 0.45)
                		tmp = 1.0;
                	else
                		tmp = x;
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_] := If[LessEqual[x, -0.37], x, If[LessEqual[x, 0.45], 1.0, x]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;x \leq -0.37:\\
                \;\;\;\;x\\
                
                \mathbf{elif}\;x \leq 0.45:\\
                \;\;\;\;1\\
                
                \mathbf{else}:\\
                \;\;\;\;x\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if x < -0.37 or 0.450000000000000011 < x

                  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 + x} \]
                  4. Step-by-step derivation
                    1. lower-+.f6484.2

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

                    \[\leadsto \color{blue}{1 + x} \]
                  6. Step-by-step derivation
                    1. Applied rewrites39.0%

                      \[\leadsto \frac{x \cdot x - 1}{\color{blue}{x - 1}} \]
                    2. Step-by-step derivation
                      1. Applied rewrites40.7%

                        \[\leadsto \mathsf{fma}\left(\sqrt{x}, \color{blue}{\sqrt{x}}, 1\right) \]
                      2. Taylor expanded in x around -inf

                        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot {\left(\sqrt{-1}\right)}^{2}\right)} \]
                      3. Step-by-step derivation
                        1. Applied rewrites83.3%

                          \[\leadsto x \]

                        if -0.37 < x < 0.450000000000000011

                        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-+.f6442.7

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

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

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

                            \[\leadsto 1 \]
                        8. Recombined 2 regimes into one program.
                        9. Final simplification64.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -0.37:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 0.45:\\ \;\;\;\;1\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                        10. Add Preprocessing

                        Alternative 12: 61.4% 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-+.f6464.6

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

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

                        Alternative 13: 21.1% 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-+.f6464.6

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

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

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

                            \[\leadsto 1 \]
                          2. Add Preprocessing

                          Reproduce

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