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

Percentage Accurate: 97.4% → 97.4%
Time: 7.8s
Alternatives: 12
Speedup: 1.0×

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}

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.4% 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: 97.4% 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}
Derivation
  1. Initial program 97.4%

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

Alternative 2: 90.5% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{t} \cdot a\\ \mathbf{if}\;t \leq -6.7 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\ \;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* (/ (- y z) t) a))))
   (if (<= t -6.7e+40)
     t_1
     (if (<= t 2.8e+40) (- x (* (- y z) (/ a (- 1.0 z)))) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) / t) * a);
	double tmp;
	if (t <= -6.7e+40) {
		tmp = t_1;
	} else if (t <= 2.8e+40) {
		tmp = x - ((y - z) * (a / (1.0 - z)));
	} else {
		tmp = t_1;
	}
	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) :: t_1
    real(8) :: tmp
    t_1 = x - (((y - z) / t) * a)
    if (t <= (-6.7d+40)) then
        tmp = t_1
    else if (t <= 2.8d+40) then
        tmp = x - ((y - z) * (a / (1.0d0 - z)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((y - z) / t) * a);
	double tmp;
	if (t <= -6.7e+40) {
		tmp = t_1;
	} else if (t <= 2.8e+40) {
		tmp = x - ((y - z) * (a / (1.0 - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x - (((y - z) / t) * a)
	tmp = 0
	if t <= -6.7e+40:
		tmp = t_1
	elif t <= 2.8e+40:
		tmp = x - ((y - z) * (a / (1.0 - z)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(Float64(Float64(y - z) / t) * a))
	tmp = 0.0
	if (t <= -6.7e+40)
		tmp = t_1;
	elseif (t <= 2.8e+40)
		tmp = Float64(x - Float64(Float64(y - z) * Float64(a / Float64(1.0 - z))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x - (((y - z) / t) * a);
	tmp = 0.0;
	if (t <= -6.7e+40)
		tmp = t_1;
	elseif (t <= 2.8e+40)
		tmp = x - ((y - z) * (a / (1.0 - z)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.7e+40], t$95$1, If[LessEqual[t, 2.8e+40], N[(x - N[(N[(y - z), $MachinePrecision] * N[(a / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - \frac{y - z}{t} \cdot a\\
\mathbf{if}\;t \leq -6.7 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\
\;\;\;\;x - \left(y - z\right) \cdot \frac{a}{1 - z}\\

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.70000000000000022e40 or 2.8000000000000001e40 < t

    1. Initial program 97.4%

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

      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
    3. Step-by-step derivation
      1. Applied rewrites54.6%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
      2. Step-by-step derivation
        1. lift--.f64N/A

          \[\leadsto x - \frac{\color{blue}{y - z}}{\frac{t}{a}} \]
        2. lift-/.f64N/A

          \[\leadsto x - \color{blue}{\frac{y - z}{\frac{t}{a}}} \]
        3. lift-/.f64N/A

          \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a}}} \]
        4. associate-/r/N/A

          \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
        5. lower-*.f64N/A

          \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
        6. lower-/.f64N/A

          \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
        7. lift--.f6453.7

          \[\leadsto x - \frac{\color{blue}{y - z}}{t} \cdot a \]
      3. Applied rewrites53.7%

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

      if -6.70000000000000022e40 < t < 2.8000000000000001e40

      1. Initial program 97.4%

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

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

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

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

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

          \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
        5. lower--.f6470.2

          \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
      4. Applied rewrites70.2%

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

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

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

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

          \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
        5. associate-/l*N/A

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

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

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

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

          \[\leadsto x - \left(y - z\right) \cdot \frac{a}{1 - \color{blue}{z}} \]
      6. Applied rewrites78.9%

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

    Alternative 3: 87.0% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{\frac{-z}{a}}\\ \mathbf{if}\;z \leq -2.9 \cdot 10^{+95}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-10}:\\ \;\;\;\;x - a \cdot \frac{y}{1 + t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (- x (/ (- y z) (/ (- z) a)))))
       (if (<= z -2.9e+95)
         t_1
         (if (<= z 9.2e-10) (- x (* a (/ y (+ 1.0 t)))) t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x - ((y - z) / (-z / a));
    	double tmp;
    	if (z <= -2.9e+95) {
    		tmp = t_1;
    	} else if (z <= 9.2e-10) {
    		tmp = x - (a * (y / (1.0 + t)));
    	} else {
    		tmp = t_1;
    	}
    	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) :: t_1
        real(8) :: tmp
        t_1 = x - ((y - z) / (-z / a))
        if (z <= (-2.9d+95)) then
            tmp = t_1
        else if (z <= 9.2d-10) then
            tmp = x - (a * (y / (1.0d0 + t)))
        else
            tmp = t_1
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = x - ((y - z) / (-z / a));
    	double tmp;
    	if (z <= -2.9e+95) {
    		tmp = t_1;
    	} else if (z <= 9.2e-10) {
    		tmp = x - (a * (y / (1.0 + t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x - ((y - z) / (-z / a))
    	tmp = 0
    	if z <= -2.9e+95:
    		tmp = t_1
    	elif z <= 9.2e-10:
    		tmp = x - (a * (y / (1.0 + t)))
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x - Float64(Float64(y - z) / Float64(Float64(-z) / a)))
    	tmp = 0.0
    	if (z <= -2.9e+95)
    		tmp = t_1;
    	elseif (z <= 9.2e-10)
    		tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 + t))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = x - ((y - z) / (-z / a));
    	tmp = 0.0;
    	if (z <= -2.9e+95)
    		tmp = t_1;
    	elseif (z <= 9.2e-10)
    		tmp = x - (a * (y / (1.0 + t)));
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y - z), $MachinePrecision] / N[((-z) / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -2.9e+95], t$95$1, If[LessEqual[z, 9.2e-10], N[(x - N[(a * N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := x - \frac{y - z}{\frac{-z}{a}}\\
    \mathbf{if}\;z \leq -2.9 \cdot 10^{+95}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 9.2 \cdot 10^{-10}:\\
    \;\;\;\;x - a \cdot \frac{y}{1 + t}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -2.90000000000000013e95 or 9.20000000000000028e-10 < z

      1. Initial program 97.4%

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

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-1 \cdot z}}{a}} \]
      3. Step-by-step derivation
        1. mul-1-negN/A

          \[\leadsto x - \frac{y - z}{\frac{\mathsf{neg}\left(z\right)}{a}} \]
        2. lower-neg.f6457.8

          \[\leadsto x - \frac{y - z}{\frac{-z}{a}} \]
      4. Applied rewrites57.8%

        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{-z}}{a}} \]

      if -2.90000000000000013e95 < z < 9.20000000000000028e-10

      1. Initial program 97.4%

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

        \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
      3. Step-by-step derivation
        1. associate-/l*N/A

          \[\leadsto x - a \cdot \color{blue}{\frac{y}{1 + t}} \]
        2. lower-*.f64N/A

          \[\leadsto x - a \cdot \color{blue}{\frac{y}{1 + t}} \]
        3. lower-/.f64N/A

          \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 + t}} \]
        4. lower-+.f6473.0

          \[\leadsto x - a \cdot \frac{y}{1 + \color{blue}{t}} \]
      4. Applied rewrites73.0%

        \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 4: 85.0% accurate, 0.9× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.46 \cdot 10^{+97}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 2.1 \cdot 10^{+87}:\\ \;\;\;\;x - a \cdot \frac{y}{1 + t}\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (if (<= z -1.46e+97)
       (- x a)
       (if (<= z 2.1e+87) (- x (* a (/ y (+ 1.0 t)))) (- x a))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -1.46e+97) {
    		tmp = x - a;
    	} else if (z <= 2.1e+87) {
    		tmp = x - (a * (y / (1.0 + t)));
    	} 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 <= (-1.46d+97)) then
            tmp = x - a
        else if (z <= 2.1d+87) then
            tmp = x - (a * (y / (1.0d0 + t)))
        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 <= -1.46e+97) {
    		tmp = x - a;
    	} else if (z <= 2.1e+87) {
    		tmp = x - (a * (y / (1.0 + t)));
    	} else {
    		tmp = x - a;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -1.46e+97:
    		tmp = x - a
    	elif z <= 2.1e+87:
    		tmp = x - (a * (y / (1.0 + t)))
    	else:
    		tmp = x - a
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -1.46e+97)
    		tmp = Float64(x - a);
    	elseif (z <= 2.1e+87)
    		tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 + t))));
    	else
    		tmp = Float64(x - a);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -1.46e+97)
    		tmp = x - a;
    	elseif (z <= 2.1e+87)
    		tmp = x - (a * (y / (1.0 + t)));
    	else
    		tmp = x - a;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.46e+97], N[(x - a), $MachinePrecision], If[LessEqual[z, 2.1e+87], N[(x - N[(a * N[(y / N[(1.0 + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.46 \cdot 10^{+97}:\\
    \;\;\;\;x - a\\
    
    \mathbf{elif}\;z \leq 2.1 \cdot 10^{+87}:\\
    \;\;\;\;x - a \cdot \frac{y}{1 + t}\\
    
    \mathbf{else}:\\
    \;\;\;\;x - a\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.46e97 or 2.1e87 < z

      1. Initial program 97.4%

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

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

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

        if -1.46e97 < z < 2.1e87

        1. Initial program 97.4%

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

          \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
        3. Step-by-step derivation
          1. associate-/l*N/A

            \[\leadsto x - a \cdot \color{blue}{\frac{y}{1 + t}} \]
          2. lower-*.f64N/A

            \[\leadsto x - a \cdot \color{blue}{\frac{y}{1 + t}} \]
          3. lower-/.f64N/A

            \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 + t}} \]
          4. lower-+.f6473.0

            \[\leadsto x - a \cdot \frac{y}{1 + \color{blue}{t}} \]
        4. Applied rewrites73.0%

          \[\leadsto x - \color{blue}{a \cdot \frac{y}{1 + t}} \]
      4. Recombined 2 regimes into one program.
      5. Add Preprocessing

      Alternative 5: 79.6% accurate, 0.9× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y - z}{t} \cdot a\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\ \;\;\;\;x - a \cdot \frac{y}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (- x (* (/ (- y z) t) a))))
         (if (<= t -4.1e+40)
           t_1
           (if (<= t 2.8e+40) (- x (* a (/ y (- 1.0 z)))) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x - (((y - z) / t) * a);
      	double tmp;
      	if (t <= -4.1e+40) {
      		tmp = t_1;
      	} else if (t <= 2.8e+40) {
      		tmp = x - (a * (y / (1.0 - z)));
      	} else {
      		tmp = t_1;
      	}
      	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) :: t_1
          real(8) :: tmp
          t_1 = x - (((y - z) / t) * a)
          if (t <= (-4.1d+40)) then
              tmp = t_1
          else if (t <= 2.8d+40) then
              tmp = x - (a * (y / (1.0d0 - z)))
          else
              tmp = t_1
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = x - (((y - z) / t) * a);
      	double tmp;
      	if (t <= -4.1e+40) {
      		tmp = t_1;
      	} else if (t <= 2.8e+40) {
      		tmp = x - (a * (y / (1.0 - z)));
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = x - (((y - z) / t) * a)
      	tmp = 0
      	if t <= -4.1e+40:
      		tmp = t_1
      	elif t <= 2.8e+40:
      		tmp = x - (a * (y / (1.0 - z)))
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x - Float64(Float64(Float64(y - z) / t) * a))
      	tmp = 0.0
      	if (t <= -4.1e+40)
      		tmp = t_1;
      	elseif (t <= 2.8e+40)
      		tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 - z))));
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = x - (((y - z) / t) * a);
      	tmp = 0.0;
      	if (t <= -4.1e+40)
      		tmp = t_1;
      	elseif (t <= 2.8e+40)
      		tmp = x - (a * (y / (1.0 - z)));
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(N[(y - z), $MachinePrecision] / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+40], t$95$1, If[LessEqual[t, 2.8e+40], N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := x - \frac{y - z}{t} \cdot a\\
      \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\
      \;\;\;\;x - a \cdot \frac{y}{1 - z}\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if t < -4.1000000000000002e40 or 2.8000000000000001e40 < t

        1. Initial program 97.4%

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

          \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
        3. Step-by-step derivation
          1. Applied rewrites54.6%

            \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
          2. Step-by-step derivation
            1. lift--.f64N/A

              \[\leadsto x - \frac{\color{blue}{y - z}}{\frac{t}{a}} \]
            2. lift-/.f64N/A

              \[\leadsto x - \color{blue}{\frac{y - z}{\frac{t}{a}}} \]
            3. lift-/.f64N/A

              \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a}}} \]
            4. associate-/r/N/A

              \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
            5. lower-*.f64N/A

              \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
            6. lower-/.f64N/A

              \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
            7. lift--.f6453.7

              \[\leadsto x - \frac{\color{blue}{y - z}}{t} \cdot a \]
          3. Applied rewrites53.7%

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

          if -4.1000000000000002e40 < t < 2.8000000000000001e40

          1. Initial program 97.4%

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

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

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

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

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

              \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
            5. lower--.f6470.2

              \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
          4. Applied rewrites70.2%

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

            \[\leadsto x - \frac{a \cdot y}{\color{blue}{1 - z}} \]
          6. Step-by-step derivation
            1. associate-/l*N/A

              \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 - z}} \]
            2. lower-*.f64N/A

              \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 - z}} \]
            3. lower-/.f64N/A

              \[\leadsto x - a \cdot \frac{y}{1 - \color{blue}{z}} \]
            4. lift--.f6466.1

              \[\leadsto x - a \cdot \frac{y}{1 - z} \]
          7. Applied rewrites66.1%

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

        Alternative 6: 77.0% accurate, 0.9× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a}}\\ \mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\ \;\;\;\;x - a \cdot \frac{y}{1 - z}\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{t} \cdot a\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (if (<= t -4.1e+40)
           (- x (/ y (/ t a)))
           (if (<= t 2.8e+40) (- x (* a (/ y (- 1.0 z)))) (- x (* (/ y t) a)))))
        double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if (t <= -4.1e+40) {
        		tmp = x - (y / (t / a));
        	} else if (t <= 2.8e+40) {
        		tmp = x - (a * (y / (1.0 - z)));
        	} else {
        		tmp = x - ((y / t) * 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 (t <= (-4.1d+40)) then
                tmp = x - (y / (t / a))
            else if (t <= 2.8d+40) then
                tmp = x - (a * (y / (1.0d0 - z)))
            else
                tmp = x - ((y / t) * a)
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a) {
        	double tmp;
        	if (t <= -4.1e+40) {
        		tmp = x - (y / (t / a));
        	} else if (t <= 2.8e+40) {
        		tmp = x - (a * (y / (1.0 - z)));
        	} else {
        		tmp = x - ((y / t) * a);
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	tmp = 0
        	if t <= -4.1e+40:
        		tmp = x - (y / (t / a))
        	elif t <= 2.8e+40:
        		tmp = x - (a * (y / (1.0 - z)))
        	else:
        		tmp = x - ((y / t) * a)
        	return tmp
        
        function code(x, y, z, t, a)
        	tmp = 0.0
        	if (t <= -4.1e+40)
        		tmp = Float64(x - Float64(y / Float64(t / a)));
        	elseif (t <= 2.8e+40)
        		tmp = Float64(x - Float64(a * Float64(y / Float64(1.0 - z))));
        	else
        		tmp = Float64(x - Float64(Float64(y / t) * a));
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	tmp = 0.0;
        	if (t <= -4.1e+40)
        		tmp = x - (y / (t / a));
        	elseif (t <= 2.8e+40)
        		tmp = x - (a * (y / (1.0 - z)));
        	else
        		tmp = x - ((y / t) * a);
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.1e+40], N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.8e+40], N[(x - N[(a * N[(y / N[(1.0 - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\
        \;\;\;\;x - \frac{y}{\frac{t}{a}}\\
        
        \mathbf{elif}\;t \leq 2.8 \cdot 10^{+40}:\\
        \;\;\;\;x - a \cdot \frac{y}{1 - z}\\
        
        \mathbf{else}:\\
        \;\;\;\;x - \frac{y}{t} \cdot a\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -4.1000000000000002e40

          1. Initial program 97.4%

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

            \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
          3. Step-by-step derivation
            1. Applied rewrites54.6%

              \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
            2. Taylor expanded in y around inf

              \[\leadsto x - \frac{\color{blue}{y}}{\frac{t}{a}} \]
            3. Step-by-step derivation
              1. Applied rewrites56.2%

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

              if -4.1000000000000002e40 < t < 2.8000000000000001e40

              1. Initial program 97.4%

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

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

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

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

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

                  \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
                5. lower--.f6470.2

                  \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
              4. Applied rewrites70.2%

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

                \[\leadsto x - \frac{a \cdot y}{\color{blue}{1 - z}} \]
              6. Step-by-step derivation
                1. associate-/l*N/A

                  \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 - z}} \]
                2. lower-*.f64N/A

                  \[\leadsto x - a \cdot \frac{y}{\color{blue}{1 - z}} \]
                3. lower-/.f64N/A

                  \[\leadsto x - a \cdot \frac{y}{1 - \color{blue}{z}} \]
                4. lift--.f6466.1

                  \[\leadsto x - a \cdot \frac{y}{1 - z} \]
              7. Applied rewrites66.1%

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

              if 2.8000000000000001e40 < t

              1. Initial program 97.4%

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

                \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
              3. Step-by-step derivation
                1. Applied rewrites54.6%

                  \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                2. Step-by-step derivation
                  1. lift--.f64N/A

                    \[\leadsto x - \frac{\color{blue}{y - z}}{\frac{t}{a}} \]
                  2. lift-/.f64N/A

                    \[\leadsto x - \color{blue}{\frac{y - z}{\frac{t}{a}}} \]
                  3. lift-/.f64N/A

                    \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a}}} \]
                  4. associate-/r/N/A

                    \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                  5. lower-*.f64N/A

                    \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                  6. lower-/.f64N/A

                    \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
                  7. lift--.f6453.7

                    \[\leadsto x - \frac{\color{blue}{y - z}}{t} \cdot a \]
                3. Applied rewrites53.7%

                  \[\leadsto \color{blue}{x - \frac{y - z}{t} \cdot a} \]
                4. Taylor expanded in y around inf

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

                    \[\leadsto x - \frac{\color{blue}{y}}{t} \cdot a \]
                6. Recombined 3 regimes into one program.
                7. Add Preprocessing

                Alternative 7: 73.8% accurate, 1.0× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\ \;\;\;\;x - \frac{y}{\frac{t}{a}}\\ \mathbf{elif}\;t \leq 0.046:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - \frac{y}{t} \cdot a\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (if (<= t -4.1e+40)
                   (- x (/ y (/ t a)))
                   (if (<= t 0.046) (- x (* a y)) (- x (* (/ y t) a)))))
                double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (t <= -4.1e+40) {
                		tmp = x - (y / (t / a));
                	} else if (t <= 0.046) {
                		tmp = x - (a * y);
                	} else {
                		tmp = x - ((y / t) * 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 (t <= (-4.1d+40)) then
                        tmp = x - (y / (t / a))
                    else if (t <= 0.046d0) then
                        tmp = x - (a * y)
                    else
                        tmp = x - ((y / t) * a)
                    end if
                    code = tmp
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	double tmp;
                	if (t <= -4.1e+40) {
                		tmp = x - (y / (t / a));
                	} else if (t <= 0.046) {
                		tmp = x - (a * y);
                	} else {
                		tmp = x - ((y / t) * a);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a):
                	tmp = 0
                	if t <= -4.1e+40:
                		tmp = x - (y / (t / a))
                	elif t <= 0.046:
                		tmp = x - (a * y)
                	else:
                		tmp = x - ((y / t) * a)
                	return tmp
                
                function code(x, y, z, t, a)
                	tmp = 0.0
                	if (t <= -4.1e+40)
                		tmp = Float64(x - Float64(y / Float64(t / a)));
                	elseif (t <= 0.046)
                		tmp = Float64(x - Float64(a * y));
                	else
                		tmp = Float64(x - Float64(Float64(y / t) * a));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a)
                	tmp = 0.0;
                	if (t <= -4.1e+40)
                		tmp = x - (y / (t / a));
                	elseif (t <= 0.046)
                		tmp = x - (a * y);
                	else
                		tmp = x - ((y / t) * a);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_] := If[LessEqual[t, -4.1e+40], N[(x - N[(y / N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 0.046], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\
                \;\;\;\;x - \frac{y}{\frac{t}{a}}\\
                
                \mathbf{elif}\;t \leq 0.046:\\
                \;\;\;\;x - a \cdot y\\
                
                \mathbf{else}:\\
                \;\;\;\;x - \frac{y}{t} \cdot a\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if t < -4.1000000000000002e40

                  1. Initial program 97.4%

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

                    \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                  3. Step-by-step derivation
                    1. Applied rewrites54.6%

                      \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                    2. Taylor expanded in y around inf

                      \[\leadsto x - \frac{\color{blue}{y}}{\frac{t}{a}} \]
                    3. Step-by-step derivation
                      1. Applied rewrites56.2%

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

                      if -4.1000000000000002e40 < t < 0.045999999999999999

                      1. Initial program 97.4%

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

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

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

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

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

                          \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
                        5. lower--.f6470.2

                          \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
                      4. Applied rewrites70.2%

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

                        \[\leadsto x - a \cdot \color{blue}{y} \]
                      6. Step-by-step derivation
                        1. lower-*.f6458.0

                          \[\leadsto x - a \cdot y \]
                      7. Applied rewrites58.0%

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

                      if 0.045999999999999999 < t

                      1. Initial program 97.4%

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

                        \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                      3. Step-by-step derivation
                        1. Applied rewrites54.6%

                          \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                        2. Step-by-step derivation
                          1. lift--.f64N/A

                            \[\leadsto x - \frac{\color{blue}{y - z}}{\frac{t}{a}} \]
                          2. lift-/.f64N/A

                            \[\leadsto x - \color{blue}{\frac{y - z}{\frac{t}{a}}} \]
                          3. lift-/.f64N/A

                            \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a}}} \]
                          4. associate-/r/N/A

                            \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                          5. lower-*.f64N/A

                            \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                          6. lower-/.f64N/A

                            \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
                          7. lift--.f6453.7

                            \[\leadsto x - \frac{\color{blue}{y - z}}{t} \cdot a \]
                        3. Applied rewrites53.7%

                          \[\leadsto \color{blue}{x - \frac{y - z}{t} \cdot a} \]
                        4. Taylor expanded in y around inf

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

                            \[\leadsto x - \frac{\color{blue}{y}}{t} \cdot a \]
                        6. Recombined 3 regimes into one program.
                        7. Add Preprocessing

                        Alternative 8: 71.9% accurate, 1.0× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{y}{t} \cdot a\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 0.046:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a)
                         :precision binary64
                         (let* ((t_1 (- x (* (/ y t) a))))
                           (if (<= t -4.1e+40) t_1 (if (<= t 0.046) (- x (* a y)) t_1))))
                        double code(double x, double y, double z, double t, double a) {
                        	double t_1 = x - ((y / t) * a);
                        	double tmp;
                        	if (t <= -4.1e+40) {
                        		tmp = t_1;
                        	} else if (t <= 0.046) {
                        		tmp = x - (a * y);
                        	} else {
                        		tmp = t_1;
                        	}
                        	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) :: t_1
                            real(8) :: tmp
                            t_1 = x - ((y / t) * a)
                            if (t <= (-4.1d+40)) then
                                tmp = t_1
                            else if (t <= 0.046d0) then
                                tmp = x - (a * y)
                            else
                                tmp = t_1
                            end if
                            code = tmp
                        end function
                        
                        public static double code(double x, double y, double z, double t, double a) {
                        	double t_1 = x - ((y / t) * a);
                        	double tmp;
                        	if (t <= -4.1e+40) {
                        		tmp = t_1;
                        	} else if (t <= 0.046) {
                        		tmp = x - (a * y);
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	t_1 = x - ((y / t) * a)
                        	tmp = 0
                        	if t <= -4.1e+40:
                        		tmp = t_1
                        	elif t <= 0.046:
                        		tmp = x - (a * y)
                        	else:
                        		tmp = t_1
                        	return tmp
                        
                        function code(x, y, z, t, a)
                        	t_1 = Float64(x - Float64(Float64(y / t) * a))
                        	tmp = 0.0
                        	if (t <= -4.1e+40)
                        		tmp = t_1;
                        	elseif (t <= 0.046)
                        		tmp = Float64(x - Float64(a * y));
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        function tmp_2 = code(x, y, z, t, a)
                        	t_1 = x - ((y / t) * a);
                        	tmp = 0.0;
                        	if (t <= -4.1e+40)
                        		tmp = t_1;
                        	elseif (t <= 0.046)
                        		tmp = x - (a * y);
                        	else
                        		tmp = t_1;
                        	end
                        	tmp_2 = tmp;
                        end
                        
                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(y / t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+40], t$95$1, If[LessEqual[t, 0.046], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := x - \frac{y}{t} \cdot a\\
                        \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t \leq 0.046:\\
                        \;\;\;\;x - a \cdot y\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if t < -4.1000000000000002e40 or 0.045999999999999999 < t

                          1. Initial program 97.4%

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

                            \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                          3. Step-by-step derivation
                            1. Applied rewrites54.6%

                              \[\leadsto x - \frac{y - z}{\frac{\color{blue}{t}}{a}} \]
                            2. Step-by-step derivation
                              1. lift--.f64N/A

                                \[\leadsto x - \frac{\color{blue}{y - z}}{\frac{t}{a}} \]
                              2. lift-/.f64N/A

                                \[\leadsto x - \color{blue}{\frac{y - z}{\frac{t}{a}}} \]
                              3. lift-/.f64N/A

                                \[\leadsto x - \frac{y - z}{\color{blue}{\frac{t}{a}}} \]
                              4. associate-/r/N/A

                                \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                              5. lower-*.f64N/A

                                \[\leadsto x - \color{blue}{\frac{y - z}{t} \cdot a} \]
                              6. lower-/.f64N/A

                                \[\leadsto x - \color{blue}{\frac{y - z}{t}} \cdot a \]
                              7. lift--.f6453.7

                                \[\leadsto x - \frac{\color{blue}{y - z}}{t} \cdot a \]
                            3. Applied rewrites53.7%

                              \[\leadsto \color{blue}{x - \frac{y - z}{t} \cdot a} \]
                            4. Taylor expanded in y around inf

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

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

                              if -4.1000000000000002e40 < t < 0.045999999999999999

                              1. Initial program 97.4%

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

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

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

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

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

                                  \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
                                5. lower--.f6470.2

                                  \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
                              4. Applied rewrites70.2%

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

                                \[\leadsto x - a \cdot \color{blue}{y} \]
                              6. Step-by-step derivation
                                1. lower-*.f6458.0

                                  \[\leadsto x - a \cdot y \]
                              7. Applied rewrites58.0%

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

                            Alternative 9: 71.9% accurate, 1.0× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := x - \frac{a \cdot y}{t}\\ \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 0.046:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (let* ((t_1 (- x (/ (* a y) t))))
                               (if (<= t -4.1e+40) t_1 (if (<= t 0.046) (- x (* a y)) t_1))))
                            double code(double x, double y, double z, double t, double a) {
                            	double t_1 = x - ((a * y) / t);
                            	double tmp;
                            	if (t <= -4.1e+40) {
                            		tmp = t_1;
                            	} else if (t <= 0.046) {
                            		tmp = x - (a * y);
                            	} else {
                            		tmp = t_1;
                            	}
                            	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) :: t_1
                                real(8) :: tmp
                                t_1 = x - ((a * y) / t)
                                if (t <= (-4.1d+40)) then
                                    tmp = t_1
                                else if (t <= 0.046d0) then
                                    tmp = x - (a * y)
                                else
                                    tmp = t_1
                                end if
                                code = tmp
                            end function
                            
                            public static double code(double x, double y, double z, double t, double a) {
                            	double t_1 = x - ((a * y) / t);
                            	double tmp;
                            	if (t <= -4.1e+40) {
                            		tmp = t_1;
                            	} else if (t <= 0.046) {
                            		tmp = x - (a * y);
                            	} else {
                            		tmp = t_1;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	t_1 = x - ((a * y) / t)
                            	tmp = 0
                            	if t <= -4.1e+40:
                            		tmp = t_1
                            	elif t <= 0.046:
                            		tmp = x - (a * y)
                            	else:
                            		tmp = t_1
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	t_1 = Float64(x - Float64(Float64(a * y) / t))
                            	tmp = 0.0
                            	if (t <= -4.1e+40)
                            		tmp = t_1;
                            	elseif (t <= 0.046)
                            		tmp = Float64(x - Float64(a * y));
                            	else
                            		tmp = t_1;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	t_1 = x - ((a * y) / t);
                            	tmp = 0.0;
                            	if (t <= -4.1e+40)
                            		tmp = t_1;
                            	elseif (t <= 0.046)
                            		tmp = x - (a * y);
                            	else
                            		tmp = t_1;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(N[(a * y), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.1e+40], t$95$1, If[LessEqual[t, 0.046], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            t_1 := x - \frac{a \cdot y}{t}\\
                            \mathbf{if}\;t \leq -4.1 \cdot 10^{+40}:\\
                            \;\;\;\;t\_1\\
                            
                            \mathbf{elif}\;t \leq 0.046:\\
                            \;\;\;\;x - a \cdot y\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;t\_1\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if t < -4.1000000000000002e40 or 0.045999999999999999 < t

                              1. Initial program 97.4%

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

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

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

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

                                  \[\leadsto x - \frac{y - z}{\frac{\left(\frac{t}{z} - 1\right) \cdot z + 1}{a}} \]
                                4. lower-/.f6494.1

                                  \[\leadsto x - \frac{y - z}{\frac{\left(\frac{t}{z} - 1\right) \cdot z + 1}{a}} \]
                              4. Applied rewrites94.1%

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

                                \[\leadsto x - \color{blue}{-1 \cdot \left(y \cdot \left(-1 \cdot \frac{a}{\left(1 + t\right) - z} + \frac{a \cdot z}{y \cdot \left(\left(1 + t\right) - z\right)}\right)\right)} \]
                              6. Step-by-step derivation
                                1. mul-1-negN/A

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

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

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

                                  \[\leadsto x - \left(-\left(-1 \cdot \frac{a}{\left(1 + t\right) - z} + \frac{a \cdot z}{y \cdot \left(\left(1 + t\right) - z\right)}\right) \cdot y\right) \]
                              7. Applied rewrites89.2%

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

                                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                              9. Step-by-step derivation
                                1. lower-/.f64N/A

                                  \[\leadsto x - \frac{a \cdot y}{\color{blue}{1 + t}} \]
                                2. lower-*.f64N/A

                                  \[\leadsto x - \frac{a \cdot y}{\color{blue}{1} + t} \]
                                3. lower-+.f6470.2

                                  \[\leadsto x - \frac{a \cdot y}{1 + \color{blue}{t}} \]
                              10. Applied rewrites70.2%

                                \[\leadsto x - \color{blue}{\frac{a \cdot y}{1 + t}} \]
                              11. Taylor expanded in t around inf

                                \[\leadsto x - \frac{a \cdot y}{t} \]
                              12. Step-by-step derivation
                                1. Applied rewrites54.5%

                                  \[\leadsto x - \frac{a \cdot y}{t} \]

                                if -4.1000000000000002e40 < t < 0.045999999999999999

                                1. Initial program 97.4%

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

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

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

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

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

                                    \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
                                  5. lower--.f6470.2

                                    \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
                                4. Applied rewrites70.2%

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

                                  \[\leadsto x - a \cdot \color{blue}{y} \]
                                6. Step-by-step derivation
                                  1. lower-*.f6458.0

                                    \[\leadsto x - a \cdot y \]
                                7. Applied rewrites58.0%

                                  \[\leadsto x - a \cdot \color{blue}{y} \]
                              13. Recombined 2 regimes into one program.
                              14. Add Preprocessing

                              Alternative 10: 69.1% accurate, 1.3× speedup?

                              \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.32 \cdot 10^{+21}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{-10}:\\ \;\;\;\;x - a \cdot y\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                              (FPCore (x y z t a)
                               :precision binary64
                               (if (<= z -2.32e+21) (- x a) (if (<= z 9.2e-10) (- x (* a y)) (- x a))))
                              double code(double x, double y, double z, double t, double a) {
                              	double tmp;
                              	if (z <= -2.32e+21) {
                              		tmp = x - a;
                              	} else if (z <= 9.2e-10) {
                              		tmp = x - (a * y);
                              	} 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 <= (-2.32d+21)) then
                                      tmp = x - a
                                  else if (z <= 9.2d-10) then
                                      tmp = x - (a * y)
                                  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 <= -2.32e+21) {
                              		tmp = x - a;
                              	} else if (z <= 9.2e-10) {
                              		tmp = x - (a * y);
                              	} else {
                              		tmp = x - a;
                              	}
                              	return tmp;
                              }
                              
                              def code(x, y, z, t, a):
                              	tmp = 0
                              	if z <= -2.32e+21:
                              		tmp = x - a
                              	elif z <= 9.2e-10:
                              		tmp = x - (a * y)
                              	else:
                              		tmp = x - a
                              	return tmp
                              
                              function code(x, y, z, t, a)
                              	tmp = 0.0
                              	if (z <= -2.32e+21)
                              		tmp = Float64(x - a);
                              	elseif (z <= 9.2e-10)
                              		tmp = Float64(x - Float64(a * y));
                              	else
                              		tmp = Float64(x - a);
                              	end
                              	return tmp
                              end
                              
                              function tmp_2 = code(x, y, z, t, a)
                              	tmp = 0.0;
                              	if (z <= -2.32e+21)
                              		tmp = x - a;
                              	elseif (z <= 9.2e-10)
                              		tmp = x - (a * y);
                              	else
                              		tmp = x - a;
                              	end
                              	tmp_2 = tmp;
                              end
                              
                              code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.32e+21], N[(x - a), $MachinePrecision], If[LessEqual[z, 9.2e-10], N[(x - N[(a * y), $MachinePrecision]), $MachinePrecision], N[(x - a), $MachinePrecision]]]
                              
                              \begin{array}{l}
                              
                              \\
                              \begin{array}{l}
                              \mathbf{if}\;z \leq -2.32 \cdot 10^{+21}:\\
                              \;\;\;\;x - a\\
                              
                              \mathbf{elif}\;z \leq 9.2 \cdot 10^{-10}:\\
                              \;\;\;\;x - a \cdot y\\
                              
                              \mathbf{else}:\\
                              \;\;\;\;x - a\\
                              
                              
                              \end{array}
                              \end{array}
                              
                              Derivation
                              1. Split input into 2 regimes
                              2. if z < -2.32e21 or 9.20000000000000028e-10 < z

                                1. Initial program 97.4%

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

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

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

                                  if -2.32e21 < z < 9.20000000000000028e-10

                                  1. Initial program 97.4%

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

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

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

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

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

                                      \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - z} \]
                                    5. lower--.f6470.2

                                      \[\leadsto x - \frac{\left(y - z\right) \cdot a}{1 - \color{blue}{z}} \]
                                  4. Applied rewrites70.2%

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

                                    \[\leadsto x - a \cdot \color{blue}{y} \]
                                  6. Step-by-step derivation
                                    1. lower-*.f6458.0

                                      \[\leadsto x - a \cdot y \]
                                  7. Applied rewrites58.0%

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

                                Alternative 11: 64.5% accurate, 1.6× speedup?

                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.38 \cdot 10^{+97}:\\ \;\;\;\;x - a\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+109}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;x - a\\ \end{array} \end{array} \]
                                (FPCore (x y z t a)
                                 :precision binary64
                                 (if (<= z -1.38e+97) (- x a) (if (<= z 1.15e+109) x (- x a))))
                                double code(double x, double y, double z, double t, double a) {
                                	double tmp;
                                	if (z <= -1.38e+97) {
                                		tmp = x - a;
                                	} else if (z <= 1.15e+109) {
                                		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 <= (-1.38d+97)) then
                                        tmp = x - a
                                    else if (z <= 1.15d+109) 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 <= -1.38e+97) {
                                		tmp = x - a;
                                	} else if (z <= 1.15e+109) {
                                		tmp = x;
                                	} else {
                                		tmp = x - a;
                                	}
                                	return tmp;
                                }
                                
                                def code(x, y, z, t, a):
                                	tmp = 0
                                	if z <= -1.38e+97:
                                		tmp = x - a
                                	elif z <= 1.15e+109:
                                		tmp = x
                                	else:
                                		tmp = x - a
                                	return tmp
                                
                                function code(x, y, z, t, a)
                                	tmp = 0.0
                                	if (z <= -1.38e+97)
                                		tmp = Float64(x - a);
                                	elseif (z <= 1.15e+109)
                                		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 <= -1.38e+97)
                                		tmp = x - a;
                                	elseif (z <= 1.15e+109)
                                		tmp = x;
                                	else
                                		tmp = x - a;
                                	end
                                	tmp_2 = tmp;
                                end
                                
                                code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.38e+97], N[(x - a), $MachinePrecision], If[LessEqual[z, 1.15e+109], x, N[(x - a), $MachinePrecision]]]
                                
                                \begin{array}{l}
                                
                                \\
                                \begin{array}{l}
                                \mathbf{if}\;z \leq -1.38 \cdot 10^{+97}:\\
                                \;\;\;\;x - a\\
                                
                                \mathbf{elif}\;z \leq 1.15 \cdot 10^{+109}:\\
                                \;\;\;\;x\\
                                
                                \mathbf{else}:\\
                                \;\;\;\;x - a\\
                                
                                
                                \end{array}
                                \end{array}
                                
                                Derivation
                                1. Split input into 2 regimes
                                2. if z < -1.38e97 or 1.15000000000000005e109 < z

                                  1. Initial program 97.4%

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

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

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

                                    if -1.38e97 < z < 1.15000000000000005e109

                                    1. Initial program 97.4%

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

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

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

                                    Alternative 12: 53.9% accurate, 18.3× 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 97.4%

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

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

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

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025123 
                                      (FPCore (x y z t a)
                                        :name "Graphics.Rendering.Chart.SparkLine:renderSparkLine from Chart-1.5.3"
                                        :precision binary64
                                        (- x (/ (- y z) (/ (+ (- t z) 1.0) a))))