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

Percentage Accurate: 99.9% → 99.9%
Time: 8.6s
Alternatives: 15
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 15 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + \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, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \cos y + x\\ t_1 := \mathsf{fma}\left(\sin y, z, t\_0\right)\\ t\_1 \cdot \frac{\mathsf{fma}\left(-z, \sin y, t\_0\right)}{t\_1} \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (cos y) x)) (t_1 (fma (sin y) z t_0)))
   (* t_1 (/ (fma (- z) (sin y) t_0) t_1))))
double code(double x, double y, double z) {
	double t_0 = cos(y) + x;
	double t_1 = fma(sin(y), z, t_0);
	return t_1 * (fma(-z, sin(y), t_0) / t_1);
}
function code(x, y, z)
	t_0 = Float64(cos(y) + x)
	t_1 = fma(sin(y), z, t_0)
	return Float64(t_1 * Float64(fma(Float64(-z), sin(y), t_0) / t_1))
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$1 = N[(N[Sin[y], $MachinePrecision] * z + t$95$0), $MachinePrecision]}, N[(t$95$1 * N[(N[((-z) * N[Sin[y], $MachinePrecision] + t$95$0), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \cos y + x\\
t_1 := \mathsf{fma}\left(\sin y, z, t\_0\right)\\
t\_1 \cdot \frac{\mathsf{fma}\left(-z, \sin y, t\_0\right)}{t\_1}
\end{array}
\end{array}
Derivation
  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. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 91.6% 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 -10000 \lor \neg \left(t\_1 \leq 0.81\right):\\ \;\;\;\;\left(x + 1\right) - t\_0\\ \mathbf{else}:\\ \;\;\;\;\cos y - z \cdot y\\ \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 -10000.0) (not (<= t_1 0.81)))
     (- (+ x 1.0) t_0)
     (- (cos y) (* z y)))))
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 <= -10000.0) || !(t_1 <= 0.81)) {
		tmp = (x + 1.0) - t_0;
	} else {
		tmp = cos(y) - (z * y);
	}
	return tmp;
}
real(8) function code(x, y, z)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8) :: t_0
    real(8) :: t_1
    real(8) :: tmp
    t_0 = z * sin(y)
    t_1 = (x + cos(y)) - t_0
    if ((t_1 <= (-10000.0d0)) .or. (.not. (t_1 <= 0.81d0))) then
        tmp = (x + 1.0d0) - t_0
    else
        tmp = cos(y) - (z * y)
    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 <= -10000.0) || !(t_1 <= 0.81)) {
		tmp = (x + 1.0) - t_0;
	} else {
		tmp = Math.cos(y) - (z * y);
	}
	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 <= -10000.0) or not (t_1 <= 0.81):
		tmp = (x + 1.0) - t_0
	else:
		tmp = math.cos(y) - (z * y)
	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 <= -10000.0) || !(t_1 <= 0.81))
		tmp = Float64(Float64(x + 1.0) - t_0);
	else
		tmp = Float64(cos(y) - Float64(z * y));
	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 <= -10000.0) || ~((t_1 <= 0.81)))
		tmp = (x + 1.0) - t_0;
	else
		tmp = cos(y) - (z * y);
	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, -10000.0], N[Not[LessEqual[t$95$1, 0.81]], $MachinePrecision]], N[(N[(x + 1.0), $MachinePrecision] - t$95$0), $MachinePrecision], N[(N[Cos[y], $MachinePrecision] - N[(z * y), $MachinePrecision]), $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 -10000 \lor \neg \left(t\_1 \leq 0.81\right):\\
\;\;\;\;\left(x + 1\right) - t\_0\\

\mathbf{else}:\\
\;\;\;\;\cos y - z \cdot y\\


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

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

      if -1e4 < (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < 0.81000000000000005

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\cos y} - z \cdot y \]
      10. Step-by-step derivation
        1. lower-cos.f6462.2

          \[\leadsto \color{blue}{\cos y} - z \cdot y \]
      11. Applied rewrites62.2%

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

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

    Alternative 3: 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 4: 98.3% accurate, 1.6× speedup?

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

      1. Initial program 99.8%

        \[\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.2%

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

        if -7e18 < z < 1.0199999999999999e-44

        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-+.f6480.1

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

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

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

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

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

            \[\leadsto \color{blue}{1 \cdot x + \frac{\cos y - z \cdot \sin y}{x} \cdot x} \]
          4. *-lft-identityN/A

            \[\leadsto \color{blue}{x} + \frac{\cos y - z \cdot \sin y}{x} \cdot x \]
          5. distribute-rgt1-inN/A

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{\mathsf{fma}\left(-1 \cdot z, \sin y, \cos y\right)}}{x}, x, x\right) \]
          14. mul-1-negN/A

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

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

            \[\leadsto \mathsf{fma}\left(\frac{\mathsf{fma}\left(-z, \color{blue}{\sin y}, \cos y\right)}{x}, x, x\right) \]
          17. lower-cos.f6499.9

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

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

          \[\leadsto \mathsf{fma}\left(\frac{\cos y}{x}, x, x\right) \]
        10. Step-by-step derivation
          1. Applied rewrites99.9%

            \[\leadsto \mathsf{fma}\left(\frac{\cos y}{x}, x, x\right) \]
        11. Recombined 2 regimes into one program.
        12. Final simplification99.5%

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

        Alternative 5: 91.2% accurate, 1.7× speedup?

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

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

            if -1.45e-216 < z < 3.40000000000000006e-133

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

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

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

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

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

          Alternative 6: 71.0% accurate, 1.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+62} \lor \neg \left(z \leq 2.9 \cdot 10^{+130}\right):\\ \;\;\;\;\left(-z\right) \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (or (<= z -6.6e+62) (not (<= z 2.9e+130))) (* (- z) (sin y)) (+ 1.0 x)))
          double code(double x, double y, double z) {
          	double tmp;
          	if ((z <= -6.6e+62) || !(z <= 2.9e+130)) {
          		tmp = -z * sin(y);
          	} 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 <= (-6.6d+62)) .or. (.not. (z <= 2.9d+130))) then
                  tmp = -z * sin(y)
              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 <= -6.6e+62) || !(z <= 2.9e+130)) {
          		tmp = -z * Math.sin(y);
          	} else {
          		tmp = 1.0 + x;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if (z <= -6.6e+62) or not (z <= 2.9e+130):
          		tmp = -z * math.sin(y)
          	else:
          		tmp = 1.0 + x
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if ((z <= -6.6e+62) || !(z <= 2.9e+130))
          		tmp = Float64(Float64(-z) * sin(y));
          	else
          		tmp = Float64(1.0 + x);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z)
          	tmp = 0.0;
          	if ((z <= -6.6e+62) || ~((z <= 2.9e+130)))
          		tmp = -z * sin(y);
          	else
          		tmp = 1.0 + x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[Or[LessEqual[z, -6.6e+62], N[Not[LessEqual[z, 2.9e+130]], $MachinePrecision]], N[((-z) * N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -6.6 \cdot 10^{+62} \lor \neg \left(z \leq 2.9 \cdot 10^{+130}\right):\\
          \;\;\;\;\left(-z\right) \cdot \sin y\\
          
          \mathbf{else}:\\
          \;\;\;\;1 + x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -6.6e62 or 2.8999999999999999e130 < z

            1. Initial program 99.8%

              \[\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.f6470.1

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

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

            if -6.6e62 < z < 2.8999999999999999e130

            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-+.f6480.5

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

              \[\leadsto \color{blue}{1 + x} \]
          3. Recombined 2 regimes into one program.
          4. Final simplification76.9%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+62} \lor \neg \left(z \leq 2.9 \cdot 10^{+130}\right):\\ \;\;\;\;\left(-z\right) \cdot \sin y\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \]
          5. Add Preprocessing

          Alternative 7: 69.2% accurate, 2.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -270000 \lor \neg \left(y \leq 1.7 \cdot 10^{+38}\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\left(x + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001388888888888889, y \cdot y, 0.041666666666666664\right), y \cdot y, -0.5\right), y \cdot y, 1\right)\right) - \mathsf{fma}\left(z \cdot \mathsf{fma}\left(0.008333333333333333, y \cdot y, -0.16666666666666666\right), y \cdot y, z\right) \cdot y\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (or (<= y -270000.0) (not (<= y 1.7e+38)))
             (+ 1.0 x)
             (-
              (+
               x
               (fma
                (fma
                 (fma -0.001388888888888889 (* y y) 0.041666666666666664)
                 (* y y)
                 -0.5)
                (* y y)
                1.0))
              (*
               (fma
                (* z (fma 0.008333333333333333 (* y y) -0.16666666666666666))
                (* y y)
                z)
               y))))
          double code(double x, double y, double z) {
          	double tmp;
          	if ((y <= -270000.0) || !(y <= 1.7e+38)) {
          		tmp = 1.0 + x;
          	} else {
          		tmp = (x + fma(fma(fma(-0.001388888888888889, (y * y), 0.041666666666666664), (y * y), -0.5), (y * y), 1.0)) - (fma((z * fma(0.008333333333333333, (y * y), -0.16666666666666666)), (y * y), z) * y);
          	}
          	return tmp;
          }
          
          function code(x, y, z)
          	tmp = 0.0
          	if ((y <= -270000.0) || !(y <= 1.7e+38))
          		tmp = Float64(1.0 + x);
          	else
          		tmp = Float64(Float64(x + fma(fma(fma(-0.001388888888888889, Float64(y * y), 0.041666666666666664), Float64(y * y), -0.5), Float64(y * y), 1.0)) - Float64(fma(Float64(z * fma(0.008333333333333333, Float64(y * y), -0.16666666666666666)), Float64(y * y), z) * y));
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[Or[LessEqual[y, -270000.0], N[Not[LessEqual[y, 1.7e+38]], $MachinePrecision]], N[(1.0 + x), $MachinePrecision], N[(N[(x + N[(N[(N[(-0.001388888888888889 * N[(y * y), $MachinePrecision] + 0.041666666666666664), $MachinePrecision] * N[(y * y), $MachinePrecision] + -0.5), $MachinePrecision] * N[(y * y), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * N[(0.008333333333333333 * N[(y * y), $MachinePrecision] + -0.16666666666666666), $MachinePrecision]), $MachinePrecision] * N[(y * y), $MachinePrecision] + z), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -270000 \lor \neg \left(y \leq 1.7 \cdot 10^{+38}\right):\\
          \;\;\;\;1 + x\\
          
          \mathbf{else}:\\
          \;\;\;\;\left(x + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(-0.001388888888888889, y \cdot y, 0.041666666666666664\right), y \cdot y, -0.5\right), y \cdot y, 1\right)\right) - \mathsf{fma}\left(z \cdot \mathsf{fma}\left(0.008333333333333333, y \cdot y, -0.16666666666666666\right), y \cdot y, z\right) \cdot y\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -2.7e5 or 1.69999999999999998e38 < y

            1. Initial program 99.8%

              \[\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.1

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

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

            if -2.7e5 < y < 1.69999999999999998e38

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(x + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{720}, y \cdot y, \frac{1}{24}\right), y \cdot y, \frac{-1}{2}\right), y \cdot y, 1\right)\right) - \color{blue}{\left(z + {y}^{2} \cdot \left(\frac{-1}{6} \cdot z + \frac{1}{120} \cdot \left({y}^{2} \cdot z\right)\right)\right) \cdot y} \]
            11. Applied rewrites95.7%

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

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

          Alternative 8: 69.3% accurate, 3.4× speedup?

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

            1. Initial program 99.8%

              \[\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.1

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

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

            if -4.8e5 < y < 1.69999999999999998e38

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(x + \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{-1}{720}, y \cdot y, \frac{1}{24}\right), y \cdot y, \frac{-1}{2}\right), y \cdot y, 1\right)\right) - \color{blue}{\left(z + {y}^{2} \cdot \left(\frac{-1}{6} \cdot z + \frac{1}{120} \cdot \left({y}^{2} \cdot z\right)\right)\right) \cdot y} \]
            11. Applied rewrites95.7%

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

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

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

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

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

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

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

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

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

          Alternative 9: 69.2% accurate, 3.7× speedup?

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

            1. Initial program 99.8%

              \[\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.1

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

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

            if -2.7e5 < y < 1.69999999999999998e38

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 69.2% accurate, 5.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1150000 \lor \neg \left(y \leq 2.6 \cdot 10^{+45}\right):\\ \;\;\;\;1 + x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z \cdot y, -0.5\right) \cdot y - z, y, 1 + x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (or (<= y -1150000.0) (not (<= y 2.6e+45)))
             (+ 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 <= -1150000.0) || !(y <= 2.6e+45)) {
          		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 <= -1150000.0) || !(y <= 2.6e+45))
          		tmp = Float64(1.0 + x);
          	else
          		tmp = fma(Float64(Float64(fma(0.16666666666666666, Float64(z * y), -0.5) * y) - z), y, Float64(1.0 + x));
          	end
          	return tmp
          end
          
          code[x_, y_, z_] := If[Or[LessEqual[y, -1150000.0], N[Not[LessEqual[y, 2.6e+45]], $MachinePrecision]], N[(1.0 + x), $MachinePrecision], N[(N[(N[(N[(0.16666666666666666 * N[(z * y), $MachinePrecision] + -0.5), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision] * y + N[(1.0 + x), $MachinePrecision]), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;y \leq -1150000 \lor \neg \left(y \leq 2.6 \cdot 10^{+45}\right):\\
          \;\;\;\;1 + x\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(0.16666666666666666, z \cdot y, -0.5\right) \cdot y - z, y, 1 + x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if y < -1.15e6 or 2.60000000000000007e45 < y

            1. Initial program 99.8%

              \[\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.4

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

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

            if -1.15e6 < y < 2.60000000000000007e45

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

                \[\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 rewrites94.7%

              \[\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. Final simplification71.0%

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

          Alternative 11: 69.2% accurate, 7.1× speedup?

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

            1. Initial program 99.8%

              \[\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.1

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

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

            if -4.8e5 < y < 1.69999999999999998e38

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 69.0% accurate, 9.6× speedup?

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

            1. Initial program 99.8%

              \[\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-+.f6443.3

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

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

            if -8.5000000000000001e87 < y < 2.90000000000000007e38

            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.f6489.0

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

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

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

          Alternative 13: 62.0% accurate, 15.1× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+225}:\\ \;\;\;\;\left(-y\right) \cdot z\\ \mathbf{else}:\\ \;\;\;\;1 + x\\ \end{array} \end{array} \]
          (FPCore (x y z)
           :precision binary64
           (if (<= z -1.75e+225) (* (- y) z) (+ 1.0 x)))
          double code(double x, double y, double z) {
          	double tmp;
          	if (z <= -1.75e+225) {
          		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.75d+225)) 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.75e+225) {
          		tmp = -y * z;
          	} else {
          		tmp = 1.0 + x;
          	}
          	return tmp;
          }
          
          def code(x, y, z):
          	tmp = 0
          	if z <= -1.75e+225:
          		tmp = -y * z
          	else:
          		tmp = 1.0 + x
          	return tmp
          
          function code(x, y, z)
          	tmp = 0.0
          	if (z <= -1.75e+225)
          		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.75e+225)
          		tmp = -y * z;
          	else
          		tmp = 1.0 + x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_] := If[LessEqual[z, -1.75e+225], N[((-y) * z), $MachinePrecision], N[(1.0 + x), $MachinePrecision]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -1.75 \cdot 10^{+225}:\\
          \;\;\;\;\left(-y\right) \cdot z\\
          
          \mathbf{else}:\\
          \;\;\;\;1 + x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if z < -1.7500000000000002e225

            1. Initial program 99.7%

              \[\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.f6487.5

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

              \[\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 rewrites30.0%

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

              if -1.7500000000000002e225 < 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 \color{blue}{1 + x} \]
              4. Step-by-step derivation
                1. lower-+.f6467.6

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

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

            Alternative 14: 61.6% 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-+.f6462.8

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

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

            Alternative 15: 22.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-+.f6462.8

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

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

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

                \[\leadsto 1 \]
              2. Add Preprocessing

              Reproduce

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