Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A

Percentage Accurate: 98.0% → 98.0%
Time: 3.5s
Alternatives: 13
Speedup: 1.0×

Specification

?
\[x + y \cdot \frac{z - t}{z - a} \]
(FPCore (x y z t a)
  :precision binary64
  (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - 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 - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (z - a)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + y \cdot \frac{z - t}{z - a}

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 13 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: 98.0% accurate, 1.0× speedup?

\[x + y \cdot \frac{z - t}{z - a} \]
(FPCore (x y z t a)
  :precision binary64
  (+ x (* y (/ (- z t) (- z a)))))
double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - 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 - a)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + (y * ((z - t) / (z - a)));
}
def code(x, y, z, t, a):
	return x + (y * ((z - t) / (z - a)))
function code(x, y, z, t, a)
	return Float64(x + Float64(y * Float64(Float64(z - t) / Float64(z - a))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + (y * ((z - t) / (z - a)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + y \cdot \frac{z - t}{z - a}

Alternative 1: 88.4% accurate, 0.3× speedup?

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-5}:\\
\;\;\;\;x - \frac{z - t}{a} \cdot y\\

\mathbf{elif}\;t\_1 \leq 10^{+201}:\\
\;\;\;\;x + y \cdot \frac{z - t}{z}\\

\mathbf{else}:\\
\;\;\;\;x + \frac{t \cdot y}{a}\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -9.9999999999999993e74

    1. Initial program 98.0%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
      2. div-flipN/A

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      4. lower-unsound-/.f6497.9%

        \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
    3. Applied rewrites97.9%

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

        \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
      2. add-flipN/A

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
      6. div-flip-revN/A

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

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

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
      12. associate-*r/N/A

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

        \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
      14. associate-/l*N/A

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

        \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
      16. distribute-frac-neg2N/A

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

        \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
    5. Applied rewrites96.0%

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

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

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

        \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
      3. lower--.f6425.9%

        \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
    8. Applied rewrites25.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{a - z} \cdot t \]
      8. lift--.f6428.3%

        \[\leadsto \frac{y}{a - z} \cdot t \]
    10. Applied rewrites28.3%

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

    if -9.9999999999999993e74 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2.0000000000000002e-5

    1. Initial program 98.0%

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

        \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
      2. div-flipN/A

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

        \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
      4. lower-unsound-/.f6497.9%

        \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
    3. Applied rewrites97.9%

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

        \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
      2. add-flipN/A

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
      6. div-flip-revN/A

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

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

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

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

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

        \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
      12. associate-*r/N/A

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

        \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
      14. associate-/l*N/A

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

        \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
      16. distribute-frac-neg2N/A

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

        \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
    5. Applied rewrites96.0%

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x - \frac{\color{blue}{z - t}}{a} \cdot y \]
        9. lower-/.f6459.5%

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

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

      if 2.0000000000000002e-5 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e201

      1. Initial program 98.0%

        \[x + y \cdot \frac{z - t}{z - a} \]
      2. Taylor expanded in a around 0

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

          \[\leadsto x + y \cdot \frac{z - t}{\color{blue}{z}} \]
        2. lower--.f6467.8%

          \[\leadsto x + y \cdot \frac{z - t}{z} \]
      4. Applied rewrites67.8%

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

      if 1e201 < (/.f64 (-.f64 z t) (-.f64 z a))

      1. Initial program 98.0%

        \[x + y \cdot \frac{z - t}{z - a} \]
      2. Taylor expanded in z around 0

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

          \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
        2. lower-*.f6459.6%

          \[\leadsto x + \frac{t \cdot y}{a} \]
      4. Applied rewrites59.6%

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

    Alternative 2: 87.6% accurate, 0.3× speedup?

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

      1. Initial program 98.0%

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

          \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
        2. div-flipN/A

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

          \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
        4. lower-unsound-/.f6497.9%

          \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
      3. Applied rewrites97.9%

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

          \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
        2. add-flipN/A

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
        6. div-flip-revN/A

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

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

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
        12. associate-*r/N/A

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

          \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
        14. associate-/l*N/A

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

          \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
        16. distribute-frac-neg2N/A

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

          \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
      5. Applied rewrites96.0%

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

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

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

          \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
        3. lower--.f6425.9%

          \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
      8. Applied rewrites25.9%

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

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

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

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

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

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

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

          \[\leadsto \frac{y}{a - z} \cdot t \]
        8. lift--.f6428.3%

          \[\leadsto \frac{y}{a - z} \cdot t \]
      10. Applied rewrites28.3%

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

      if -9.9999999999999993e74 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2.0000000000000002e-5

      1. Initial program 98.0%

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

          \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
        2. div-flipN/A

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

          \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
        4. lower-unsound-/.f6497.9%

          \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
      3. Applied rewrites97.9%

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

          \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
        2. add-flipN/A

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
        6. div-flip-revN/A

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

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

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

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

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

          \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
        12. associate-*r/N/A

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

          \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
        14. associate-/l*N/A

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

          \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
        16. distribute-frac-neg2N/A

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

          \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
      5. Applied rewrites96.0%

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

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

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

        if 2.0000000000000002e-5 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1e201

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in a around 0

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

            \[\leadsto x + y \cdot \frac{z - t}{\color{blue}{z}} \]
          2. lower--.f6467.8%

            \[\leadsto x + y \cdot \frac{z - t}{z} \]
        4. Applied rewrites67.8%

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

        if 1e201 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
          2. lower-*.f6459.6%

            \[\leadsto x + \frac{t \cdot y}{a} \]
        4. Applied rewrites59.6%

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

      Alternative 3: 84.4% accurate, 0.6× speedup?

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

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in t around 0

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

            \[\leadsto x + y \cdot \frac{z}{\color{blue}{z - a}} \]
          2. lower--.f6472.1%

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

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

        if -2.4000000000000001e-69 < a < -4.1999999999999998e-108

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in x around 0

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

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - a} \]
          4. lower--.f6438.9%

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - \color{blue}{a}} \]
        4. Applied rewrites38.9%

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{z} - a} \]
          3. associate-/l*N/A

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

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

            \[\leadsto y \cdot \frac{z - t}{z - \color{blue}{a}} \]
          6. *-commutativeN/A

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

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

            \[\leadsto \frac{z - t}{z - a} \cdot y \]
          9. sub-negate-revN/A

            \[\leadsto \frac{z - t}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot y \]
          10. lift--.f64N/A

            \[\leadsto \frac{z - t}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot y \]
          11. distribute-frac-neg2N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{z - t}{a - z}\right)\right) \cdot y \]
          12. distribute-frac-negN/A

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

            \[\leadsto \frac{\mathsf{neg}\left(\left(z - t\right)\right)}{a - z} \cdot y \]
          14. lift--.f64N/A

            \[\leadsto \frac{\mathsf{neg}\left(\left(z - t\right)\right)}{a - z} \cdot y \]
          15. sub-negate-revN/A

            \[\leadsto \frac{t - z}{a - z} \cdot y \]
          16. lower--.f6449.1%

            \[\leadsto \frac{t - z}{a - z} \cdot y \]
        6. Applied rewrites49.1%

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

        if -4.1999999999999998e-108 < a < 1.75e10

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in a around 0

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

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

            \[\leadsto x + \frac{y \cdot \left(z - t\right)}{z} \]
          3. lower--.f6459.0%

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

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

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

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z}} \]
          4. mult-flipN/A

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

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

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

            \[\leadsto x + \left(y \cdot \frac{1}{z}\right) \cdot \color{blue}{\left(z - t\right)} \]
          8. mult-flip-revN/A

            \[\leadsto x + \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
          9. lower-/.f6466.7%

            \[\leadsto x + \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
        6. Applied rewrites66.7%

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

        if 1.75e10 < a

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + y \cdot \frac{t}{\color{blue}{a}} \]
        4. Applied rewrites61.4%

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

      Alternative 4: 83.9% accurate, 0.7× speedup?

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

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + y \cdot \frac{t}{\color{blue}{a}} \]
        4. Applied rewrites61.4%

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

        if -3.5999999999999999e-81 < a < 1.75e10

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in a around 0

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

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

            \[\leadsto x + \frac{y \cdot \left(z - t\right)}{z} \]
          3. lower--.f6459.0%

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

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

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

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z}} \]
          4. mult-flipN/A

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

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

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

            \[\leadsto x + \left(y \cdot \frac{1}{z}\right) \cdot \color{blue}{\left(z - t\right)} \]
          8. mult-flip-revN/A

            \[\leadsto x + \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
          9. lower-/.f6466.7%

            \[\leadsto x + \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
        6. Applied rewrites66.7%

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

      Alternative 5: 82.3% accurate, 0.3× speedup?

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

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

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

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

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

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

            \[\leadsto \frac{y}{a - z} \cdot t \]
          8. lift--.f6428.3%

            \[\leadsto \frac{y}{a - z} \cdot t \]
        10. Applied rewrites28.3%

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

        if -9.9999999999999993e74 < (/.f64 (-.f64 z t) (-.f64 z a)) < 4.9999999999999996e-35

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + y \cdot \frac{t}{\color{blue}{a}} \]
        4. Applied rewrites61.4%

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

        if 4.9999999999999996e-35 < (/.f64 (-.f64 z t) (-.f64 z a)) < 1

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

        if 1 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in x around 0

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

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - a} \]
          4. lower--.f6438.9%

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - \color{blue}{a}} \]
        4. Applied rewrites38.9%

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{z} - a} \]
          3. associate-*l/N/A

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

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          5. sub-negate-revN/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          6. lift--.f64N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          7. distribute-neg-frac2N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(\color{blue}{z} - t\right) \]
          8. lift-/.f64N/A

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

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \color{blue}{\left(z - t\right)} \]
          10. lift-/.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(z - t\right) \]
          11. distribute-neg-frac2N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(\color{blue}{z} - t\right) \]
          12. lift--.f64N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          13. sub-negate-revN/A

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          14. lift--.f64N/A

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          15. lower-/.f6447.3%

            \[\leadsto \frac{y}{z - a} \cdot \left(\color{blue}{z} - t\right) \]
        6. Applied rewrites47.3%

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

      Alternative 6: 79.6% accurate, 0.3× speedup?

      \[\begin{array}{l} t_1 := \frac{z - t}{z - a}\\ t_2 := \frac{y}{a - z} \cdot t\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+75}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-35}:\\ \;\;\;\;x + y \cdot \frac{t}{a}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
      (FPCore (x y z t a)
        :precision binary64
        (let* ((t_1 (/ (- z t) (- z a))) (t_2 (* (/ y (- a z)) t)))
        (if (<= t_1 -1e+75)
          t_2
          (if (<= t_1 5e-35)
            (+ x (* y (/ t a)))
            (if (<= t_1 2e+21) (+ x y) t_2)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (z - t) / (z - a);
      	double t_2 = (y / (a - z)) * t;
      	double tmp;
      	if (t_1 <= -1e+75) {
      		tmp = t_2;
      	} else if (t_1 <= 5e-35) {
      		tmp = x + (y * (t / a));
      	} else if (t_1 <= 2e+21) {
      		tmp = x + y;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, 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) :: t_2
          real(8) :: tmp
          t_1 = (z - t) / (z - a)
          t_2 = (y / (a - z)) * t
          if (t_1 <= (-1d+75)) then
              tmp = t_2
          else if (t_1 <= 5d-35) then
              tmp = x + (y * (t / a))
          else if (t_1 <= 2d+21) then
              tmp = x + y
          else
              tmp = t_2
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = (z - t) / (z - a);
      	double t_2 = (y / (a - z)) * t;
      	double tmp;
      	if (t_1 <= -1e+75) {
      		tmp = t_2;
      	} else if (t_1 <= 5e-35) {
      		tmp = x + (y * (t / a));
      	} else if (t_1 <= 2e+21) {
      		tmp = x + y;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (z - t) / (z - a)
      	t_2 = (y / (a - z)) * t
      	tmp = 0
      	if t_1 <= -1e+75:
      		tmp = t_2
      	elif t_1 <= 5e-35:
      		tmp = x + (y * (t / a))
      	elif t_1 <= 2e+21:
      		tmp = x + y
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(z - t) / Float64(z - a))
      	t_2 = Float64(Float64(y / Float64(a - z)) * t)
      	tmp = 0.0
      	if (t_1 <= -1e+75)
      		tmp = t_2;
      	elseif (t_1 <= 5e-35)
      		tmp = Float64(x + Float64(y * Float64(t / a)));
      	elseif (t_1 <= 2e+21)
      		tmp = Float64(x + y);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (z - t) / (z - a);
      	t_2 = (y / (a - z)) * t;
      	tmp = 0.0;
      	if (t_1 <= -1e+75)
      		tmp = t_2;
      	elseif (t_1 <= 5e-35)
      		tmp = x + (y * (t / a));
      	elseif (t_1 <= 2e+21)
      		tmp = x + y;
      	else
      		tmp = t_2;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+75], t$95$2, If[LessEqual[t$95$1, 5e-35], N[(x + N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+21], N[(x + y), $MachinePrecision], t$95$2]]]]]
      
      \begin{array}{l}
      t_1 := \frac{z - t}{z - a}\\
      t_2 := \frac{y}{a - z} \cdot t\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+75}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-35}:\\
      \;\;\;\;x + y \cdot \frac{t}{a}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
      \;\;\;\;x + y\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -9.9999999999999993e74 or 2e21 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

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

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

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

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

            \[\leadsto \frac{y}{a - z} \cdot t \]
          8. lift--.f6428.3%

            \[\leadsto \frac{y}{a - z} \cdot t \]
        10. Applied rewrites28.3%

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

        if -9.9999999999999993e74 < (/.f64 (-.f64 z t) (-.f64 z a)) < 4.9999999999999996e-35

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + y \cdot \frac{t}{\color{blue}{a}} \]
        4. Applied rewrites61.4%

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

        if 4.9999999999999996e-35 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2e21

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

      Alternative 7: 79.4% accurate, 0.3× speedup?

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

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          4. *-commutativeN/A

            \[\leadsto \frac{y \cdot t}{\color{blue}{a} - z} \]
          5. associate-/l*N/A

            \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
          6. *-commutativeN/A

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

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

            \[\leadsto \frac{t}{a - z} \cdot y \]
          9. lift--.f6427.9%

            \[\leadsto \frac{t}{a - z} \cdot y \]
        10. Applied rewrites27.9%

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

        if -4e18 < (/.f64 (-.f64 z t) (-.f64 z a)) < 4.9999999999999996e-35

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around 0

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

            \[\leadsto x + \frac{t \cdot y}{\color{blue}{a}} \]
          2. lower-*.f6459.6%

            \[\leadsto x + \frac{t \cdot y}{a} \]
        4. Applied rewrites59.6%

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

        if 4.9999999999999996e-35 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2e21

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

        if 2e21 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

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

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

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

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

            \[\leadsto \frac{y}{a - z} \cdot t \]
          8. lift--.f6428.3%

            \[\leadsto \frac{y}{a - z} \cdot t \]
        10. Applied rewrites28.3%

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

      Alternative 8: 73.3% accurate, 0.4× speedup?

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

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          4. *-commutativeN/A

            \[\leadsto \frac{y \cdot t}{\color{blue}{a} - z} \]
          5. associate-/l*N/A

            \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
          6. *-commutativeN/A

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

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

            \[\leadsto \frac{t}{a - z} \cdot y \]
          9. lift--.f6427.9%

            \[\leadsto \frac{t}{a - z} \cdot y \]
        10. Applied rewrites27.9%

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

        if -4e13 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2e21

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

        if 2e21 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

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

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

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

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

            \[\leadsto \frac{y}{a - z} \cdot t \]
          8. lift--.f6428.3%

            \[\leadsto \frac{y}{a - z} \cdot t \]
        10. Applied rewrites28.3%

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

      Alternative 9: 73.1% accurate, 0.4× speedup?

      \[\begin{array}{l} t_1 := \frac{z - t}{z - a}\\ t_2 := \frac{t}{a - z} \cdot y\\ \mathbf{if}\;t\_1 \leq -40000000000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
      (FPCore (x y z t a)
        :precision binary64
        (let* ((t_1 (/ (- z t) (- z a))) (t_2 (* (/ t (- a z)) y)))
        (if (<= t_1 -40000000000000.0) t_2 (if (<= t_1 2e+21) (+ x y) t_2))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (z - t) / (z - a);
      	double t_2 = (t / (a - z)) * y;
      	double tmp;
      	if (t_1 <= -40000000000000.0) {
      		tmp = t_2;
      	} else if (t_1 <= 2e+21) {
      		tmp = x + y;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, 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) :: t_2
          real(8) :: tmp
          t_1 = (z - t) / (z - a)
          t_2 = (t / (a - z)) * y
          if (t_1 <= (-40000000000000.0d0)) then
              tmp = t_2
          else if (t_1 <= 2d+21) then
              tmp = x + y
          else
              tmp = t_2
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = (z - t) / (z - a);
      	double t_2 = (t / (a - z)) * y;
      	double tmp;
      	if (t_1 <= -40000000000000.0) {
      		tmp = t_2;
      	} else if (t_1 <= 2e+21) {
      		tmp = x + y;
      	} else {
      		tmp = t_2;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (z - t) / (z - a)
      	t_2 = (t / (a - z)) * y
      	tmp = 0
      	if t_1 <= -40000000000000.0:
      		tmp = t_2
      	elif t_1 <= 2e+21:
      		tmp = x + y
      	else:
      		tmp = t_2
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(z - t) / Float64(z - a))
      	t_2 = Float64(Float64(t / Float64(a - z)) * y)
      	tmp = 0.0
      	if (t_1 <= -40000000000000.0)
      		tmp = t_2;
      	elseif (t_1 <= 2e+21)
      		tmp = Float64(x + y);
      	else
      		tmp = t_2;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (z - t) / (z - a);
      	t_2 = (t / (a - z)) * y;
      	tmp = 0.0;
      	if (t_1 <= -40000000000000.0)
      		tmp = t_2;
      	elseif (t_1 <= 2e+21)
      		tmp = x + y;
      	else
      		tmp = t_2;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -40000000000000.0], t$95$2, If[LessEqual[t$95$1, 2e+21], N[(x + y), $MachinePrecision], t$95$2]]]]
      
      \begin{array}{l}
      t_1 := \frac{z - t}{z - a}\\
      t_2 := \frac{t}{a - z} \cdot y\\
      \mathbf{if}\;t\_1 \leq -40000000000000:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+21}:\\
      \;\;\;\;x + y\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (/.f64 (-.f64 z t) (-.f64 z a)) < -4e13 or 2e21 < (/.f64 (-.f64 z t) (-.f64 z a))

        1. Initial program 98.0%

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

            \[\leadsto x + y \cdot \color{blue}{\frac{z - t}{z - a}} \]
          2. div-flipN/A

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

            \[\leadsto x + y \cdot \color{blue}{\frac{1}{\frac{z - a}{z - t}}} \]
          4. lower-unsound-/.f6497.9%

            \[\leadsto x + y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}} \]
        3. Applied rewrites97.9%

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

            \[\leadsto \color{blue}{x + y \cdot \frac{1}{\frac{z - a}{z - t}}} \]
          2. add-flipN/A

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{1}{\color{blue}{\frac{z - a}{z - t}}}\right)\right) \]
          6. div-flip-revN/A

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

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

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

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

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

            \[\leadsto x - \left(\mathsf{neg}\left(y \cdot \frac{z - t}{\color{blue}{z - a}}\right)\right) \]
          12. associate-*r/N/A

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

            \[\leadsto x - \left(\mathsf{neg}\left(\frac{\color{blue}{\left(z - t\right) \cdot y}}{z - a}\right)\right) \]
          14. associate-/l*N/A

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

            \[\leadsto x - \color{blue}{\left(z - t\right) \cdot \left(\mathsf{neg}\left(\frac{y}{z - a}\right)\right)} \]
          16. distribute-frac-neg2N/A

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

            \[\leadsto x - \color{blue}{\frac{y}{\mathsf{neg}\left(\left(z - a\right)\right)} \cdot \left(z - t\right)} \]
        5. Applied rewrites96.0%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          3. lower--.f6425.9%

            \[\leadsto \frac{t \cdot y}{a - \color{blue}{z}} \]
        8. Applied rewrites25.9%

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

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

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

            \[\leadsto \frac{t \cdot y}{\color{blue}{a} - z} \]
          4. *-commutativeN/A

            \[\leadsto \frac{y \cdot t}{\color{blue}{a} - z} \]
          5. associate-/l*N/A

            \[\leadsto y \cdot \color{blue}{\frac{t}{a - z}} \]
          6. *-commutativeN/A

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

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

            \[\leadsto \frac{t}{a - z} \cdot y \]
          9. lift--.f6427.9%

            \[\leadsto \frac{t}{a - z} \cdot y \]
        10. Applied rewrites27.9%

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

        if -4e13 < (/.f64 (-.f64 z t) (-.f64 z a)) < 2e21

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

      Alternative 10: 68.6% accurate, 0.3× speedup?

      \[\begin{array}{l} t_1 := \frac{y}{z} \cdot \left(z - t\right)\\ t_2 := y \cdot \frac{z - t}{z - a}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+244}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
      (FPCore (x y z t a)
        :precision binary64
        (let* ((t_1 (* (/ y z) (- z t))) (t_2 (* y (/ (- z t) (- z a)))))
        (if (<= t_2 -5e+232) t_1 (if (<= t_2 2e+244) (+ x y) t_1))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = (y / z) * (z - t);
      	double t_2 = y * ((z - t) / (z - a));
      	double tmp;
      	if (t_2 <= -5e+232) {
      		tmp = t_1;
      	} else if (t_2 <= 2e+244) {
      		tmp = x + 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) :: t_2
          real(8) :: tmp
          t_1 = (y / z) * (z - t)
          t_2 = y * ((z - t) / (z - a))
          if (t_2 <= (-5d+232)) then
              tmp = t_1
          else if (t_2 <= 2d+244) then
              tmp = x + 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 = (y / z) * (z - t);
      	double t_2 = y * ((z - t) / (z - a));
      	double tmp;
      	if (t_2 <= -5e+232) {
      		tmp = t_1;
      	} else if (t_2 <= 2e+244) {
      		tmp = x + y;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = (y / z) * (z - t)
      	t_2 = y * ((z - t) / (z - a))
      	tmp = 0
      	if t_2 <= -5e+232:
      		tmp = t_1
      	elif t_2 <= 2e+244:
      		tmp = x + y
      	else:
      		tmp = t_1
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(Float64(y / z) * Float64(z - t))
      	t_2 = Float64(y * Float64(Float64(z - t) / Float64(z - a)))
      	tmp = 0.0
      	if (t_2 <= -5e+232)
      		tmp = t_1;
      	elseif (t_2 <= 2e+244)
      		tmp = Float64(x + y);
      	else
      		tmp = t_1;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = (y / z) * (z - t);
      	t_2 = y * ((z - t) / (z - a));
      	tmp = 0.0;
      	if (t_2 <= -5e+232)
      		tmp = t_1;
      	elseif (t_2 <= 2e+244)
      		tmp = x + y;
      	else
      		tmp = t_1;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y / z), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(y * N[(N[(z - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+232], t$95$1, If[LessEqual[t$95$2, 2e+244], N[(x + y), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      t_1 := \frac{y}{z} \cdot \left(z - t\right)\\
      t_2 := y \cdot \frac{z - t}{z - a}\\
      \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+232}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+244}:\\
      \;\;\;\;x + y\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 2 regimes
      2. if (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < -4.9999999999999999e232 or 2.0000000000000001e244 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a)))

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in x around 0

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

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - a} \]
          4. lower--.f6438.9%

            \[\leadsto \frac{y \cdot \left(z - t\right)}{z - \color{blue}{a}} \]
        4. Applied rewrites38.9%

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

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

            \[\leadsto \frac{y \cdot \left(z - t\right)}{\color{blue}{z} - a} \]
          3. associate-*l/N/A

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

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          5. sub-negate-revN/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          6. lift--.f64N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          7. distribute-neg-frac2N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(\color{blue}{z} - t\right) \]
          8. lift-/.f64N/A

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

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \color{blue}{\left(z - t\right)} \]
          10. lift-/.f64N/A

            \[\leadsto \left(\mathsf{neg}\left(\frac{y}{a - z}\right)\right) \cdot \left(z - t\right) \]
          11. distribute-neg-frac2N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(\color{blue}{z} - t\right) \]
          12. lift--.f64N/A

            \[\leadsto \frac{y}{\mathsf{neg}\left(\left(a - z\right)\right)} \cdot \left(z - t\right) \]
          13. sub-negate-revN/A

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          14. lift--.f64N/A

            \[\leadsto \frac{y}{z - a} \cdot \left(z - t\right) \]
          15. lower-/.f6447.3%

            \[\leadsto \frac{y}{z - a} \cdot \left(\color{blue}{z} - t\right) \]
        6. Applied rewrites47.3%

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

          \[\leadsto \frac{y}{z} \cdot \left(\color{blue}{z} - t\right) \]
        8. Step-by-step derivation
          1. lower-/.f6430.3%

            \[\leadsto \frac{y}{z} \cdot \left(z - t\right) \]
        9. Applied rewrites30.3%

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

        if -4.9999999999999999e232 < (*.f64 y (/.f64 (-.f64 z t) (-.f64 z a))) < 2.0000000000000001e244

        1. Initial program 98.0%

          \[x + y \cdot \frac{z - t}{z - a} \]
        2. Taylor expanded in z around inf

          \[\leadsto \color{blue}{x + y} \]
        3. Step-by-step derivation
          1. lower-+.f6461.2%

            \[\leadsto x + \color{blue}{y} \]
        4. Applied rewrites61.2%

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

      Alternative 11: 61.2% accurate, 6.5× speedup?

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

        \[x + y \cdot \frac{z - t}{z - a} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6461.2%

          \[\leadsto x + \color{blue}{y} \]
      4. Applied rewrites61.2%

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

      Alternative 12: 19.4% accurate, 26.0× speedup?

      \[y \]
      (FPCore (x y z t a)
        :precision binary64
        y)
      double code(double x, double y, double z, double t, double a) {
      	return y;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, 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 = y
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	return y;
      }
      
      def code(x, y, z, t, a):
      	return y
      
      function code(x, y, z, t, a)
      	return y
      end
      
      function tmp = code(x, y, z, t, a)
      	tmp = y;
      end
      
      code[x_, y_, z_, t_, a_] := y
      
      y
      
      Derivation
      1. Initial program 98.0%

        \[x + y \cdot \frac{z - t}{z - a} \]
      2. Taylor expanded in z around inf

        \[\leadsto \color{blue}{x + y} \]
      3. Step-by-step derivation
        1. lower-+.f6461.2%

          \[\leadsto x + \color{blue}{y} \]
      4. Applied rewrites61.2%

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

        \[\leadsto y \]
      6. Step-by-step derivation
        1. Applied rewrites19.4%

          \[\leadsto y \]
        2. Add Preprocessing

        Reproduce

        ?
        herbie shell --seed 2025258 
        (FPCore (x y z t a)
          :name "Graphics.Rendering.Plot.Render.Plot.Axis:renderAxisLine from plot-0.2.3.4, A"
          :precision binary64
          (+ x (* y (/ (- z t) (- z a)))))