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

Percentage Accurate: 99.9% → 99.9%
Time: 9.0s
Alternatives: 12
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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 12 alternatives:

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

Initial Program: 99.9% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \left(x + \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} \\ \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}
Derivation
  1. Initial program 99.9%

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

Alternative 2: 80.7% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := \left(x + \sin y\right) + z \cdot \cos y\\ \mathbf{if}\;t\_0 \leq -500000000000:\\ \;\;\;\;z + x\\ \mathbf{elif}\;t\_0 \leq -0.02:\\ \;\;\;\;\sin y\\ \mathbf{elif}\;t\_0 \leq 0.0005:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot y, y, 1\right), y, z + x\right)\\ \mathbf{elif}\;t\_0 \leq 1:\\ \;\;\;\;\sin y\\ \mathbf{else}:\\ \;\;\;\;z + x\\ \end{array} \end{array} \]
(FPCore (x y z)
 :precision binary64
 (let* ((t_0 (+ (+ x (sin y)) (* z (cos y)))))
   (if (<= t_0 -500000000000.0)
     (+ z x)
     (if (<= t_0 -0.02)
       (sin y)
       (if (<= t_0 0.0005)
         (fma (fma (* -0.16666666666666666 y) y 1.0) y (+ z x))
         (if (<= t_0 1.0) (sin y) (+ z x)))))))
double code(double x, double y, double z) {
	double t_0 = (x + sin(y)) + (z * cos(y));
	double tmp;
	if (t_0 <= -500000000000.0) {
		tmp = z + x;
	} else if (t_0 <= -0.02) {
		tmp = sin(y);
	} else if (t_0 <= 0.0005) {
		tmp = fma(fma((-0.16666666666666666 * y), y, 1.0), y, (z + x));
	} else if (t_0 <= 1.0) {
		tmp = sin(y);
	} else {
		tmp = z + x;
	}
	return tmp;
}
function code(x, y, z)
	t_0 = Float64(Float64(x + sin(y)) + Float64(z * cos(y)))
	tmp = 0.0
	if (t_0 <= -500000000000.0)
		tmp = Float64(z + x);
	elseif (t_0 <= -0.02)
		tmp = sin(y);
	elseif (t_0 <= 0.0005)
		tmp = fma(fma(Float64(-0.16666666666666666 * y), y, 1.0), y, Float64(z + x));
	elseif (t_0 <= 1.0)
		tmp = sin(y);
	else
		tmp = Float64(z + x);
	end
	return tmp
