Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3

Percentage Accurate: 97.0% → 99.0%
Time: 7.2s
Alternatives: 12
Speedup: 0.3×

Specification

?
\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
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, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\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: 97.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))
double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
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, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x - ((y - z) / (((t - z) + 1.0d0) / a))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x - ((y - z) / (((t - z) + 1.0) / a));
}
def code(x, y, z, t, a):
	return x - ((y - z) / (((t - z) + 1.0) / a))
function code(x, y, z, t, a)
	return Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) + 1.0) / a)))
end
function tmp = code(x, y, z, t, a)
	tmp = x - ((y - z) / (((t - z) + 1.0) / a));
end
code[x_, y_, z_, t_, a_] := N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}}
\end{array}

Alternative 1: 99.0% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{\frac{\left(t - z\right) - -1}{a}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-56} \lor \neg \left(t\_1 \leq 5 \cdot 10^{-236}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(y - z, \frac{a}{\mathsf{fma}\left(t - z, x, x\right)}, -1\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (/ (- y z) (/ (- (- t z) -1.0) a)))))
   (if (or (<= t_1 -1e-56) (not (<= t_1 5e-236)))
     t_1
     (* (- x) (fma (- y z) (/ a (fma (- t z) x x)) -1.0)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - ((y - z) / (((t - z) - -1.0) / a));
	double tmp;
	if ((t_1 <= -1e-56) || !(t_1 <= 5e-236)) {
		tmp = t_1;
	} else {
		tmp = -x * fma((y - z), (a / fma((t - z), x, x)), -1.0);
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(y - z) / Float64(Float64(Float64(t - z) - -1.0) / a)))
	tmp = 0.0
	if ((t_1 <= -1e-56) || !(t_1 <= 5e-236))
		tmp = t_1;
	else
		tmp = Float64(Float64(-x) * fma(Float64(y - z), Float64(a / fma(Float64(t - z), x, x)), -1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] - -1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-56], N[Not[LessEqual[t$95$1, 5e-236]], $MachinePrecision]], t$95$1, N[((-x) * N[(N[(y - z), $MachinePrecision] * N[(a / N[(N[(t - z), $MachinePrecision] * x + x), $MachinePrecision]), $MachinePrecision] + -1.0), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y - z}{\frac{\left(t - z\right) - -1}{a}}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-56} \lor \neg \left(t\_1 \leq 5 \cdot 10^{-236}\right):\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\left(-x\right) \cdot \mathsf{fma}\left(y - z, \frac{a}{\mathsf{fma}\left(t - z, x, x\right)}, -1\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))) < -1e-56 or 4.9999999999999998e-236 < (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)))

    1. Initial program 99.9%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing

    if -1e-56 < (-.f64 x (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))) < 4.9999999999999998e-236

    1. Initial program 69.0%

      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

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

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

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

    Alternative 2: 98.2% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - z}{\frac{\left(t - z\right) - -1}{a}}\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-127} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;x - t\_1\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (/ (- y z) (/ (- (- t z) -1.0) a))))
       (if (or (<= t_1 -5e-127) (not (<= t_1 0.0)))
         (- x t_1)
         (fma (/ z (- (+ 1.0 t) z)) a x))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y - z) / (((t - z) - -1.0) / a);
    	double tmp;
    	if ((t_1 <= -5e-127) || !(t_1 <= 0.0)) {
    		tmp = x - t_1;
    	} else {
    		tmp = fma((z / ((1.0 + t) - z)), a, x);
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y - z) / Float64(Float64(Float64(t - z) - -1.0) / a))
    	tmp = 0.0
    	if ((t_1 <= -5e-127) || !(t_1 <= 0.0))
    		tmp = Float64(x - t_1);
    	else
    		tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - z), $MachinePrecision] / N[(N[(N[(t - z), $MachinePrecision] - -1.0), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -5e-127], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(x - t$95$1), $MachinePrecision], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{y - z}{\frac{\left(t - z\right) - -1}{a}}\\
    \mathbf{if}\;t\_1 \leq -5 \cdot 10^{-127} \lor \neg \left(t\_1 \leq 0\right):\\
    \;\;\;\;x - t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -4.9999999999999997e-127 or -0.0 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a))

      1. Initial program 99.8%

        \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
      2. Add Preprocessing

      if -4.9999999999999997e-127 < (/.f64 (-.f64 y z) (/.f64 (+.f64 (-.f64 t z) #s(literal 1 binary64)) a)) < -0.0

      1. Initial program 88.6%

        \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
      2. Add Preprocessing
      3. Taylor expanded in y around 0

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
      5. Recombined 2 regimes into one program.
      6. Final simplification99.1%

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

      Alternative 3: 88.6% accurate, 1.0× speedup?

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

        1. Initial program 92.6%

          \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
        2. Add Preprocessing
        3. Taylor expanded in y around 0

          \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{\left(1 + t\right) - z}} \]
        4. Step-by-step derivation
          1. Applied rewrites89.4%

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

          if -1.4e-14 < z < 3.80000000000000011e-23

          1. Initial program 99.1%

            \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
          2. Add Preprocessing
          3. Taylor expanded in z around 0

            \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
          4. Step-by-step derivation
            1. Applied rewrites96.1%

              \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
          5. Recombined 2 regimes into one program.
          6. Final simplification92.7%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{-14} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
          7. Add Preprocessing

          Alternative 4: 88.0% accurate, 1.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.5 \cdot 10^{-13}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-23}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= z -3.5e-13)
             (- x (* (- y z) (/ a (- 1.0 z))))
             (if (<= z 3.8e-23)
               (- x (* (/ y (+ 1.0 t)) a))
               (fma (/ z (- (+ 1.0 t) z)) a x))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -3.5e-13) {
          		tmp = x - ((y - z) * (a / (1.0 - z)));
          	} else if (z <= 3.8e-23) {
          		tmp = x - ((y / (1.0 + t)) * a);
          	} else {
          		tmp = fma((z / ((1.0 + t) - z)), a, x);
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (z <= -3.5e-13)
          		tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z))));
          	elseif (z <= 3.8e-23)
          		tmp = Float64(x - Float64(Float64(y / Float64(1.0 + t)) * a));
          	else
          		tmp = fma(Float64(z / Float64(Float64(1.0 + t) - z)), a, x);
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.5e-13], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.8e-23], N[(x - N[(N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision], N[(N[(z / N[(N[(1.0 + t), $MachinePrecision] - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -3.5 \cdot 10^{-13}:\\
          \;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\
          
          \mathbf{elif}\;z \leq 3.8 \cdot 10^{-23}:\\
          \;\;\;\;x - \frac{y}{1 + t} \cdot a\\
          
          \mathbf{else}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if z < -3.5000000000000002e-13

            1. Initial program 94.0%

              \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
            2. Add Preprocessing
            3. Taylor expanded in t around 0

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

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

              if -3.5000000000000002e-13 < z < 3.80000000000000011e-23

              1. Initial program 99.1%

                \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
              2. Add Preprocessing
              3. Taylor expanded in z around 0

                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
              4. Step-by-step derivation
                1. Applied rewrites96.1%

                  \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]

                if 3.80000000000000011e-23 < z

                1. Initial program 91.2%

                  \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                2. Add Preprocessing
                3. Taylor expanded in y around 0

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                5. Recombined 3 regimes into one program.
                6. Add Preprocessing

                Alternative 5: 88.2% accurate, 1.0× speedup?

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

                  1. Initial program 92.6%

                    \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                  2. Add Preprocessing
                  3. Taylor expanded in y around 0

                    \[\leadsto \color{blue}{x - -1 \cdot \frac{a \cdot z}{\left(1 + t\right) - z}} \]
                  4. Step-by-step derivation
                    1. Applied rewrites89.4%

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

                      \[\leadsto \mathsf{fma}\left(\frac{z}{t - z}, a, x\right) \]
                    3. Step-by-step derivation
                      1. Applied rewrites87.9%

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

                      if -1.5e-11 < z < 3.80000000000000011e-23

                      1. Initial program 99.1%

                        \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                      2. Add Preprocessing
                      3. Taylor expanded in z around 0

                        \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                      4. Step-by-step derivation
                        1. Applied rewrites96.1%

                          \[\leadsto x - \color{blue}{\frac{y}{1 + t} \cdot a} \]
                      5. Recombined 2 regimes into one program.
                      6. Final simplification92.0%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.5 \cdot 10^{-11} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{1 + t} \cdot a\\ \end{array} \]
                      7. Add Preprocessing

                      Alternative 6: 78.6% accurate, 1.1× speedup?

                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-38} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot a\\ \end{array} \end{array} \]
                      (FPCore (x y z t a)
                       :precision binary64
                       (if (or (<= z -2.3e-38) (not (<= z 3.8e-23)))
                         (fma (/ z (- t z)) a x)
                         (- x (* (- y z) a))))
                      double code(double x, double y, double z, double t, double a) {
                      	double tmp;
                      	if ((z <= -2.3e-38) || !(z <= 3.8e-23)) {
                      		tmp = fma((z / (t - z)), a, x);
                      	} else {
                      		tmp = x - ((y - z) * a);
                      	}
                      	return tmp;
                      }
                      
                      function code(x, y, z, t, a)
                      	tmp = 0.0
                      	if ((z <= -2.3e-38) || !(z <= 3.8e-23))
                      		tmp = fma(Float64(z / Float64(t - z)), a, x);
                      	else
                      		tmp = Float64(x - Float64(Float64(y - z) * a));
                      	end
                      	return tmp
                      end
                      
                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.3e-38], N[Not[LessEqual[z, 3.8e-23]], $MachinePrecision]], N[(N[(z / N[(t - z), $MachinePrecision]), $MachinePrecision] * a + x), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                      
                      \begin{array}{l}
                      
                      \\
                      \begin{array}{l}
                      \mathbf{if}\;z \leq -2.3 \cdot 10^{-38} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\
                      \;\;\;\;\mathsf{fma}\left(\frac{z}{t - z}, a, x\right)\\
                      
                      \mathbf{else}:\\
                      \;\;\;\;x - \left(y - z\right) \cdot a\\
                      
                      
                      \end{array}
                      \end{array}
                      
                      Derivation
                      1. Split input into 2 regimes
                      2. if z < -2.30000000000000002e-38 or 3.80000000000000011e-23 < z

                        1. Initial program 92.1%

                          \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                        2. Add Preprocessing
                        3. Taylor expanded in y around 0

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{z}{t - z}, a, x\right) \]
                          3. Step-by-step derivation
                            1. Applied rewrites87.6%

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

                            if -2.30000000000000002e-38 < z < 3.80000000000000011e-23

                            1. Initial program 99.8%

                              \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                            2. Add Preprocessing
                            3. Taylor expanded in t around 0

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

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

                                \[\leadsto x - \left(y - z\right) \cdot a \]
                              3. Step-by-step derivation
                                1. Applied rewrites81.1%

                                  \[\leadsto x - \left(y - z\right) \cdot a \]
                              4. Recombined 2 regimes into one program.
                              5. Final simplification84.5%

                                \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{-38} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{t - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot a\\ \end{array} \]
                              6. Add Preprocessing

                              Alternative 7: 74.1% accurate, 1.1× speedup?

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

                                1. Initial program 92.1%

                                  \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                2. Add Preprocessing
                                3. Taylor expanded in y around 0

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

                                    \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{z}{\left(1 + t\right) - z}, a, x\right)} \]
                                  2. Taylor expanded in t around 0

                                    \[\leadsto \mathsf{fma}\left(\frac{z}{1 - z}, a, x\right) \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites79.2%

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

                                    if -4.10000000000000026e-35 < z < 3.80000000000000011e-23

                                    1. Initial program 99.8%

                                      \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                    2. Add Preprocessing
                                    3. Taylor expanded in t around 0

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

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

                                        \[\leadsto x - \left(y - z\right) \cdot a \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites81.1%

                                          \[\leadsto x - \left(y - z\right) \cdot a \]
                                      4. Recombined 2 regimes into one program.
                                      5. Final simplification80.1%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{-35} \lor \neg \left(z \leq 3.8 \cdot 10^{-23}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{z}{1 - z}, a, x\right)\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot a\\ \end{array} \]
                                      6. Add Preprocessing

                                      Alternative 8: 73.5% accurate, 1.5× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot a\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a)
                                       :precision binary64
                                       (if (or (<= z -4.4e-35) (not (<= z 1.7e-22))) (- x a) (- x (* (- y z) a))))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22)) {
                                      		tmp = x - a;
                                      	} else {
                                      		tmp = x - ((y - z) * a);
                                      	}
                                      	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, t, a)
                                      use fmin_fmax_functions
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          real(8), intent (in) :: z
                                          real(8), intent (in) :: t
                                          real(8), intent (in) :: a
                                          real(8) :: tmp
                                          if ((z <= (-4.4d-35)) .or. (.not. (z <= 1.7d-22))) then
                                              tmp = x - a
                                          else
                                              tmp = x - ((y - z) * a)
                                          end if
                                          code = tmp
                                      end function
                                      
                                      public static double code(double x, double y, double z, double t, double a) {
                                      	double tmp;
                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22)) {
                                      		tmp = x - a;
                                      	} else {
                                      		tmp = x - ((y - z) * a);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a):
                                      	tmp = 0
                                      	if (z <= -4.4e-35) or not (z <= 1.7e-22):
                                      		tmp = x - a
                                      	else:
                                      		tmp = x - ((y - z) * a)
                                      	return tmp
                                      
                                      function code(x, y, z, t, a)
                                      	tmp = 0.0
                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22))
                                      		tmp = Float64(x - a);
                                      	else
                                      		tmp = Float64(x - Float64(Float64(y - z) * a));
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a)
                                      	tmp = 0.0;
                                      	if ((z <= -4.4e-35) || ~((z <= 1.7e-22)))
                                      		tmp = x - a;
                                      	else
                                      		tmp = x - ((y - z) * a);
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e-35], N[Not[LessEqual[z, 1.7e-22]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(N[(y - z), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\
                                      \;\;\;\;x - a\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;x - \left(y - z\right) \cdot a\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if z < -4.39999999999999987e-35 or 1.6999999999999999e-22 < z

                                        1. Initial program 92.0%

                                          \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                        2. Add Preprocessing
                                        3. Taylor expanded in z around inf

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

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

                                          if -4.39999999999999987e-35 < z < 1.6999999999999999e-22

                                          1. Initial program 99.8%

                                            \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                          2. Add Preprocessing
                                          3. Taylor expanded in t around 0

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

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

                                              \[\leadsto x - \left(y - z\right) \cdot a \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites81.4%

                                                \[\leadsto x - \left(y - z\right) \cdot a \]
                                            4. Recombined 2 regimes into one program.
                                            5. Final simplification79.4%

                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - \left(y - z\right) \cdot a\\ \end{array} \]
                                            6. Add Preprocessing

                                            Alternative 9: 63.9% accurate, 1.6× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-69}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq -4.1 \cdot 10^{-147}:\\ \;\;\;\;\left(-a\right) \cdot y\\ \mathbf{elif}\;z \leq 10^{-11}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a)
                                             :precision binary64
                                             (if (<= z -6.4e-69)
                                               (- x a)
                                               (if (<= z -4.1e-147) (* (- a) y) (if (<= z 1e-11) x (- x a)))))
                                            double code(double x, double y, double z, double t, double a) {
                                            	double tmp;
                                            	if (z <= -6.4e-69) {
                                            		tmp = x - a;
                                            	} else if (z <= -4.1e-147) {
                                            		tmp = -a * y;
                                            	} else if (z <= 1e-11) {
                                            		tmp = x;
                                            	} else {
                                            		tmp = x - a;
                                            	}
                                            	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, t, a)
                                            use fmin_fmax_functions
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8), intent (in) :: a
                                                real(8) :: tmp
                                                if (z <= (-6.4d-69)) then
                                                    tmp = x - a
                                                else if (z <= (-4.1d-147)) then
                                                    tmp = -a * y
                                                else if (z <= 1d-11) then
                                                    tmp = x
                                                else
                                                    tmp = x - a
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a) {
                                            	double tmp;
                                            	if (z <= -6.4e-69) {
                                            		tmp = x - a;
                                            	} else if (z <= -4.1e-147) {
                                            		tmp = -a * y;
                                            	} else if (z <= 1e-11) {
                                            		tmp = x;
                                            	} else {
                                            		tmp = x - a;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a):
                                            	tmp = 0
                                            	if z <= -6.4e-69:
                                            		tmp = x - a
                                            	elif z <= -4.1e-147:
                                            		tmp = -a * y
                                            	elif z <= 1e-11:
                                            		tmp = x
                                            	else:
                                            		tmp = x - a
                                            	return tmp
                                            
                                            function code(x, y, z, t, a)
                                            	tmp = 0.0
                                            	if (z <= -6.4e-69)
                                            		tmp = Float64(x - a);
                                            	elseif (z <= -4.1e-147)
                                            		tmp = Float64(Float64(-a) * y);
                                            	elseif (z <= 1e-11)
                                            		tmp = x;
                                            	else
                                            		tmp = Float64(x - a);
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a)
                                            	tmp = 0.0;
                                            	if (z <= -6.4e-69)
                                            		tmp = x - a;
                                            	elseif (z <= -4.1e-147)
                                            		tmp = -a * y;
                                            	elseif (z <= 1e-11)
                                            		tmp = x;
                                            	else
                                            		tmp = x - a;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.4e-69], N[(x - a), $MachinePrecision], If[LessEqual[z, -4.1e-147], N[((-a) * y), $MachinePrecision], If[LessEqual[z, 1e-11], x, N[(x - a), $MachinePrecision]]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;z \leq -6.4 \cdot 10^{-69}:\\
                                            \;\;\;\;x - a\\
                                            
                                            \mathbf{elif}\;z \leq -4.1 \cdot 10^{-147}:\\
                                            \;\;\;\;\left(-a\right) \cdot y\\
                                            
                                            \mathbf{elif}\;z \leq 10^{-11}:\\
                                            \;\;\;\;x\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;x - a\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if z < -6.39999999999999997e-69 or 9.99999999999999939e-12 < z

                                              1. Initial program 92.1%

                                                \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                              2. Add Preprocessing
                                              3. Taylor expanded in z around inf

                                                \[\leadsto x - \color{blue}{a} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites76.3%

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

                                                if -6.39999999999999997e-69 < z < -4.1e-147

                                                1. Initial program 100.0%

                                                  \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                2. Add Preprocessing
                                                3. Taylor expanded in y around inf

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

                                                    \[\leadsto \color{blue}{\left(-y\right) \cdot \frac{a}{\left(1 + t\right) - z}} \]
                                                  2. Taylor expanded in z around 0

                                                    \[\leadsto -1 \cdot \color{blue}{\frac{a \cdot y}{1 + t}} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites72.9%

                                                      \[\leadsto \left(-a\right) \cdot \color{blue}{\frac{y}{1 + t}} \]
                                                    2. Taylor expanded in t around 0

                                                      \[\leadsto \left(-a\right) \cdot y \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites59.7%

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

                                                      if -4.1e-147 < z < 9.99999999999999939e-12

                                                      1. Initial program 99.8%

                                                        \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                      2. Add Preprocessing
                                                      3. Taylor expanded in x around inf

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

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

                                                      Alternative 10: 72.4% accurate, 1.7× speedup?

                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot y\\ \end{array} \end{array} \]
                                                      (FPCore (x y z t a)
                                                       :precision binary64
                                                       (if (or (<= z -4.4e-35) (not (<= z 1.7e-22))) (- x a) (- x (* a y))))
                                                      double code(double x, double y, double z, double t, double a) {
                                                      	double tmp;
                                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22)) {
                                                      		tmp = x - a;
                                                      	} else {
                                                      		tmp = x - (a * y);
                                                      	}
                                                      	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, t, a)
                                                      use fmin_fmax_functions
                                                          real(8), intent (in) :: x
                                                          real(8), intent (in) :: y
                                                          real(8), intent (in) :: z
                                                          real(8), intent (in) :: t
                                                          real(8), intent (in) :: a
                                                          real(8) :: tmp
                                                          if ((z <= (-4.4d-35)) .or. (.not. (z <= 1.7d-22))) then
                                                              tmp = x - a
                                                          else
                                                              tmp = x - (a * y)
                                                          end if
                                                          code = tmp
                                                      end function
                                                      
                                                      public static double code(double x, double y, double z, double t, double a) {
                                                      	double tmp;
                                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22)) {
                                                      		tmp = x - a;
                                                      	} else {
                                                      		tmp = x - (a * y);
                                                      	}
                                                      	return tmp;
                                                      }
                                                      
                                                      def code(x, y, z, t, a):
                                                      	tmp = 0
                                                      	if (z <= -4.4e-35) or not (z <= 1.7e-22):
                                                      		tmp = x - a
                                                      	else:
                                                      		tmp = x - (a * y)
                                                      	return tmp
                                                      
                                                      function code(x, y, z, t, a)
                                                      	tmp = 0.0
                                                      	if ((z <= -4.4e-35) || !(z <= 1.7e-22))
                                                      		tmp = Float64(x - a);
                                                      	else
                                                      		tmp = Float64(x - Float64(a * y));
                                                      	end
                                                      	return tmp
                                                      end
                                                      
                                                      function tmp_2 = code(x, y, z, t, a)
                                                      	tmp = 0.0;
                                                      	if ((z <= -4.4e-35) || ~((z <= 1.7e-22)))
                                                      		tmp = x - a;
                                                      	else
                                                      		tmp = x - (a * y);
                                                      	end
                                                      	tmp_2 = tmp;
                                                      end
                                                      
                                                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.4e-35], N[Not[LessEqual[z, 1.7e-22]], $MachinePrecision]], N[(x - a), $MachinePrecision], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision]]
                                                      
                                                      \begin{array}{l}
                                                      
                                                      \\
                                                      \begin{array}{l}
                                                      \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\
                                                      \;\;\;\;x - a\\
                                                      
                                                      \mathbf{else}:\\
                                                      \;\;\;\;x - a \cdot y\\
                                                      
                                                      
                                                      \end{array}
                                                      \end{array}
                                                      
                                                      Derivation
                                                      1. Split input into 2 regimes
                                                      2. if z < -4.39999999999999987e-35 or 1.6999999999999999e-22 < z

                                                        1. Initial program 92.0%

                                                          \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                        2. Add Preprocessing
                                                        3. Taylor expanded in z around inf

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

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

                                                          if -4.39999999999999987e-35 < z < 1.6999999999999999e-22

                                                          1. Initial program 99.8%

                                                            \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                          2. Add Preprocessing
                                                          3. Taylor expanded in t around 0

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

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

                                                              \[\leadsto x - a \cdot \color{blue}{y} \]
                                                            3. Step-by-step derivation
                                                              1. Applied rewrites78.3%

                                                                \[\leadsto x - a \cdot \color{blue}{y} \]
                                                            4. Recombined 2 regimes into one program.
                                                            5. Final simplification77.8%

                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.4 \cdot 10^{-35} \lor \neg \left(z \leq 1.7 \cdot 10^{-22}\right):\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x - a \cdot y\\ \end{array} \]
                                                            6. Add Preprocessing

                                                            Alternative 11: 63.4% accurate, 2.2× speedup?

                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.9 \cdot 10^{+190}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 6.8 \cdot 10^{+140}:\\ \;\;\;\;x - a\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                                            (FPCore (x y z t a)
                                                             :precision binary64
                                                             (if (<= t -3.9e+190) x (if (<= t 6.8e+140) (- x a) x)))
                                                            double code(double x, double y, double z, double t, double a) {
                                                            	double tmp;
                                                            	if (t <= -3.9e+190) {
                                                            		tmp = x;
                                                            	} else if (t <= 6.8e+140) {
                                                            		tmp = x - a;
                                                            	} 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, t, a)
                                                            use fmin_fmax_functions
                                                                real(8), intent (in) :: x
                                                                real(8), intent (in) :: y
                                                                real(8), intent (in) :: z
                                                                real(8), intent (in) :: t
                                                                real(8), intent (in) :: a
                                                                real(8) :: tmp
                                                                if (t <= (-3.9d+190)) then
                                                                    tmp = x
                                                                else if (t <= 6.8d+140) then
                                                                    tmp = x - a
                                                                else
                                                                    tmp = x
                                                                end if
                                                                code = tmp
                                                            end function
                                                            
                                                            public static double code(double x, double y, double z, double t, double a) {
                                                            	double tmp;
                                                            	if (t <= -3.9e+190) {
                                                            		tmp = x;
                                                            	} else if (t <= 6.8e+140) {
                                                            		tmp = x - a;
                                                            	} else {
                                                            		tmp = x;
                                                            	}
                                                            	return tmp;
                                                            }
                                                            
                                                            def code(x, y, z, t, a):
                                                            	tmp = 0
                                                            	if t <= -3.9e+190:
                                                            		tmp = x
                                                            	elif t <= 6.8e+140:
                                                            		tmp = x - a
                                                            	else:
                                                            		tmp = x
                                                            	return tmp
                                                            
                                                            function code(x, y, z, t, a)
                                                            	tmp = 0.0
                                                            	if (t <= -3.9e+190)
                                                            		tmp = x;
                                                            	elseif (t <= 6.8e+140)
                                                            		tmp = Float64(x - a);
                                                            	else
                                                            		tmp = x;
                                                            	end
                                                            	return tmp
                                                            end
                                                            
                                                            function tmp_2 = code(x, y, z, t, a)
                                                            	tmp = 0.0;
                                                            	if (t <= -3.9e+190)
                                                            		tmp = x;
                                                            	elseif (t <= 6.8e+140)
                                                            		tmp = x - a;
                                                            	else
                                                            		tmp = x;
                                                            	end
                                                            	tmp_2 = tmp;
                                                            end
                                                            
                                                            code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.9e+190], x, If[LessEqual[t, 6.8e+140], N[(x - a), $MachinePrecision], x]]
                                                            
                                                            \begin{array}{l}
                                                            
                                                            \\
                                                            \begin{array}{l}
                                                            \mathbf{if}\;t \leq -3.9 \cdot 10^{+190}:\\
                                                            \;\;\;\;x\\
                                                            
                                                            \mathbf{elif}\;t \leq 6.8 \cdot 10^{+140}:\\
                                                            \;\;\;\;x - a\\
                                                            
                                                            \mathbf{else}:\\
                                                            \;\;\;\;x\\
                                                            
                                                            
                                                            \end{array}
                                                            \end{array}
                                                            
                                                            Derivation
                                                            1. Split input into 2 regimes
                                                            2. if t < -3.9000000000000004e190 or 6.8e140 < t

                                                              1. Initial program 93.5%

                                                                \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                              2. Add Preprocessing
                                                              3. Taylor expanded in x around inf

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

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

                                                                if -3.9000000000000004e190 < t < 6.8e140

                                                                1. Initial program 96.5%

                                                                  \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in z around inf

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

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

                                                                Alternative 12: 54.0% accurate, 35.0× speedup?

                                                                \[\begin{array}{l} \\ x \end{array} \]
                                                                (FPCore (x y z t a) :precision binary64 x)
                                                                double code(double x, double y, double z, double t, double a) {
                                                                	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, t, a)
                                                                use fmin_fmax_functions
                                                                    real(8), intent (in) :: x
                                                                    real(8), intent (in) :: y
                                                                    real(8), intent (in) :: z
                                                                    real(8), intent (in) :: t
                                                                    real(8), intent (in) :: a
                                                                    code = x
                                                                end function
                                                                
                                                                public static double code(double x, double y, double z, double t, double a) {
                                                                	return x;
                                                                }
                                                                
                                                                def code(x, y, z, t, a):
                                                                	return x
                                                                
                                                                function code(x, y, z, t, a)
                                                                	return x
                                                                end
                                                                
                                                                function tmp = code(x, y, z, t, a)
                                                                	tmp = x;
                                                                end
                                                                
                                                                code[x_, y_, z_, t_, a_] := x
                                                                
                                                                \begin{array}{l}
                                                                
                                                                \\
                                                                x
                                                                \end{array}
                                                                
                                                                Derivation
                                                                1. Initial program 95.8%

                                                                  \[x - \frac{y - z}{\frac{\left(t - z\right) + 1}{a}} \]
                                                                2. Add Preprocessing
                                                                3. Taylor expanded in x around inf

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

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

                                                                  Developer Target 1: 99.6% accurate, 1.2× speedup?

                                                                  \[\begin{array}{l} \\ x - \frac{y - z}{\left(t - z\right) + 1} \cdot a \end{array} \]
                                                                  (FPCore (x y z t a)
                                                                   :precision binary64
                                                                   (- x (* (/ (- y z) (+ (- t z) 1.0)) a)))
                                                                  double code(double x, double y, double z, double t, double a) {
                                                                  	return x - (((y - z) / ((t - z) + 1.0)) * a);
                                                                  }
                                                                  
                                                                  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, t, a)
                                                                  use fmin_fmax_functions
                                                                      real(8), intent (in) :: x
                                                                      real(8), intent (in) :: y
                                                                      real(8), intent (in) :: z
                                                                      real(8), intent (in) :: t
                                                                      real(8), intent (in) :: a
                                                                      code = x - (((y - z) / ((t - z) + 1.0d0)) * a)
                                                                  end function
                                                                  
                                                                  public static double code(double x, double y, double z, double t, double a) {
                                                                  	return x - (((y - z) / ((t - z) + 1.0)) * a);
                                                                  }
                                                                  
                                                                  def code(x, y, z, t, a):
                                                                  	return x - (((y - z) / ((t - z) + 1.0)) * a)
                                                                  
                                                                  function code(x, y, z, t, a)
                                                                  	return Float64(x - Float64(Float64(Float64(y - z) / Float64(Float64(t - z) + 1.0)) * a))
                                                                  end
                                                                  
                                                                  function tmp = code(x, y, z, t, a)
                                                                  	tmp = x - (((y - z) / ((t - z) + 1.0)) * a);
                                                                  end
                                                                  
                                                                  code[x_, y_, z_, t_, a_] := N[(x - N[(N[(N[(y - z), $MachinePrecision] / N[(N[(t - z), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  x - \frac{y - z}{\left(t - z\right) + 1} \cdot a
                                                                  \end{array}
                                                                  

                                                                  Reproduce

                                                                  ?
                                                                  herbie shell --seed 2025026 
                                                                  (FPCore (x y z t a)
                                                                    :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                                                    :precision binary64
                                                                  
                                                                    :alt
                                                                    (! :herbie-platform default (- x (* (/ (- y z) (+ (- t z) 1)) a)))
                                                                  
                                                                    (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))