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

Percentage Accurate: 99.9% → 99.9%
Time: 4.3s
Alternatives: 16
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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    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}

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 16 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));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z)
use fmin_fmax_functions
    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} \\ \mathsf{fma}\left(\sin y, -z, \cos y + x\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma (sin y) (- z) (+ (cos y) x)))
double code(double x, double y, double z) {
	return fma(sin(y), -z, (cos(y) + x));
}
function code(x, y, z)
	return fma(sin(y), Float64(-z), Float64(cos(y) + x))
end
code[x_, y_, z_] := N[(N[Sin[y], $MachinePrecision] * (-z) + N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\sin y, -z, \cos y + x\right)
\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. lift-+.f64N/A

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

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

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

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

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

      \[\leadsto \left(x + \cos y\right) - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \left(z \cdot \sin y\right) \]
    8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 98.3% 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 -1 \cdot 10^{+14}:\\ \;\;\;\;\mathsf{fma}\left(\sin y, -z, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{+14}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;x - t\_0\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (* z (sin y))) (t_1 (- (+ x (cos y)) t_0)))
   (if (<= t_1 -1e+14)
     (fma (sin y) (- z) x)
     (if (<= t_1 1e+14) (+ (cos y) x) (- x t_0)))))
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 <= -1e+14) {
		tmp = fma(sin(y), -z, x);
	} else if (t_1 <= 1e+14) {
		tmp = cos(y) + x;
	} else {
		tmp = x - t_0;
	}
	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 <= -1e+14)
		tmp = fma(sin(y), Float64(-z), x);
	elseif (t_1 <= 1e+14)
		tmp = Float64(cos(y) + x);
	else
		tmp = Float64(x - t_0);
	end
	return 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[LessEqual[t$95$1, -1e+14], N[(N[Sin[y], $MachinePrecision] * (-z) + x), $MachinePrecision], If[LessEqual[t$95$1, 1e+14], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], N[(x - t$95$0), $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 -1 \cdot 10^{+14}:\\
\;\;\;\;\mathsf{fma}\left(\sin y, -z, x\right)\\

\mathbf{elif}\;t\_1 \leq 10^{+14}:\\
\;\;\;\;\cos y + x\\

\mathbf{else}:\\
\;\;\;\;x - t\_0\\


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

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

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

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

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

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

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

        \[\leadsto \left(x + \cos y\right) - \color{blue}{\left(\mathsf{neg}\left(-1\right)\right)} \cdot \left(z \cdot \sin y\right) \]
      8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 100.0%

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

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

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

          \[\leadsto \cos y + \color{blue}{x} \]
        3. lift-cos.f6495.2

          \[\leadsto \cos y + x \]
      5. Applied rewrites95.2%

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

      if 1e14 < (-.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 x around inf

        \[\leadsto \color{blue}{x} - z \cdot \sin y \]
      4. Step-by-step derivation
        1. Applied rewrites99.9%

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

      Alternative 3: 98.3% 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\\ t_2 := x - t\_0\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+14}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
      (FPCore (x y z)
       :precision binary64
       (let* ((t_0 (* z (sin y))) (t_1 (- (+ x (cos y)) t_0)) (t_2 (- x t_0)))
         (if (<= t_1 -1e+14) t_2 (if (<= t_1 1e+14) (+ (cos y) x) t_2))))
      double code(double x, double y, double z) {
      	double t_0 = z * sin(y);
      	double t_1 = (x + cos(y)) - t_0;
      	double t_2 = x - t_0;
      	double tmp;
      	if (t_1 <= -1e+14) {
      		tmp = t_2;
      	} else if (t_1 <= 1e+14) {
      		tmp = cos(y) + x;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8) :: t_0
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: tmp
          t_0 = z * sin(y)
          t_1 = (x + cos(y)) - t_0
          t_2 = x - t_0
          if (t_1 <= (-1d+14)) then
              tmp = t_2
          else if (t_1 <= 1d+14) then
              tmp = cos(y) + x
          else
              tmp = t_2
          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 t_2 = x - t_0;
      	double tmp;
      	if (t_1 <= -1e+14) {
      		tmp = t_2;
      	} else if (t_1 <= 1e+14) {
      		tmp = Math.cos(y) + x;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, y, z):
      	t_0 = z * math.sin(y)
      	t_1 = (x + math.cos(y)) - t_0
      	t_2 = x - t_0
      	tmp = 0
      	if t_1 <= -1e+14:
      		tmp = t_2
      	elif t_1 <= 1e+14:
      		tmp = math.cos(y) + x
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, y, z)
      	t_0 = Float64(z * sin(y))
      	t_1 = Float64(Float64(x + cos(y)) - t_0)
      	t_2 = Float64(x - t_0)
      	tmp = 0.0
      	if (t_1 <= -1e+14)
      		tmp = t_2;
      	elseif (t_1 <= 1e+14)
      		tmp = Float64(cos(y) + x);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z)
      	t_0 = z * sin(y);
      	t_1 = (x + cos(y)) - t_0;
      	t_2 = x - t_0;
      	tmp = 0.0;
      	if (t_1 <= -1e+14)
      		tmp = t_2;
      	elseif (t_1 <= 1e+14)
      		tmp = cos(y) + x;
      	else
      		tmp = t_2;
      	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]}, Block[{t$95$2 = N[(x - t$95$0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+14], t$95$2, If[LessEqual[t$95$1, 1e+14], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], t$95$2]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_0 := z \cdot \sin y\\
      t_1 := \left(x + \cos y\right) - t\_0\\
      t_2 := x - t\_0\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+14}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 10^{+14}:\\
      \;\;\;\;\cos y + x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (-.f64 (+.f64 x (cos.f64 y)) (*.f64 z (sin.f64 y))) < -1e14 or 1e14 < (-.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 x around inf

          \[\leadsto \color{blue}{x} - z \cdot \sin y \]
        4. Step-by-step derivation
          1. Applied rewrites99.9%

            \[\leadsto \color{blue}{x} - z \cdot \sin y \]

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

          1. Initial program 100.0%

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

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

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

              \[\leadsto \cos y + \color{blue}{x} \]
            3. lift-cos.f6495.2

              \[\leadsto \cos y + x \]
          5. Applied rewrites95.2%

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

        Alternative 4: 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));
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z)
        use fmin_fmax_functions
            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 5: 82.3% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(-z\right) \cdot \sin y\\ \mathbf{if}\;z \leq -3.3 \cdot 10^{+163}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 9 \cdot 10^{+140}:\\ \;\;\;\;\cos y + x\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (* (- z) (sin y))))
           (if (<= z -3.3e+163) t_0 (if (<= z 9e+140) (+ (cos y) x) t_0))))
        double code(double x, double y, double z) {
        	double t_0 = -z * sin(y);
        	double tmp;
        	if (z <= -3.3e+163) {
        		tmp = t_0;
        	} else if (z <= 9e+140) {
        		tmp = cos(y) + x;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z)
        use fmin_fmax_functions
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8) :: t_0
            real(8) :: tmp
            t_0 = -z * sin(y)
            if (z <= (-3.3d+163)) then
                tmp = t_0
            else if (z <= 9d+140) then
                tmp = cos(y) + x
            else
                tmp = t_0
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double t_0 = -z * Math.sin(y);
        	double tmp;
        	if (z <= -3.3e+163) {
        		tmp = t_0;
        	} else if (z <= 9e+140) {
        		tmp = Math.cos(y) + x;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	t_0 = -z * math.sin(y)
        	tmp = 0
        	if z <= -3.3e+163:
        		tmp = t_0
        	elif z <= 9e+140:
        		tmp = math.cos(y) + x
        	else:
        		tmp = t_0
        	return tmp
        
        function code(x, y, z)
        	t_0 = Float64(Float64(-z) * sin(y))
        	tmp = 0.0
        	if (z <= -3.3e+163)
        		tmp = t_0;
        	elseif (z <= 9e+140)
        		tmp = Float64(cos(y) + x);
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	t_0 = -z * sin(y);
        	tmp = 0.0;
        	if (z <= -3.3e+163)
        		tmp = t_0;
        	elseif (z <= 9e+140)
        		tmp = cos(y) + x;
        	else
        		tmp = t_0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[((-z) * N[Sin[y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.3e+163], t$95$0, If[LessEqual[z, 9e+140], N[(N[Cos[y], $MachinePrecision] + x), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \left(-z\right) \cdot \sin y\\
        \mathbf{if}\;z \leq -3.3 \cdot 10^{+163}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 9 \cdot 10^{+140}:\\
        \;\;\;\;\cos y + x\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -3.3e163 or 9.0000000000000003e140 < 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 \mathsf{neg}\left(z \cdot \sin y\right) \]
            2. distribute-lft-neg-inN/A

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

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

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

              \[\leadsto \left(-z\right) \cdot \sin y \]
          5. Applied rewrites69.1%

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

          if -3.3e163 < z < 9.0000000000000003e140

          1. Initial program 99.9%

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

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

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

              \[\leadsto \cos y + \color{blue}{x} \]
            3. lift-cos.f6486.7

              \[\leadsto \cos y + x \]
          5. Applied rewrites86.7%

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

        Alternative 6: 81.4% accurate, 1.8× speedup?

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

          1. Initial program 99.8%

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

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

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

              \[\leadsto \cos y + \color{blue}{x} \]
            3. lift-cos.f6462.7

              \[\leadsto \cos y + x \]
          5. Applied rewrites62.7%

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

          if -0.57999999999999996 < y < 100

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x + 1 \cdot 1\right) \]
            16. fp-cancel-sign-sub-invN/A

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x - -1\right) \]
          5. Applied rewrites99.7%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(y \cdot z\right)\right) \cdot y - z, y, x - -1\right) \]
          10. Step-by-step derivation
            1. *-commutativeN/A

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

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

              \[\leadsto \mathsf{fma}\left(\left(\left(z \cdot y\right) \cdot \frac{1}{6}\right) \cdot y - z, y, x - -1\right) \]
            4. lower-*.f6499.5

              \[\leadsto \mathsf{fma}\left(\left(\left(z \cdot y\right) \cdot 0.16666666666666666\right) \cdot y - z, y, x - -1\right) \]
          11. Applied rewrites99.5%

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

        Alternative 7: 71.0% accurate, 4.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4.6 \cdot 10^{+28}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 160000000000:\\ \;\;\;\;\mathsf{fma}\left(\left(0.16666666666666666 \cdot \left(z \cdot y\right) - 0.5\right) \cdot y - z, y, x - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -4.6e+28)
           (- x -1.0)
           (if (<= y 160000000000.0)
             (fma (- (* (- (* 0.16666666666666666 (* z y)) 0.5) y) z) y (- x -1.0))
             (- x -1.0))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -4.6e+28) {
        		tmp = x - -1.0;
        	} else if (y <= 160000000000.0) {
        		tmp = fma(((((0.16666666666666666 * (z * y)) - 0.5) * y) - z), y, (x - -1.0));
        	} else {
        		tmp = x - -1.0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -4.6e+28)
        		tmp = Float64(x - -1.0);
        	elseif (y <= 160000000000.0)
        		tmp = fma(Float64(Float64(Float64(Float64(0.16666666666666666 * Float64(z * y)) - 0.5) * y) - z), y, Float64(x - -1.0));
        	else
        		tmp = Float64(x - -1.0);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -4.6e+28], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 160000000000.0], N[(N[(N[(N[(N[(0.16666666666666666 * N[(z * y), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] * y), $MachinePrecision] - z), $MachinePrecision] * y + N[(x - -1.0), $MachinePrecision]), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -4.6 \cdot 10^{+28}:\\
        \;\;\;\;x - -1\\
        
        \mathbf{elif}\;y \leq 160000000000:\\
        \;\;\;\;\mathsf{fma}\left(\left(0.16666666666666666 \cdot \left(z \cdot y\right) - 0.5\right) \cdot y - z, y, x - -1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x - -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -4.59999999999999968e28 or 1.6e11 < 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. +-commutativeN/A

              \[\leadsto x + \color{blue}{1} \]
            2. metadata-evalN/A

              \[\leadsto x + 1 \cdot \color{blue}{1} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto x - -1 \cdot 1 \]
            5. metadata-evalN/A

              \[\leadsto x - -1 \]
            6. lower--.f6441.9

              \[\leadsto x - \color{blue}{-1} \]
          5. Applied rewrites41.9%

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

          if -4.59999999999999968e28 < y < 1.6e11

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x + 1 \cdot 1\right) \]
            16. fp-cancel-sign-sub-invN/A

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x - -1\right) \]
          5. Applied rewrites95.8%

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

        Alternative 8: 71.0% accurate, 7.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -9.4 \cdot 10^{+21}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 62:\\ \;\;\;\;\mathsf{fma}\left(-0.5 \cdot y - z, y, x - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -9.4e+21)
           (- x -1.0)
           (if (<= y 62.0) (fma (- (* -0.5 y) z) y (- x -1.0)) (- x -1.0))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -9.4e+21) {
        		tmp = x - -1.0;
        	} else if (y <= 62.0) {
        		tmp = fma(((-0.5 * y) - z), y, (x - -1.0));
        	} else {
        		tmp = x - -1.0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -9.4e+21)
        		tmp = Float64(x - -1.0);
        	elseif (y <= 62.0)
        		tmp = fma(Float64(Float64(-0.5 * y) - z), y, Float64(x - -1.0));
        	else
        		tmp = Float64(x - -1.0);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -9.4e+21], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 62.0], N[(N[(N[(-0.5 * y), $MachinePrecision] - z), $MachinePrecision] * y + N[(x - -1.0), $MachinePrecision]), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -9.4 \cdot 10^{+21}:\\
        \;\;\;\;x - -1\\
        
        \mathbf{elif}\;y \leq 62:\\
        \;\;\;\;\mathsf{fma}\left(-0.5 \cdot y - z, y, x - -1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x - -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -9.4e21 or 62 < 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. +-commutativeN/A

              \[\leadsto x + \color{blue}{1} \]
            2. metadata-evalN/A

              \[\leadsto x + 1 \cdot \color{blue}{1} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto x - -1 \cdot 1 \]
            5. metadata-evalN/A

              \[\leadsto x - -1 \]
            6. lower--.f6442.0

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

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

          if -9.4e21 < y < 62

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot y - z, y, x + 1 \cdot 1\right) \]
            11. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot y - z, y, x - -1 \cdot 1\right) \]
            13. metadata-evalN/A

              \[\leadsto \mathsf{fma}\left(\frac{-1}{2} \cdot y - z, y, x - -1\right) \]
            14. lower--.f6497.1

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

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

        Alternative 9: 71.0% accurate, 8.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.46 \cdot 10^{+32}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 16:\\ \;\;\;\;\mathsf{fma}\left(-z, y, x - -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -1.46e+32)
           (- x -1.0)
           (if (<= y 16.0) (fma (- z) y (- x -1.0)) (- x -1.0))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.46e+32) {
        		tmp = x - -1.0;
        	} else if (y <= 16.0) {
        		tmp = fma(-z, y, (x - -1.0));
        	} else {
        		tmp = x - -1.0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -1.46e+32)
        		tmp = Float64(x - -1.0);
        	elseif (y <= 16.0)
        		tmp = fma(Float64(-z), y, Float64(x - -1.0));
        	else
        		tmp = Float64(x - -1.0);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -1.46e+32], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 16.0], N[((-z) * y + N[(x - -1.0), $MachinePrecision]), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.46 \cdot 10^{+32}:\\
        \;\;\;\;x - -1\\
        
        \mathbf{elif}\;y \leq 16:\\
        \;\;\;\;\mathsf{fma}\left(-z, y, x - -1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x - -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.46000000000000005e32 or 16 < 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. +-commutativeN/A

              \[\leadsto x + \color{blue}{1} \]
            2. metadata-evalN/A

              \[\leadsto x + 1 \cdot \color{blue}{1} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto x - -1 \cdot 1 \]
            5. metadata-evalN/A

              \[\leadsto x - -1 \]
            6. lower--.f6442.0

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

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

          if -1.46000000000000005e32 < y < 16

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x + 1 \cdot 1\right) \]
            16. fp-cancel-sign-sub-invN/A

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x - -1\right) \]
          5. Applied rewrites96.3%

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

            \[\leadsto \mathsf{fma}\left(-1 \cdot z, y, x - -1\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(z\right), y, x - -1\right) \]
            2. lift-neg.f6496.3

              \[\leadsto \mathsf{fma}\left(-z, y, x - -1\right) \]
          8. Applied rewrites96.3%

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

        Alternative 10: 71.0% accurate, 9.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.46 \cdot 10^{+32}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;y \leq 16:\\ \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= y -1.46e+32)
           (- x -1.0)
           (if (<= y 16.0) (- x (fma z y -1.0)) (- x -1.0))))
        double code(double x, double y, double z) {
        	double tmp;
        	if (y <= -1.46e+32) {
        		tmp = x - -1.0;
        	} else if (y <= 16.0) {
        		tmp = x - fma(z, y, -1.0);
        	} else {
        		tmp = x - -1.0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	tmp = 0.0
        	if (y <= -1.46e+32)
        		tmp = Float64(x - -1.0);
        	elseif (y <= 16.0)
        		tmp = Float64(x - fma(z, y, -1.0));
        	else
        		tmp = Float64(x - -1.0);
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := If[LessEqual[y, -1.46e+32], N[(x - -1.0), $MachinePrecision], If[LessEqual[y, 16.0], N[(x - N[(z * y + -1.0), $MachinePrecision]), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;y \leq -1.46 \cdot 10^{+32}:\\
        \;\;\;\;x - -1\\
        
        \mathbf{elif}\;y \leq 16:\\
        \;\;\;\;x - \mathsf{fma}\left(z, y, -1\right)\\
        
        \mathbf{else}:\\
        \;\;\;\;x - -1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if y < -1.46000000000000005e32 or 16 < 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. +-commutativeN/A

              \[\leadsto x + \color{blue}{1} \]
            2. metadata-evalN/A

              \[\leadsto x + 1 \cdot \color{blue}{1} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto x - -1 \cdot 1 \]
            5. metadata-evalN/A

              \[\leadsto x - -1 \]
            6. lower--.f6442.0

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

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

          if -1.46000000000000005e32 < y < 16

          1. Initial program 100.0%

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

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

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

              \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) + 1 \cdot \color{blue}{1} \]
            3. fp-cancel-sign-sub-invN/A

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

              \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) - -1 \cdot 1 \]
            5. metadata-evalN/A

              \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) - -1 \]
            6. lower--.f64N/A

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

              \[\leadsto \left(x + \left(\mathsf{neg}\left(1\right)\right) \cdot \left(y \cdot z\right)\right) - -1 \]
            8. fp-cancel-sub-sign-invN/A

              \[\leadsto \left(x - 1 \cdot \left(y \cdot z\right)\right) - -1 \]
            9. *-lft-identityN/A

              \[\leadsto \left(x - y \cdot z\right) - -1 \]
            10. lower--.f64N/A

              \[\leadsto \left(x - y \cdot z\right) - -1 \]
            11. *-commutativeN/A

              \[\leadsto \left(x - z \cdot y\right) - -1 \]
            12. lower-*.f6496.3

              \[\leadsto \left(x - z \cdot y\right) - -1 \]
          5. Applied rewrites96.3%

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

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

              \[\leadsto \left(x - z \cdot y\right) - -1 \]
            3. associate--l-N/A

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

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

              \[\leadsto x - \left(z \cdot y + -1\right) \]
            6. lower-fma.f6496.3

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

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

        Alternative 11: 65.5% accurate, 10.1× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_0 := \mathsf{fma}\left(-z, y, x\right)\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+91}:\\ \;\;\;\;t\_0\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+184}:\\ \;\;\;\;x - -1\\ \mathbf{else}:\\ \;\;\;\;t\_0\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (let* ((t_0 (fma (- z) y x)))
           (if (<= z -1.2e+91) t_0 (if (<= z 5e+184) (- x -1.0) t_0))))
        double code(double x, double y, double z) {
        	double t_0 = fma(-z, y, x);
        	double tmp;
        	if (z <= -1.2e+91) {
        		tmp = t_0;
        	} else if (z <= 5e+184) {
        		tmp = x - -1.0;
        	} else {
        		tmp = t_0;
        	}
        	return tmp;
        }
        
        function code(x, y, z)
        	t_0 = fma(Float64(-z), y, x)
        	tmp = 0.0
        	if (z <= -1.2e+91)
        		tmp = t_0;
        	elseif (z <= 5e+184)
        		tmp = Float64(x - -1.0);
        	else
        		tmp = t_0;
        	end
        	return tmp
        end
        
        code[x_, y_, z_] := Block[{t$95$0 = N[((-z) * y + x), $MachinePrecision]}, If[LessEqual[z, -1.2e+91], t$95$0, If[LessEqual[z, 5e+184], N[(x - -1.0), $MachinePrecision], t$95$0]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_0 := \mathsf{fma}\left(-z, y, x\right)\\
        \mathbf{if}\;z \leq -1.2 \cdot 10^{+91}:\\
        \;\;\;\;t\_0\\
        
        \mathbf{elif}\;z \leq 5 \cdot 10^{+184}:\\
        \;\;\;\;x - -1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_0\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -1.19999999999999991e91 or 4.9999999999999999e184 < 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 \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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x + 1 \cdot 1\right) \]
            16. fp-cancel-sign-sub-invN/A

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

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

              \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x - -1\right) \]
          5. Applied rewrites52.2%

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

            \[\leadsto \mathsf{fma}\left(-1 \cdot z, y, x - -1\right) \]
          7. Step-by-step derivation
            1. mul-1-negN/A

              \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(z\right), y, x - -1\right) \]
            2. lift-neg.f6452.9

              \[\leadsto \mathsf{fma}\left(-z, y, x - -1\right) \]
          8. Applied rewrites52.9%

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

            \[\leadsto \mathsf{fma}\left(-z, y, x\right) \]
          10. Step-by-step derivation
            1. Applied rewrites45.2%

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

            if -1.19999999999999991e91 < z < 4.9999999999999999e184

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

                \[\leadsto x + \color{blue}{1} \]
              2. metadata-evalN/A

                \[\leadsto x + 1 \cdot \color{blue}{1} \]
              3. fp-cancel-sign-sub-invN/A

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

                \[\leadsto x - -1 \cdot 1 \]
              5. metadata-evalN/A

                \[\leadsto x - -1 \]
              6. lower--.f6473.1

                \[\leadsto x - \color{blue}{-1} \]
            5. Applied rewrites73.1%

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

          Alternative 12: 68.1% accurate, 10.1× speedup?

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

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

                \[\leadsto x + \color{blue}{1} \]
              2. metadata-evalN/A

                \[\leadsto x + 1 \cdot \color{blue}{1} \]
              3. fp-cancel-sign-sub-invN/A

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

                \[\leadsto x - -1 \cdot 1 \]
              5. metadata-evalN/A

                \[\leadsto x - -1 \]
              6. lower--.f6481.8

                \[\leadsto x - \color{blue}{-1} \]
            5. Applied rewrites81.8%

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

            if -1.42e-11 < x < 0.69999999999999996

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x + 1 \cdot 1\right) \]
              16. fp-cancel-sign-sub-invN/A

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

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

                \[\leadsto \mathsf{fma}\left(\left(\frac{1}{6} \cdot \left(z \cdot y\right) - \frac{1}{2}\right) \cdot y - z, y, x - -1\right) \]
            5. Applied rewrites53.0%

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

              \[\leadsto \mathsf{fma}\left(-1 \cdot z, y, x - -1\right) \]
            7. Step-by-step derivation
              1. mul-1-negN/A

                \[\leadsto \mathsf{fma}\left(\mathsf{neg}\left(z\right), y, x - -1\right) \]
              2. lift-neg.f6454.1

                \[\leadsto \mathsf{fma}\left(-z, y, x - -1\right) \]
            8. Applied rewrites54.1%

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

              \[\leadsto \mathsf{fma}\left(-z, y, 1\right) \]
            10. Step-by-step derivation
              1. Applied rewrites53.6%

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

            Alternative 13: 68.1% accurate, 10.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.42 \cdot 10^{-11}:\\ \;\;\;\;x - -1\\ \mathbf{elif}\;x \leq 0.7:\\ \;\;\;\;1 - z \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -1.42e-11) (- x -1.0) (if (<= x 0.7) (- 1.0 (* z y)) (- x -1.0))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -1.42e-11) {
            		tmp = x - -1.0;
            	} else if (x <= 0.7) {
            		tmp = 1.0 - (z * y);
            	} else {
            		tmp = x - -1.0;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: tmp
                if (x <= (-1.42d-11)) then
                    tmp = x - (-1.0d0)
                else if (x <= 0.7d0) then
                    tmp = 1.0d0 - (z * y)
                else
                    tmp = x - (-1.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -1.42e-11) {
            		tmp = x - -1.0;
            	} else if (x <= 0.7) {
            		tmp = 1.0 - (z * y);
            	} else {
            		tmp = x - -1.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if x <= -1.42e-11:
            		tmp = x - -1.0
            	elif x <= 0.7:
            		tmp = 1.0 - (z * y)
            	else:
            		tmp = x - -1.0
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -1.42e-11)
            		tmp = Float64(x - -1.0);
            	elseif (x <= 0.7)
            		tmp = Float64(1.0 - Float64(z * y));
            	else
            		tmp = Float64(x - -1.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (x <= -1.42e-11)
            		tmp = x - -1.0;
            	elseif (x <= 0.7)
            		tmp = 1.0 - (z * y);
            	else
            		tmp = x - -1.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -1.42e-11], N[(x - -1.0), $MachinePrecision], If[LessEqual[x, 0.7], N[(1.0 - N[(z * y), $MachinePrecision]), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -1.42 \cdot 10^{-11}:\\
            \;\;\;\;x - -1\\
            
            \mathbf{elif}\;x \leq 0.7:\\
            \;\;\;\;1 - z \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;x - -1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if x < -1.42e-11 or 0.69999999999999996 < x

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

                  \[\leadsto x + \color{blue}{1} \]
                2. metadata-evalN/A

                  \[\leadsto x + 1 \cdot \color{blue}{1} \]
                3. fp-cancel-sign-sub-invN/A

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

                  \[\leadsto x - -1 \cdot 1 \]
                5. metadata-evalN/A

                  \[\leadsto x - -1 \]
                6. lower--.f6481.8

                  \[\leadsto x - \color{blue}{-1} \]
              5. Applied rewrites81.8%

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

              if -1.42e-11 < x < 0.69999999999999996

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

                  \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) + 1 \cdot \color{blue}{1} \]
                3. fp-cancel-sign-sub-invN/A

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

                  \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) - -1 \cdot 1 \]
                5. metadata-evalN/A

                  \[\leadsto \left(x + -1 \cdot \left(y \cdot z\right)\right) - -1 \]
                6. lower--.f64N/A

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

                  \[\leadsto \left(x + \left(\mathsf{neg}\left(1\right)\right) \cdot \left(y \cdot z\right)\right) - -1 \]
                8. fp-cancel-sub-sign-invN/A

                  \[\leadsto \left(x - 1 \cdot \left(y \cdot z\right)\right) - -1 \]
                9. *-lft-identityN/A

                  \[\leadsto \left(x - y \cdot z\right) - -1 \]
                10. lower--.f64N/A

                  \[\leadsto \left(x - y \cdot z\right) - -1 \]
                11. *-commutativeN/A

                  \[\leadsto \left(x - z \cdot y\right) - -1 \]
                12. lower-*.f6454.1

                  \[\leadsto \left(x - z \cdot y\right) - -1 \]
              5. Applied rewrites54.1%

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

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

                  \[\leadsto 1 - y \cdot \color{blue}{z} \]
                2. *-commutativeN/A

                  \[\leadsto 1 - z \cdot y \]
                3. lift-*.f6453.6

                  \[\leadsto 1 - z \cdot y \]
              8. Applied rewrites53.6%

                \[\leadsto 1 - \color{blue}{z \cdot y} \]
            3. Recombined 2 regimes into one program.
            4. Add Preprocessing

            Alternative 14: 62.9% accurate, 15.1× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+206}:\\ \;\;\;\;\left(-z\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - -1\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= z -6.2e+206) (* (- z) y) (- x -1.0)))
            double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -6.2e+206) {
            		tmp = -z * y;
            	} else {
            		tmp = x - -1.0;
            	}
            	return tmp;
            }
            
            module fmin_fmax_functions
                implicit none
                private
                public fmax
                public fmin
            
                interface fmax
                    module procedure fmax88
                    module procedure fmax44
                    module procedure fmax84
                    module procedure fmax48
                end interface
                interface fmin
                    module procedure fmin88
                    module procedure fmin44
                    module procedure fmin84
                    module procedure fmin48
                end interface
            contains
                real(8) function fmax88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(4) function fmax44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                end function
                real(8) function fmax84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmax48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                end function
                real(8) function fmin88(x, y) result (res)
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(4) function fmin44(x, y) result (res)
                    real(4), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                end function
                real(8) function fmin84(x, y) result(res)
                    real(8), intent (in) :: x
                    real(4), intent (in) :: y
                    res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                end function
                real(8) function fmin48(x, y) result(res)
                    real(4), intent (in) :: x
                    real(8), intent (in) :: y
                    res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                end function
            end module
            
            real(8) function code(x, y, z)
            use fmin_fmax_functions
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8) :: tmp
                if (z <= (-6.2d+206)) then
                    tmp = -z * y
                else
                    tmp = x - (-1.0d0)
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z) {
            	double tmp;
            	if (z <= -6.2e+206) {
            		tmp = -z * y;
            	} else {
            		tmp = x - -1.0;
            	}
            	return tmp;
            }
            
            def code(x, y, z):
            	tmp = 0
            	if z <= -6.2e+206:
            		tmp = -z * y
            	else:
            		tmp = x - -1.0
            	return tmp
            
            function code(x, y, z)
            	tmp = 0.0
            	if (z <= -6.2e+206)
            		tmp = Float64(Float64(-z) * y);
            	else
            		tmp = Float64(x - -1.0);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z)
            	tmp = 0.0;
            	if (z <= -6.2e+206)
            		tmp = -z * y;
            	else
            		tmp = x - -1.0;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_] := If[LessEqual[z, -6.2e+206], N[((-z) * y), $MachinePrecision], N[(x - -1.0), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -6.2 \cdot 10^{+206}:\\
            \;\;\;\;\left(-z\right) \cdot y\\
            
            \mathbf{else}:\\
            \;\;\;\;x - -1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -6.19999999999999981e206

              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 \mathsf{neg}\left(z \cdot \sin y\right) \]
                2. distribute-lft-neg-inN/A

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

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

                  \[\leadsto \left(-z\right) \cdot \sin \color{blue}{y} \]
                5. lift-sin.f6473.9

                  \[\leadsto \left(-z\right) \cdot \sin y \]
              5. Applied rewrites73.9%

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

                \[\leadsto \left(-z\right) \cdot y \]
              7. Step-by-step derivation
                1. Applied rewrites31.4%

                  \[\leadsto \left(-z\right) \cdot y \]

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

                    \[\leadsto x + \color{blue}{1} \]
                  2. metadata-evalN/A

                    \[\leadsto x + 1 \cdot \color{blue}{1} \]
                  3. fp-cancel-sign-sub-invN/A

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

                    \[\leadsto x - -1 \cdot 1 \]
                  5. metadata-evalN/A

                    \[\leadsto x - -1 \]
                  6. lower--.f6465.8

                    \[\leadsto x - \color{blue}{-1} \]
                5. Applied rewrites65.8%

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

              Alternative 15: 62.4% accurate, 53.0× speedup?

              \[\begin{array}{l} \\ x - -1 \end{array} \]
              (FPCore (x y z) :precision binary64 (- x -1.0))
              double code(double x, double y, double z) {
              	return x - -1.0;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  code = x - (-1.0d0)
              end function
              
              public static double code(double x, double y, double z) {
              	return x - -1.0;
              }
              
              def code(x, y, z):
              	return x - -1.0
              
              function code(x, y, z)
              	return Float64(x - -1.0)
              end
              
              function tmp = code(x, y, z)
              	tmp = x - -1.0;
              end
              
              code[x_, y_, z_] := N[(x - -1.0), $MachinePrecision]
              
              \begin{array}{l}
              
              \\
              x - -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. +-commutativeN/A

                  \[\leadsto x + \color{blue}{1} \]
                2. metadata-evalN/A

                  \[\leadsto x + 1 \cdot \color{blue}{1} \]
                3. fp-cancel-sign-sub-invN/A

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

                  \[\leadsto x - -1 \cdot 1 \]
                5. metadata-evalN/A

                  \[\leadsto x - -1 \]
                6. lower--.f6462.4

                  \[\leadsto x - \color{blue}{-1} \]
              5. Applied rewrites62.4%

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

              Alternative 16: 43.0% accurate, 212.0× speedup?

              \[\begin{array}{l} \\ x \end{array} \]
              (FPCore (x y z) :precision binary64 x)
              double code(double x, double y, double z) {
              	return x;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  code = x
              end function
              
              public static double code(double x, double y, double z) {
              	return x;
              }
              
              def code(x, y, z):
              	return x
              
              function code(x, y, z)
              	return x
              end
              
              function tmp = code(x, y, z)
              	tmp = x;
              end
              
              code[x_, y_, z_] := x
              
              \begin{array}{l}
              
              \\
              x
              \end{array}
              
              Derivation
              1. Initial program 99.9%

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

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

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

                Reproduce

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