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

Percentage Accurate: 84.9% → 98.0%
Time: 4.1s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[x + \frac{y \cdot \left(z - t\right)}{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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{y \cdot \left(z - t\right)}{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 11 alternatives:

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

Initial Program: 84.9% accurate, 1.0× speedup?

\[x + \frac{y \cdot \left(z - t\right)}{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(Float64(y * 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[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x + \frac{y \cdot \left(z - t\right)}{z - a}

Alternative 1: 98.0% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
    13. lower--.f6498.0%

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

    \[\leadsto x + \color{blue}{\frac{t - z}{a - z} \cdot y} \]
  4. Add Preprocessing

Alternative 2: 85.8% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := x + \frac{t}{a - z} \cdot y\\ \mathbf{if}\;t \leq -4.8 \cdot 10^{-111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{-55}:\\ \;\;\;\;x + \frac{z}{z - a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (+ x (* (/ t (- a z)) y))))
  (if (<= t -4.8e-111)
    t_1
    (if (<= t 1.06e-55) (+ x (* (/ z (- z a)) y)) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t / (a - z)) * y);
	double tmp;
	if (t <= -4.8e-111) {
		tmp = t_1;
	} else if (t <= 1.06e-55) {
		tmp = x + ((z / (z - a)) * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((t / (a - z)) * y)
    if (t <= (-4.8d-111)) then
        tmp = t_1
    else if (t <= 1.06d-55) then
        tmp = x + ((z / (z - a)) * y)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((t / (a - z)) * y);
	double tmp;
	if (t <= -4.8e-111) {
		tmp = t_1;
	} else if (t <= 1.06e-55) {
		tmp = x + ((z / (z - a)) * y);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((t / (a - z)) * y)
	tmp = 0
	if t <= -4.8e-111:
		tmp = t_1
	elif t <= 1.06e-55:
		tmp = x + ((z / (z - a)) * y)
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(t / Float64(a - z)) * y))
	tmp = 0.0
	if (t <= -4.8e-111)
		tmp = t_1;
	elseif (t <= 1.06e-55)
		tmp = Float64(x + Float64(Float64(z / Float64(z - a)) * y));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + ((t / (a - z)) * y);
	tmp = 0.0;
	if (t <= -4.8e-111)
		tmp = t_1;
	elseif (t <= 1.06e-55)
		tmp = x + ((z / (z - a)) * y);
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.8e-111], t$95$1, If[LessEqual[t, 1.06e-55], N[(x + N[(N[(z / N[(z - a), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := x + \frac{t}{a - z} \cdot y\\
\mathbf{if}\;t \leq -4.8 \cdot 10^{-111}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.06 \cdot 10^{-55}:\\
\;\;\;\;x + \frac{z}{z - a} \cdot y\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.8000000000000001e-111 or 1.06e-55 < t

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
      13. lower--.f6498.0%

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

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

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

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

      if -4.8000000000000001e-111 < t < 1.06e-55

      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
        13. lower--.f6498.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{-1 \cdot \left(t - z\right)}} \cdot y \]
        14. mul-1-negN/A

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

          \[\leadsto x + \frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)}} \cdot y \]
        16. sub-negate-revN/A

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

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

          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{z - t}}} \cdot y \]
        19. metadata-evalN/A

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

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

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

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

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

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

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

    Alternative 3: 82.8% accurate, 0.7× speedup?

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

      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
        13. lower--.f6498.0%

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

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

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

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

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

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

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

      if -4.8000000000000001e-111 < t < 1.06e-55

      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
        13. lower--.f6498.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{\color{blue}{\mathsf{neg}\left(-1\right)}}{\frac{z - a}{-1 \cdot \left(t - z\right)}} \cdot y \]
        14. mul-1-negN/A

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

          \[\leadsto x + \frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{\mathsf{neg}\left(\color{blue}{\left(t - z\right)}\right)}} \cdot y \]
        16. sub-negate-revN/A

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

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

          \[\leadsto x + \color{blue}{\frac{\mathsf{neg}\left(-1\right)}{\frac{z - a}{z - t}}} \cdot y \]
        19. metadata-evalN/A

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

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

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

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

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

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

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

    Alternative 4: 82.0% accurate, 0.7× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+94}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+213}:\\ \;\;\;\;x + \frac{t \cdot y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<= z -1.3e+94)
      (+ x y)
      (if (<= z 1.65e+213) (+ x (/ (* t y) (- a z))) (+ x y))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -1.3e+94) {
    		tmp = x + y;
    	} else if (z <= 1.65e+213) {
    		tmp = x + ((t * y) / (a - z));
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (z <= (-1.3d+94)) then
            tmp = x + y
        else if (z <= 1.65d+213) then
            tmp = x + ((t * y) / (a - z))
        else
            tmp = x + y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -1.3e+94) {
    		tmp = x + y;
    	} else if (z <= 1.65e+213) {
    		tmp = x + ((t * y) / (a - z));
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -1.3e+94:
    		tmp = x + y
    	elif z <= 1.65e+213:
    		tmp = x + ((t * y) / (a - z))
    	else:
    		tmp = x + y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -1.3e+94)
    		tmp = Float64(x + y);
    	elseif (z <= 1.65e+213)
    		tmp = Float64(x + Float64(Float64(t * y) / Float64(a - z)));
    	else
    		tmp = Float64(x + y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -1.3e+94)
    		tmp = x + y;
    	elseif (z <= 1.65e+213)
    		tmp = x + ((t * y) / (a - z));
    	else
    		tmp = x + y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.3e+94], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.65e+213], N[(x + N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.3 \cdot 10^{+94}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;z \leq 1.65 \cdot 10^{+213}:\\
    \;\;\;\;x + \frac{t \cdot y}{a - z}\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.3e94 or 1.6500000000000001e213 < z

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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.3e94 < z < 1.6500000000000001e213

      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
        13. lower--.f6498.0%

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

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

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

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

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

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

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

    Alternative 5: 78.7% accurate, 0.2× speedup?

    \[\begin{array}{l} t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\ t_2 := \frac{y \cdot \left(z - t\right)}{z - a}\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+20}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-291}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-172}:\\ \;\;\;\;x + \frac{t \cdot y}{a}\\ \mathbf{elif}\;t\_2 \leq 10^{+65}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (let* ((t_1 (* (/ y (- z a)) (- z t)))
           (t_2 (/ (* y (- z t)) (- z a))))
      (if (<= t_2 -5e+20)
        t_1
        (if (<= t_2 -5e-291)
          (+ x y)
          (if (<= t_2 5e-172)
            (+ x (/ (* t y) a))
            (if (<= t_2 1e+65) (+ x y) t_1))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (y / (z - a)) * (z - t);
    	double t_2 = (y * (z - t)) / (z - a);
    	double tmp;
    	if (t_2 <= -5e+20) {
    		tmp = t_1;
    	} else if (t_2 <= -5e-291) {
    		tmp = x + y;
    	} else if (t_2 <= 5e-172) {
    		tmp = x + ((t * y) / a);
    	} else if (t_2 <= 1e+65) {
    		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 - a)) * (z - t)
        t_2 = (y * (z - t)) / (z - a)
        if (t_2 <= (-5d+20)) then
            tmp = t_1
        else if (t_2 <= (-5d-291)) then
            tmp = x + y
        else if (t_2 <= 5d-172) then
            tmp = x + ((t * y) / a)
        else if (t_2 <= 1d+65) 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 - a)) * (z - t);
    	double t_2 = (y * (z - t)) / (z - a);
    	double tmp;
    	if (t_2 <= -5e+20) {
    		tmp = t_1;
    	} else if (t_2 <= -5e-291) {
    		tmp = x + y;
    	} else if (t_2 <= 5e-172) {
    		tmp = x + ((t * y) / a);
    	} else if (t_2 <= 1e+65) {
    		tmp = x + y;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = (y / (z - a)) * (z - t)
    	t_2 = (y * (z - t)) / (z - a)
    	tmp = 0
    	if t_2 <= -5e+20:
    		tmp = t_1
    	elif t_2 <= -5e-291:
    		tmp = x + y
    	elif t_2 <= 5e-172:
    		tmp = x + ((t * y) / a)
    	elif t_2 <= 1e+65:
    		tmp = x + y
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(y / Float64(z - a)) * Float64(z - t))
    	t_2 = Float64(Float64(y * Float64(z - t)) / Float64(z - a))
    	tmp = 0.0
    	if (t_2 <= -5e+20)
    		tmp = t_1;
    	elseif (t_2 <= -5e-291)
    		tmp = Float64(x + y);
    	elseif (t_2 <= 5e-172)
    		tmp = Float64(x + Float64(Float64(t * y) / a));
    	elseif (t_2 <= 1e+65)
    		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 - a)) * (z - t);
    	t_2 = (y * (z - t)) / (z - a);
    	tmp = 0.0;
    	if (t_2 <= -5e+20)
    		tmp = t_1;
    	elseif (t_2 <= -5e-291)
    		tmp = x + y;
    	elseif (t_2 <= 5e-172)
    		tmp = x + ((t * y) / a);
    	elseif (t_2 <= 1e+65)
    		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 / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(z - t), $MachinePrecision]), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+20], t$95$1, If[LessEqual[t$95$2, -5e-291], N[(x + y), $MachinePrecision], If[LessEqual[t$95$2, 5e-172], N[(x + N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 1e+65], N[(x + y), $MachinePrecision], t$95$1]]]]]]
    
    \begin{array}{l}
    t_1 := \frac{y}{z - a} \cdot \left(z - t\right)\\
    t_2 := \frac{y \cdot \left(z - t\right)}{z - a}\\
    \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+20}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-291}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-172}:\\
    \;\;\;\;x + \frac{t \cdot y}{a}\\
    
    \mathbf{elif}\;t\_2 \leq 10^{+65}:\\
    \;\;\;\;x + y\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5e20 or 9.9999999999999999e64 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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. mult-flipN/A

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

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

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

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

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

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

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

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

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

      if -5e20 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < -5.0000000000000003e-291 or 4.9999999999999999e-172 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 9.9999999999999999e64

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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 -5.0000000000000003e-291 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a)) < 4.9999999999999999e-172

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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}} \]
    3. Recombined 3 regimes into one program.
    4. Add Preprocessing

    Alternative 6: 76.8% accurate, 0.8× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+16}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.15 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{t}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<= z -1.65e+16)
      (+ x y)
      (if (<= z 1.15e+106) (+ x (* (/ t a) y)) (+ x y))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -1.65e+16) {
    		tmp = x + y;
    	} else if (z <= 1.15e+106) {
    		tmp = x + ((t / a) * y);
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (z <= (-1.65d+16)) then
            tmp = x + y
        else if (z <= 1.15d+106) then
            tmp = x + ((t / a) * y)
        else
            tmp = x + y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -1.65e+16) {
    		tmp = x + y;
    	} else if (z <= 1.15e+106) {
    		tmp = x + ((t / a) * y);
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -1.65e+16:
    		tmp = x + y
    	elif z <= 1.15e+106:
    		tmp = x + ((t / a) * y)
    	else:
    		tmp = x + y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -1.65e+16)
    		tmp = Float64(x + y);
    	elseif (z <= 1.15e+106)
    		tmp = Float64(x + Float64(Float64(t / a) * y));
    	else
    		tmp = Float64(x + y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -1.65e+16)
    		tmp = x + y;
    	elseif (z <= 1.15e+106)
    		tmp = x + ((t / a) * y);
    	else
    		tmp = x + y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.65e+16], N[(x + y), $MachinePrecision], If[LessEqual[z, 1.15e+106], N[(x + N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -1.65 \cdot 10^{+16}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;z \leq 1.15 \cdot 10^{+106}:\\
    \;\;\;\;x + \frac{t}{a} \cdot y\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -1.65e16 or 1.1500000000000001e106 < z

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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.65e16 < z < 1.1500000000000001e106

      1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{t - z}{\color{blue}{a - z}} \cdot y \]
        13. lower--.f6498.0%

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

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

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

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

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

    Alternative 7: 75.8% accurate, 0.8× speedup?

    \[\begin{array}{l} \mathbf{if}\;z \leq -9.2 \cdot 10^{-125}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 390000000:\\ \;\;\;\;x + \frac{y}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;x + y\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (if (<= z -9.2e-125)
      (+ x y)
      (if (<= z 390000000.0) (+ x (* (/ y a) t)) (+ x y))))
    double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -9.2e-125) {
    		tmp = x + y;
    	} else if (z <= 390000000.0) {
    		tmp = x + ((y / a) * t);
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8) :: tmp
        if (z <= (-9.2d-125)) then
            tmp = x + y
        else if (z <= 390000000.0d0) then
            tmp = x + ((y / a) * t)
        else
            tmp = x + y
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a) {
    	double tmp;
    	if (z <= -9.2e-125) {
    		tmp = x + y;
    	} else if (z <= 390000000.0) {
    		tmp = x + ((y / a) * t);
    	} else {
    		tmp = x + y;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	tmp = 0
    	if z <= -9.2e-125:
    		tmp = x + y
    	elif z <= 390000000.0:
    		tmp = x + ((y / a) * t)
    	else:
    		tmp = x + y
    	return tmp
    
    function code(x, y, z, t, a)
    	tmp = 0.0
    	if (z <= -9.2e-125)
    		tmp = Float64(x + y);
    	elseif (z <= 390000000.0)
    		tmp = Float64(x + Float64(Float64(y / a) * t));
    	else
    		tmp = Float64(x + y);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	tmp = 0.0;
    	if (z <= -9.2e-125)
    		tmp = x + y;
    	elseif (z <= 390000000.0)
    		tmp = x + ((y / a) * t);
    	else
    		tmp = x + y;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := If[LessEqual[z, -9.2e-125], N[(x + y), $MachinePrecision], If[LessEqual[z, 390000000.0], N[(x + N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]), $MachinePrecision], N[(x + y), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;z \leq -9.2 \cdot 10^{-125}:\\
    \;\;\;\;x + y\\
    
    \mathbf{elif}\;z \leq 390000000:\\
    \;\;\;\;x + \frac{y}{a} \cdot t\\
    
    \mathbf{else}:\\
    \;\;\;\;x + y\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if z < -9.1999999999999996e-125 or 3.9e8 < z

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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 -9.1999999999999996e-125 < z < 3.9e8

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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}} \]
      5. Step-by-step derivation
        1. lift-/.f64N/A

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

          \[\leadsto x + \frac{t \cdot y}{a} \]
        3. associate-/l*N/A

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

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

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

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

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

    Alternative 8: 61.5% accurate, 0.5× speedup?

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

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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 9.9999999999999999e64 < (/.f64 (*.f64 y (-.f64 z t)) (-.f64 z a))

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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. Taylor expanded in t around 0

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

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

          \[\leadsto \frac{y \cdot z}{z - a} \]
        3. lower--.f6415.9%

          \[\leadsto \frac{y \cdot z}{z - a} \]
      7. Applied rewrites15.9%

        \[\leadsto \frac{y \cdot z}{\color{blue}{z - a}} \]
      8. Taylor expanded in a around 0

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

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

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

          \[\leadsto \frac{y \cdot \left(z - t\right)}{z} \]
      10. Applied rewrites24.0%

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

    Alternative 9: 61.2% accurate, 1.0× speedup?

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

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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.7999999999999999e163 < y

      1. Initial program 84.9%

        \[x + \frac{y \cdot \left(z - t\right)}{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. Taylor expanded in t around 0

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

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

          \[\leadsto \frac{y \cdot z}{z - a} \]
        3. lower--.f6415.9%

          \[\leadsto \frac{y \cdot z}{z - a} \]
      7. Applied rewrites15.9%

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

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

          \[\leadsto \frac{y \cdot z}{z - a} \]
        3. associate-*l/N/A

          \[\leadsto \frac{y}{z - a} \cdot z \]
        4. div-flip-revN/A

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

          \[\leadsto \frac{1}{\frac{z - a}{y}} \cdot z \]
        6. lift-/.f64N/A

          \[\leadsto \frac{1}{\frac{z - a}{y}} \cdot z \]
        7. lower-*.f6422.5%

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

          \[\leadsto \frac{1}{\frac{z - a}{y}} \cdot z \]
        9. lift-/.f64N/A

          \[\leadsto \frac{1}{\frac{z - a}{y}} \cdot z \]
        10. div-flip-revN/A

          \[\leadsto \frac{y}{z - a} \cdot z \]
        11. lift-/.f6422.7%

          \[\leadsto \frac{y}{z - a} \cdot z \]
      9. Applied rewrites22.7%

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

    Alternative 10: 59.8% 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 84.9%

      \[x + \frac{y \cdot \left(z - t\right)}{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 11: 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 84.9%

      \[x + \frac{y \cdot \left(z - t\right)}{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:renderAxisTicks from plot-0.2.3.4, A"
        :precision binary64
        (+ x (/ (* y (- z t)) (- z a))))