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

Percentage Accurate: 99.9% → 99.9%
Time: 3.9s
Alternatives: 11
Speedup: 1.0×

Specification

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

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

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 11 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

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

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

Alternative 1: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\cos y, z, \sin y + x\right) \end{array} \]
(FPCore (x y z) :precision binary64 (fma (cos y) z (+ (sin y) x)))
double code(double x, double y, double z) {
	return fma(cos(y), z, (sin(y) + x));
}
function code(x, y, z)
	return fma(cos(y), z, Float64(sin(y) + x))
end
code[x_, y_, z_] := N[(N[Cos[y], $MachinePrecision] * z + N[(N[Sin[y], $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -4.4 \cdot 10^{-209}:\\ \;\;\;\;\left(\sin y + z\right) + x\\ \mathbf{elif}\;x \leq 220000000:\\ \;\;\;\;\mathsf{fma}\left(\cos y, z, \sin y\right)\\ \mathbf{else}:\\ \;\;\;\;x + z\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (if (<= x -4.4e-209)
   (+ (+ (sin y) z) x)
   (if (<= x 220000000.0) (fma (cos y) z (sin y)) (+ x z))))
double code(double x, double y, double z) {
	double tmp;
	if (x <= -4.4e-209) {
		tmp = (sin(y) + z) + x;
	} else if (x <= 220000000.0) {
		tmp = fma(cos(y), z, sin(y));
	} else {
		tmp = x + z;
	}
	return tmp;
}
function code(x, y, z)
	tmp = 0.0
	if (x <= -4.4e-209)
		tmp = Float64(Float64(sin(y) + z) + x);
	elseif (x <= 220000000.0)
		tmp = fma(cos(y), z, sin(y));
	else
		tmp = Float64(x + z);
	end
	return tmp
end
code[x_, y_, z_] := If[LessEqual[x, -4.4e-209], N[(N[(N[Sin[y], $MachinePrecision] + z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[x, 220000000.0], N[(N[Cos[y], $MachinePrecision] * z + N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(x + z), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -4.4 \cdot 10^{-209}:\\
\;\;\;\;\left(\sin y + z\right) + x\\

\mathbf{elif}\;x \leq 220000000:\\
\;\;\;\;\mathsf{fma}\left(\cos y, z, \sin y\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -4.40000000000000019e-209

    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

      if -4.40000000000000019e-209 < x < 2.2e8

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\cos y, z, \color{blue}{\sin y}\right) \]
      5. Step-by-step derivation
        1. lower-sin.f6458.8

          \[\leadsto \mathsf{fma}\left(\cos y, z, \sin y\right) \]
      6. Applied rewrites58.8%

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

      if 2.2e8 < x

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{x + z} \]
      3. Step-by-step derivation
        1. lower-+.f6466.3

          \[\leadsto x + \color{blue}{z} \]
      4. Applied rewrites66.3%

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

    Alternative 3: 87.0% accurate, 1.5× speedup?

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

      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\mathsf{fma}\left(\cos y, z, x\right)} + y \]
        3. Applied rewrites71.2%

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

        if -9.4000000000000004e73 < z < 9.5000000000000008e46

        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

        Alternative 4: 85.1% accurate, 1.7× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+194}:\\ \;\;\;\;z \cdot \cos y + y\\ \mathbf{else}:\\ \;\;\;\;\left(\sin y + z\right) + x\\ \end{array} \end{array} \]
        (FPCore (x y z)
         :precision binary64
         (if (<= z -2.15e+194) (+ (* z (cos y)) y) (+ (+ (sin y) z) x)))
        double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -2.15e+194) {
        		tmp = (z * cos(y)) + y;
        	} else {
        		tmp = (sin(y) + z) + x;
        	}
        	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 <= (-2.15d+194)) then
                tmp = (z * cos(y)) + y
            else
                tmp = (sin(y) + z) + x
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z) {
        	double tmp;
        	if (z <= -2.15e+194) {
        		tmp = (z * Math.cos(y)) + y;
        	} else {
        		tmp = (Math.sin(y) + z) + x;
        	}
        	return tmp;
        }
        
        def code(x, y, z):
        	tmp = 0
        	if z <= -2.15e+194:
        		tmp = (z * math.cos(y)) + y
        	else:
        		tmp = (math.sin(y) + z) + x
        	return tmp
        
        function code(x, y, z)
        	tmp = 0.0
        	if (z <= -2.15e+194)
        		tmp = Float64(Float64(z * cos(y)) + y);
        	else
        		tmp = Float64(Float64(sin(y) + z) + x);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z)
        	tmp = 0.0;
        	if (z <= -2.15e+194)
        		tmp = (z * cos(y)) + y;
        	else
        		tmp = (sin(y) + z) + x;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_] := If[LessEqual[z, -2.15e+194], N[(N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision] + y), $MachinePrecision], N[(N[(N[Sin[y], $MachinePrecision] + z), $MachinePrecision] + x), $MachinePrecision]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;z \leq -2.15 \cdot 10^{+194}:\\
        \;\;\;\;z \cdot \cos y + y\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(\sin y + z\right) + x\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if z < -2.14999999999999997e194

          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\cos y, z, x\right)} + y \]
            3. Applied rewrites71.2%

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

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

                \[\leadsto z \cdot \color{blue}{\cos y} + y \]
              2. lower-cos.f6439.1

                \[\leadsto z \cdot \cos y + y \]
            6. Applied rewrites39.1%

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

            if -2.14999999999999997e194 < z

            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

            Alternative 5: 82.7% accurate, 1.9× speedup?

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\left(\sin y + z\right) + x} \]
              4. Add Preprocessing

              Alternative 6: 80.7% accurate, 1.7× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \color{blue}{\mathsf{fma}\left(\cos y, z, x\right)} + y \]
                  3. Applied rewrites71.2%

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

                    \[\leadsto \color{blue}{x + \sin y} \]
                  5. Step-by-step derivation
                    1. lower-+.f64N/A

                      \[\leadsto x + \color{blue}{\sin y} \]
                    2. lower-sin.f6458.7

                      \[\leadsto x + \sin y \]
                  6. Applied rewrites58.7%

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

                  if -2.20000000000000002e24 < y < 8.39999999999999978e-8

                  1. Initial program 99.9%

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

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

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

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

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

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

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

                      \[\leadsto x + \left(z + y \cdot \left(1 + -0.5 \cdot \left(y \cdot \color{blue}{z}\right)\right)\right) \]
                  4. Applied rewrites57.7%

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

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

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

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

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

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

                      \[\leadsto \left(y \cdot \left(1 + \frac{-1}{2} \cdot \left(y \cdot z\right)\right) + z\right) + x \]
                    7. distribute-lft-inN/A

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

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

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

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

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

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

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

                      \[\leadsto y + \left(\left(y \cdot \left(\frac{-1}{2} \cdot \left(y \cdot z\right)\right) + z\right) + x\right) \]
                    15. lift-*.f64N/A

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

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

                      \[\leadsto y + \left(\left(\left(y \cdot \left(\frac{-1}{2} \cdot y\right)\right) \cdot z + z\right) + x\right) \]
                    18. distribute-lft1-inN/A

                      \[\leadsto y + \left(\left(y \cdot \left(\frac{-1}{2} \cdot y\right) + 1\right) \cdot z + x\right) \]
                  6. Applied rewrites57.0%

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

                Alternative 7: 70.7% accurate, 3.0× speedup?

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

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{x + z} \]
                  3. Step-by-step derivation
                    1. lower-+.f6466.3

                      \[\leadsto x + \color{blue}{z} \]
                  4. Applied rewrites66.3%

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

                  if -7.7999999999999996e65 < y < 3.40000000000000001e56

                  1. Initial program 99.9%

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

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

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

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

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

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

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

                      \[\leadsto x + \left(z + y \cdot \left(1 + -0.5 \cdot \left(y \cdot \color{blue}{z}\right)\right)\right) \]
                  4. Applied rewrites57.7%

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

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

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

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

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

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

                      \[\leadsto \left(y \cdot \left(1 + \frac{-1}{2} \cdot \left(y \cdot z\right)\right) + z\right) + x \]
                    7. distribute-lft-inN/A

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

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

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

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

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

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

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

                      \[\leadsto y + \left(\left(y \cdot \left(\frac{-1}{2} \cdot \left(y \cdot z\right)\right) + z\right) + x\right) \]
                    15. lift-*.f64N/A

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

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

                      \[\leadsto y + \left(\left(\left(y \cdot \left(\frac{-1}{2} \cdot y\right)\right) \cdot z + z\right) + x\right) \]
                    18. distribute-lft1-inN/A

                      \[\leadsto y + \left(\left(y \cdot \left(\frac{-1}{2} \cdot y\right) + 1\right) \cdot z + x\right) \]
                  6. Applied rewrites57.0%

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

                Alternative 8: 70.0% accurate, 5.2× speedup?

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

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{x + z} \]
                  3. Step-by-step derivation
                    1. lower-+.f6466.3

                      \[\leadsto x + \color{blue}{z} \]
                  4. Applied rewrites66.3%

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

                  if -2.5000000000000002e68 < y < 1.75e40

                  1. Initial program 99.9%

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

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

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

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

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

                Alternative 9: 66.3% accurate, 19.6× speedup?

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

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

                  \[\leadsto \color{blue}{x + z} \]
                3. Step-by-step derivation
                  1. lower-+.f6466.3

                    \[\leadsto x + \color{blue}{z} \]
                4. Applied rewrites66.3%

                  \[\leadsto \color{blue}{x + z} \]
                5. Add Preprocessing

                Alternative 10: 47.8% accurate, 6.4× speedup?

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

                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{x + z} \]
                  3. Step-by-step derivation
                    1. lower-+.f6466.3

                      \[\leadsto x + \color{blue}{z} \]
                  4. Applied rewrites66.3%

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

                    \[\leadsto z \]
                  6. Step-by-step derivation
                    1. Applied rewrites26.3%

                      \[\leadsto z \]

                    if -1.70000000000000002e-45 < z < 1.3000000000000001e-40

                    1. Initial program 99.9%

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

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

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

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

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

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

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

                        \[\leadsto x + \left(z + y \cdot \left(1 + -0.5 \cdot \left(y \cdot \color{blue}{z}\right)\right)\right) \]
                    4. Applied rewrites57.7%

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

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

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

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

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

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

                      \[\leadsto x + \color{blue}{y} \]
                    9. Step-by-step derivation
                      1. lower-+.f6438.6

                        \[\leadsto x + y \]
                    10. Applied rewrites38.6%

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

                  Alternative 11: 26.3% accurate, 73.1× speedup?

                  \[\begin{array}{l} \\ z \end{array} \]
                  (FPCore (x y z) :precision binary64 z)
                  double code(double x, double y, double z) {
                  	return z;
                  }
                  
                  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 = z
                  end function
                  
                  public static double code(double x, double y, double z) {
                  	return z;
                  }
                  
                  def code(x, y, z):
                  	return z
                  
                  function code(x, y, z)
                  	return z
                  end
                  
                  function tmp = code(x, y, z)
                  	tmp = z;
                  end
                  
                  code[x_, y_, z_] := z
                  
                  \begin{array}{l}
                  
                  \\
                  z
                  \end{array}
                  
                  Derivation
                  1. Initial program 99.9%

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

                    \[\leadsto \color{blue}{x + z} \]
                  3. Step-by-step derivation
                    1. lower-+.f6466.3

                      \[\leadsto x + \color{blue}{z} \]
                  4. Applied rewrites66.3%

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

                    \[\leadsto z \]
                  6. Step-by-step derivation
                    1. Applied rewrites26.3%

                      \[\leadsto z \]
                    2. Add Preprocessing

                    Reproduce

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