end
code[x_, y_, z_] := Block[{t$95$0 = N[(N[(x + N[Sin[y], $MachinePrecision]), $MachinePrecision] + N[(z * N[Cos[y], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$0, -500000000000.0], N[(z + x), $MachinePrecision], If[LessEqual[t$95$0, -0.02], N[Sin[y], $MachinePrecision], If[LessEqual[t$95$0, 0.0005], N[(N[(N[(-0.16666666666666666 * y), $MachinePrecision] * y + 1.0), $MachinePrecision] * y + N[(z + x), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$0, 1.0], N[Sin[y], $MachinePrecision], N[(z + x), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := \left(x + \sin y\right) + z \cdot \cos y\\
\mathbf{if}\;t\_0 \leq -500000000000:\\
\;\;\;\;z + x\\

\mathbf{elif}\;t\_0 \leq -0.02:\\
\;\;\;\;\sin y\\

\mathbf{elif}\;t\_0 \leq 0.0005:\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-0.16666666666666666 \cdot y, y, 1\right), y, z + x\right)\\

\mathbf{elif}\;t\_0 \leq 1:\\
\;\;\;\;\sin y\\

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


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

    1. Initial program 99.9%

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

      \[\leadsto \color{blue}{x + z} \]
    4. Step-by-step derivation
      1. Applied rewrites73.8%

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

      if -5e11 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < -0.0200000000000000004 or 5.0000000000000001e-4 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 1

      1. Initial program 99.9%

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

        \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
      4. Step-by-step derivation
        1. Applied rewrites95.6%

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

          \[\leadsto \sin y \]
        3. Step-by-step derivation
          1. Applied rewrites92.5%

            \[\leadsto \sin y \]

          if -0.0200000000000000004 < (+.f64 (+.f64 x (sin.f64 y)) (*.f64 z (cos.f64 y))) < 5.0000000000000001e-4

          1. Initial program 100.0%

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

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

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

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

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

            Alternative 3: 95.1% accurate, 1.0× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.75 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(\cos y, z, x\right)\\ \mathbf{elif}\;x \leq 1.65 \cdot 10^{-6}:\\ \;\;\;\;\mathsf{fma}\left(\cos y, z, \sin y\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\cos y, \frac{z}{x}, 1\right) \cdot x\\ \end{array} \end{array} \]
            (FPCore (x y z)
             :precision binary64
             (if (<= x -1.75e-54)
               (fma (cos y) z x)
               (if (<= x 1.65e-6)
                 (fma (cos y) z (sin y))
                 (* (fma (cos y) (/ z x) 1.0) x))))
            double code(double x, double y, double z) {
            	double tmp;
            	if (x <= -1.75e-54) {
            		tmp = fma(cos(y), z, x);
            	} else if (x <= 1.65e-6) {
            		tmp = fma(cos(y), z, sin(y));
            	} else {
            		tmp = fma(cos(y), (z / x), 1.0) * x;
            	}
            	return tmp;
            }
            
            function code(x, y, z)
            	tmp = 0.0
            	if (x <= -1.75e-54)
            		tmp = fma(cos(y), z, x);
            	elseif (x <= 1.65e-6)
            		tmp = fma(cos(y), z, sin(y));
            	else
            		tmp = Float64(fma(cos(y), Float64(z / x), 1.0) * x);
            	end
            	return tmp
            end
            
            code[x_, y_, z_] := If[LessEqual[x, -1.75e-54], N[(N[Cos[y], $MachinePrecision] * z + x), $MachinePrecision], If[LessEqual[x, 1.65e-6], N[(N[Cos[y], $MachinePrecision] * z + N[Sin[y], $MachinePrecision]), $MachinePrecision], N[(N[(N[Cos[y], $MachinePrecision] * N[(z / x), $MachinePrecision] + 1.0), $MachinePrecision] * x), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;x \leq -1.75 \cdot 10^{-54}:\\
            \;\;\;\;\mathsf{fma}\left(\cos y, z, x\right)\\
            
            \mathbf{elif}\;x \leq 1.65 \cdot 10^{-6}:\\
            \;\;\;\;\mathsf{fma}\left(\cos y, z, \sin y\right)\\
            
            \mathbf{else}:\\
            \;\;\;\;\mathsf{fma}\left(\cos y, \frac{z}{x}, 1\right) \cdot x\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if x < -1.74999999999999991e-54

              1. Initial program 100.0%

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(\cos y, z, x\right) \]
                  3. Step-by-step derivation
                    1. Applied rewrites97.4%

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

                    if -1.74999999999999991e-54 < x < 1.65000000000000008e-6

                    1. Initial program 99.9%

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

                      \[\leadsto \color{blue}{\sin y + z \cdot \cos y} \]
                    4. Step-by-step derivation
                      1. Applied rewrites96.2%

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

                      if 1.65000000000000008e-6 < x

                      1. Initial program 99.9%

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(\cos y, \frac{z}{x}, 1\right) \cdot x \]
                          4. Recombined 3 regimes into one program.
                          5. Final simplification97.5%

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

                          Alternative 4: 84.0% accurate, 1.7× speedup?

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

                            1. Initial program 99.8%

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

                              \[\leadsto \color{blue}{z \cdot \cos y} \]
                            4. Step-by-step derivation
                              1. Applied rewrites83.2%

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

                              if -2.65e13 < z < 1.7000000000000001e-38

                              1. Initial program 100.0%

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

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

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

                                if 1.7000000000000001e-38 < z < 6.20000000000000033e104

                                1. Initial program 99.9%

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

                                  \[\leadsto \color{blue}{x + z} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites85.2%

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

                                Alternative 5: 95.1% accurate, 1.8× speedup?

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

                                  1. Initial program 99.8%

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

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

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

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

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

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

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

                                        if -1.55e-6 < z < 1.7000000000000001e-38

                                        1. Initial program 100.0%

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

                                          \[\leadsto \color{blue}{x + \sin y} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites95.1%

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

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

                                        Alternative 6: 95.1% accurate, 1.8× speedup?

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

                                          1. Initial program 99.8%

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

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

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

                                            if -1.55e-6 < z < 1.7000000000000001e-38

                                            1. Initial program 100.0%

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

                                              \[\leadsto \color{blue}{x + \sin y} \]
                                            4. Step-by-step derivation
                                              1. Applied rewrites95.1%

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

                                              if 1.7000000000000001e-38 < z

                                              1. Initial program 99.9%

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\cos y, z, x\right) \]
                                                  4. Recombined 3 regimes into one program.
                                                  5. Final simplification97.4%

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

                                                  Alternative 7: 80.1% accurate, 1.8× speedup?

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

                                                    1. Initial program 99.8%

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

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

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

                                                      if -0.28000000000000003 < y < 2.9999999999999999e-7

                                                      1. Initial program 100.0%

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

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

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

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

                                                      Alternative 8: 70.0% accurate, 6.4× speedup?

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

                                                        1. Initial program 99.8%

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

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

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

                                                          if -1.3e17 < y < 42

                                                          1. Initial program 100.0%

                                                            \[\left(x + \sin y\right) + z \cdot \cos y \]
                                                          2. Add Preprocessing
                                                          3. 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)} \]
                                                          4. Step-by-step derivation
                                                            1. Applied rewrites97.1%

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

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

                                                          Alternative 9: 70.0% accurate, 11.1× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+14} \lor \neg \left(y \leq 8100000000\right):\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) + z\\ \end{array} \end{array} \]
                                                          (FPCore (x y z)
                                                           :precision binary64
                                                           (if (or (<= y -1.65e+14) (not (<= y 8100000000.0))) (+ z x) (+ (+ y x) z)))
                                                          double code(double x, double y, double z) {
                                                          	double tmp;
                                                          	if ((y <= -1.65e+14) || !(y <= 8100000000.0)) {
                                                          		tmp = z + x;
                                                          	} else {
                                                          		tmp = (y + 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 <= (-1.65d+14)) .or. (.not. (y <= 8100000000.0d0))) then
                                                                  tmp = z + x
                                                              else
                                                                  tmp = (y + x) + z
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z) {
                                                          	double tmp;
                                                          	if ((y <= -1.65e+14) || !(y <= 8100000000.0)) {
                                                          		tmp = z + x;
                                                          	} else {
                                                          		tmp = (y + x) + z;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z):
                                                          	tmp = 0
                                                          	if (y <= -1.65e+14) or not (y <= 8100000000.0):
                                                          		tmp = z + x
                                                          	else:
                                                          		tmp = (y + x) + z
                                                          	return tmp
                                                          
                                                          function code(x, y, z)
                                                          	tmp = 0.0
                                                          	if ((y <= -1.65e+14) || !(y <= 8100000000.0))
                                                          		tmp = Float64(z + x);
                                                          	else
                                                          		tmp = Float64(Float64(y + x) + z);
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z)
                                                          	tmp = 0.0;
                                                          	if ((y <= -1.65e+14) || ~((y <= 8100000000.0)))
                                                          		tmp = z + x;
                                                          	else
                                                          		tmp = (y + x) + z;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_] := If[Or[LessEqual[y, -1.65e+14], N[Not[LessEqual[y, 8100000000.0]], $MachinePrecision]], N[(z + x), $MachinePrecision], N[(N[(y + x), $MachinePrecision] + z), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;y \leq -1.65 \cdot 10^{+14} \lor \neg \left(y \leq 8100000000\right):\\
                                                          \;\;\;\;z + x\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;\left(y + x\right) + z\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if y < -1.65e14 or 8.1e9 < y

                                                            1. Initial program 99.8%

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

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

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

                                                              if -1.65e14 < y < 8.1e9

                                                              1. Initial program 100.0%

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

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

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

                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{+14} \lor \neg \left(y \leq 8100000000\right):\\ \;\;\;\;z + x\\ \mathbf{else}:\\ \;\;\;\;\left(y + x\right) + z\\ \end{array} \]
                                                              7. Add Preprocessing

                                                              Alternative 10: 53.7% accurate, 16.3× speedup?

                                                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -5.9 \cdot 10^{-61}:\\ \;\;\;\;x\\ \mathbf{elif}\;x \leq 8 \cdot 10^{+52}:\\ \;\;\;\;z\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                                              (FPCore (x y z)
                                                               :precision binary64
                                                               (if (<= x -5.9e-61) x (if (<= x 8e+52) z x)))
                                                              double code(double x, double y, double z) {
                                                              	double tmp;
                                                              	if (x <= -5.9e-61) {
                                                              		tmp = x;
                                                              	} else if (x <= 8e+52) {
                                                              		tmp = z;
                                                              	} else {
                                                              		tmp = 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 (x <= (-5.9d-61)) then
                                                                      tmp = x
                                                                  else if (x <= 8d+52) then
                                                                      tmp = z
                                                                  else
                                                                      tmp = x
                                                                  end if
                                                                  code = tmp
                                                              end function
                                                              
                                                              public static double code(double x, double y, double z) {
                                                              	double tmp;
                                                              	if (x <= -5.9e-61) {
                                                              		tmp = x;
                                                              	} else if (x <= 8e+52) {
                                                              		tmp = z;
                                                              	} else {
                                                              		tmp = x;
                                                              	}
                                                              	return tmp;
                                                              }
                                                              
                                                              def code(x, y, z):
                                                              	tmp = 0
                                                              	if x <= -5.9e-61:
                                                              		tmp = x
                                                              	elif x <= 8e+52:
                                                              		tmp = z
                                                              	else:
                                                              		tmp = x
                                                              	return tmp
                                                              
                                                              function code(x, y, z)
                                                              	tmp = 0.0
                                                              	if (x <= -5.9e-61)
                                                              		tmp = x;
                                                              	elseif (x <= 8e+52)
                                                              		tmp = z;
                                                              	else
                                                              		tmp = x;
                                                              	end
                                                              	return tmp
                                                              end
                                                              
                                                              function tmp_2 = code(x, y, z)
                                                              	tmp = 0.0;
                                                              	if (x <= -5.9e-61)
                                                              		tmp = x;
                                                              	elseif (x <= 8e+52)
                                                              		tmp = z;
                                                              	else
                                                              		tmp = x;
                                                              	end
                                                              	tmp_2 = tmp;
                                                              end
                                                              
                                                              code[x_, y_, z_] := If[LessEqual[x, -5.9e-61], x, If[LessEqual[x, 8e+52], z, x]]
                                                              
                                                              \begin{array}{l}
                                                              
                                                              \\
                                                              \begin{array}{l}
                                                              \mathbf{if}\;x \leq -5.9 \cdot 10^{-61}:\\
                                                              \;\;\;\;x\\
                                                              
                                                              \mathbf{elif}\;x \leq 8 \cdot 10^{+52}:\\
                                                              \;\;\;\;z\\
                                                              
                                                              \mathbf{else}:\\
                                                              \;\;\;\;x\\
                                                              
                                                              
                                                              \end{array}
                                                              \end{array}
                                                              
                                                              Derivation
                                                              1. Split input into 2 regimes
                                                              2. if x < -5.89999999999999972e-61 or 7.9999999999999999e52 < x

                                                                1. Initial program 99.9%

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

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

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

                                                                  if -5.89999999999999972e-61 < x < 7.9999999999999999e52

                                                                  1. Initial program 99.9%

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

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

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

                                                                      \[\leadsto z \]
                                                                    3. Step-by-step derivation
                                                                      1. Applied rewrites38.7%

                                                                        \[\leadsto z \]
                                                                    4. Recombined 2 regimes into one program.
                                                                    5. Add Preprocessing

                                                                    Alternative 11: 65.8% accurate, 53.0× speedup?

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

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

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

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

                                                                      Alternative 12: 42.3% 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 + \sin y\right) + z \cdot \cos y \]
                                                                      2. Add Preprocessing
                                                                      3. Taylor expanded in x around inf

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

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

                                                                        Reproduce

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