Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 68.3% → 90.6%
Time: 5.4s
Alternatives: 19
Speedup: 0.8×

Specification

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

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

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

Alternative 1: 90.6% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -4 \cdot 10^{-303}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (- x (* (/ (- z y) (- a z)) (- t x))))
       (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
  (if (<= t_2 -4e-303)
    t_1
    (if (<= t_2 0.0)
      (+ t (* -1.0 (/ (- (* y (- t x)) (* a (- t x))) z)))
      t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (((z - y) / (a - z)) * (t - x));
	double t_2 = x + (((y - z) * (t - x)) / (a - z));
	double tmp;
	if (t_2 <= -4e-303) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t + (-1.0 * (((y * (t - x)) - (a * (t - x))) / z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -3.9999999999999997e-303 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 68.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
      8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999997e-303 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 0.0

    1. Initial program 68.3%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6446.9%

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

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

Alternative 2: 84.3% accurate, 0.8× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -4.7 \cdot 10^{+176}:\\ \;\;\;\;t \cdot 1\\ \mathbf{else}:\\ \;\;\;\;x - \frac{z - y}{a - z} \cdot \left(t - x\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (if (<= z -4.7e+176) (* t 1.0) (- x (* (/ (- z y) (- a z)) (- t x)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.7e+176) {
		tmp = t * 1.0;
	} else {
		tmp = x - (((z - y) / (a - z)) * (t - x));
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.6999999999999998e176

    1. Initial program 68.3%

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
      8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
      6. lower--.f6451.7%

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

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

      \[\leadsto t \cdot 1 \]
    8. Step-by-step derivation
      1. Applied rewrites25.6%

        \[\leadsto t \cdot 1 \]

      if -4.6999999999999998e176 < z

      1. Initial program 68.3%

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

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

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

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

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

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

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

          \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
        8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 83.6% accurate, 0.3× speedup?

    \[\begin{array}{l} t_1 := x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\ t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
    (FPCore (x y z t a)
      :precision binary64
      (let* ((t_1 (+ x (* (/ (- x t) (- z a)) (- y z))))
           (t_2 (+ x (/ (* (- y z) (- t x)) (- a z)))))
      (if (<= t_2 (- INFINITY)) t_1 (if (<= t_2 5e+275) t_2 t_1))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = x + (((x - t) / (z - a)) * (y - z));
    	double t_2 = x + (((y - z) * (t - x)) / (a - z));
    	double tmp;
    	if (t_2 <= -((double) INFINITY)) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+275) {
    		tmp = t_2;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    public static double code(double x, double y, double z, double t, double a) {
    	double t_1 = x + (((x - t) / (z - a)) * (y - z));
    	double t_2 = x + (((y - z) * (t - x)) / (a - z));
    	double tmp;
    	if (t_2 <= -Double.POSITIVE_INFINITY) {
    		tmp = t_1;
    	} else if (t_2 <= 5e+275) {
    		tmp = t_2;
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a):
    	t_1 = x + (((x - t) / (z - a)) * (y - z))
    	t_2 = x + (((y - z) * (t - x)) / (a - z))
    	tmp = 0
    	if t_2 <= -math.inf:
    		tmp = t_1
    	elif t_2 <= 5e+275:
    		tmp = t_2
    	else:
    		tmp = t_1
    	return tmp
    
    function code(x, y, z, t, a)
    	t_1 = Float64(x + Float64(Float64(Float64(x - t) / Float64(z - a)) * Float64(y - z)))
    	t_2 = Float64(x + Float64(Float64(Float64(y - z) * Float64(t - x)) / Float64(a - z)))
    	tmp = 0.0
    	if (t_2 <= Float64(-Inf))
    		tmp = t_1;
    	elseif (t_2 <= 5e+275)
    		tmp = t_2;
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a)
    	t_1 = x + (((x - t) / (z - a)) * (y - z));
    	t_2 = x + (((y - z) * (t - x)) / (a - z));
    	tmp = 0.0;
    	if (t_2 <= -Inf)
    		tmp = t_1;
    	elseif (t_2 <= 5e+275)
    		tmp = t_2;
    	else
    		tmp = t_1;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(N[(y - z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, 5e+275], t$95$2, t$95$1]]]]
    
    \begin{array}{l}
    t_1 := x + \frac{x - t}{z - a} \cdot \left(y - z\right)\\
    t_2 := x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z}\\
    \mathbf{if}\;t\_2 \leq -\infty:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+275}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -inf.0 or 5.0000000000000003e275 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

      1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{x - t}{\color{blue}{z - a}} \cdot \left(y - z\right) \]
        13. lower--.f6479.6%

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

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

      if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.0000000000000003e275

      1. Initial program 68.3%

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

    Alternative 4: 80.0% accurate, 0.8× speedup?

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

      1. Initial program 68.3%

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

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

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

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

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

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

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

          \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
        8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
        6. lower--.f6451.7%

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

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

        \[\leadsto t \cdot 1 \]
      8. Step-by-step derivation
        1. Applied rewrites25.6%

          \[\leadsto t \cdot 1 \]

        if -4e176 < z

        1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto x + \frac{x - t}{\color{blue}{z - a}} \cdot \left(y - z\right) \]
          13. lower--.f6479.6%

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

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

      Alternative 5: 71.2% accurate, 0.7× speedup?

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

        1. Initial program 68.3%

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

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

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

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

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

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

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

            \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
          8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
          6. lower--.f6451.7%

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

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

          \[\leadsto t \cdot 1 \]
        8. Step-by-step derivation
          1. Applied rewrites25.6%

            \[\leadsto t \cdot 1 \]

          if -1.16e197 < z < -3.2000000000000002e-31 or 1.66e-212 < z

          1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a - z}} \]
              18. lift-/.f6467.4%

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

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

            if -3.2000000000000002e-31 < z < 1.66e-212

            1. Initial program 68.3%

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

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

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

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

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

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

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

                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
              8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 6: 69.9% accurate, 0.7× speedup?

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

              1. Initial program 68.3%

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

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

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

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

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

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

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

                  \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                6. lower--.f6451.7%

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

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

                \[\leadsto t \cdot 1 \]
              8. Step-by-step derivation
                1. Applied rewrites25.6%

                  \[\leadsto t \cdot 1 \]

                if -1.16e197 < z < -6.2000000000000004e-120 or 7.4e-219 < z

                1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                    18. lift-/.f6467.4%

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

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

                  if -6.2000000000000004e-120 < z < 7.4e-219

                  1. Initial program 68.3%

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

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

                      \[\leadsto x + \frac{y \cdot \color{blue}{\left(t - x\right)}}{a - z} \]
                    2. lower--.f6454.8%

                      \[\leadsto x + \frac{y \cdot \left(t - \color{blue}{x}\right)}{a - z} \]
                  4. Applied rewrites54.8%

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

                Alternative 7: 69.8% accurate, 0.8× speedup?

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

                  1. Initial program 68.3%

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

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

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

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

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

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

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

                      \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                    8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
                    10. lift--.f6443.3%

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

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

                  if -5.2000000000000001e-11 < y < 4.5999999999999999e175

                  1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                      18. lift-/.f6467.4%

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

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

                  Alternative 8: 59.1% accurate, 0.6× speedup?

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

                    1. Initial program 68.3%

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

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

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

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

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

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

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

                        \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                      8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                      6. lower--.f6451.7%

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

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

                      \[\leadsto t \cdot 1 \]
                    8. Step-by-step derivation
                      1. Applied rewrites25.6%

                        \[\leadsto t \cdot 1 \]

                      if -9.1999999999999997e169 < z < -3.5000000000000002e-14 or 7.0000000000000006e-104 < z

                      1. Initial program 68.3%

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

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

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

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

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

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

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

                          \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                        8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                        6. lower--.f6451.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{neg}\left(\frac{t \cdot \left(z - y\right)}{a - z}\right) \]
                        13. lower-neg.f6439.9%

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

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

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

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

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

                          \[\leadsto -\left(z - y\right) \cdot \frac{t}{a - z} \]
                        19. lower-*.f6445.6%

                          \[\leadsto -\left(z - y\right) \cdot \frac{t}{a - z} \]
                      8. Applied rewrites45.6%

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

                      if -3.5000000000000002e-14 < z < 7.4e-219

                      1. Initial program 68.3%

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

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

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

                          \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                        3. lower--.f6443.9%

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

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

                      if 7.4e-219 < z < 7.0000000000000006e-104

                      1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                          18. lift-/.f6467.4%

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

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

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

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

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

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

                      Alternative 9: 57.6% accurate, 0.8× speedup?

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

                        1. Initial program 68.3%

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

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

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

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

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

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

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

                            \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                          8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
                          10. lift--.f6443.3%

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

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

                        if -3.0999999999999999e-61 < y < 2.8000000000000002e23

                        1. Initial program 68.3%

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        3. Step-by-step derivation
                          1. lower--.f6419.7%

                            \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                        4. Applied rewrites19.7%

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                        5. Taylor expanded in x around inf

                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                        6. Step-by-step derivation
                          1. lower-*.f642.8%

                            \[\leadsto x + -1 \cdot x \]
                        7. Applied rewrites2.8%

                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                        8. Step-by-step derivation
                          1. lift-+.f64N/A

                            \[\leadsto \color{blue}{x + -1 \cdot x} \]
                          2. +-commutativeN/A

                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                          3. lower-+.f642.8%

                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                          4. lift-*.f64N/A

                            \[\leadsto -1 \cdot x + x \]
                          5. mul-1-negN/A

                            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                          6. lower-neg.f642.8%

                            \[\leadsto \left(-x\right) + x \]
                        9. Applied rewrites2.8%

                          \[\leadsto \color{blue}{\left(-x\right) + x} \]
                        10. Taylor expanded in x around 0

                          \[\leadsto t + x \]
                        11. Step-by-step derivation
                          1. Applied rewrites34.6%

                            \[\leadsto t + x \]
                        12. Recombined 2 regimes into one program.
                        13. Add Preprocessing

                        Alternative 10: 57.0% accurate, 0.8× speedup?

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

                          1. Initial program 68.3%

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

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

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

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

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

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

                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                            6. lower--.f6441.5%

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

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

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

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot \color{blue}{y} \]
                            3. lower-*.f6441.5%

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

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

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

                              \[\leadsto \left(\frac{t}{a - z} - \frac{x}{a - z}\right) \cdot y \]
                            7. sub-divN/A

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

                              \[\leadsto \frac{t - x}{a - z} \cdot y \]
                            9. frac-2negN/A

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

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

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

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

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

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

                              \[\leadsto \frac{x - t}{z - a} \cdot y \]
                            16. lower--.f6441.8%

                              \[\leadsto \frac{x - t}{z - a} \cdot y \]
                          6. Applied rewrites41.8%

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

                          if -4.0000000000000001e-54 < y < 2.8000000000000002e23

                          1. Initial program 68.3%

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

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          3. Step-by-step derivation
                            1. lower--.f6419.7%

                              \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                          4. Applied rewrites19.7%

                            \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                          5. Taylor expanded in x around inf

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          6. Step-by-step derivation
                            1. lower-*.f642.8%

                              \[\leadsto x + -1 \cdot x \]
                          7. Applied rewrites2.8%

                            \[\leadsto x + -1 \cdot \color{blue}{x} \]
                          8. Step-by-step derivation
                            1. lift-+.f64N/A

                              \[\leadsto \color{blue}{x + -1 \cdot x} \]
                            2. +-commutativeN/A

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            3. lower-+.f642.8%

                              \[\leadsto \color{blue}{-1 \cdot x + x} \]
                            4. lift-*.f64N/A

                              \[\leadsto -1 \cdot x + x \]
                            5. mul-1-negN/A

                              \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                            6. lower-neg.f642.8%

                              \[\leadsto \left(-x\right) + x \]
                          9. Applied rewrites2.8%

                            \[\leadsto \color{blue}{\left(-x\right) + x} \]
                          10. Taylor expanded in x around 0

                            \[\leadsto t + x \]
                          11. Step-by-step derivation
                            1. Applied rewrites34.6%

                              \[\leadsto t + x \]
                          12. Recombined 2 regimes into one program.
                          13. Add Preprocessing

                          Alternative 11: 51.5% accurate, 0.9× speedup?

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

                            1. Initial program 68.3%

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

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

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

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

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

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

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

                                \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                              8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                              6. lower--.f6451.7%

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

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

                              \[\leadsto t \cdot 1 \]
                            8. Step-by-step derivation
                              1. Applied rewrites25.6%

                                \[\leadsto t \cdot 1 \]

                              if -8.9999999999999994e178 < z < 0.0060000000000000001

                              1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a - z}} \]
                                  18. lift-/.f6467.4%

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

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

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

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

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

                                if 0.0060000000000000001 < z

                                1. Initial program 68.3%

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

                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                3. Step-by-step derivation
                                  1. lower--.f6419.7%

                                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                4. Applied rewrites19.7%

                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                5. Taylor expanded in x around inf

                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                6. Step-by-step derivation
                                  1. lower-*.f642.8%

                                    \[\leadsto x + -1 \cdot x \]
                                7. Applied rewrites2.8%

                                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                8. Step-by-step derivation
                                  1. lift-+.f64N/A

                                    \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                  2. +-commutativeN/A

                                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                  3. lower-+.f642.8%

                                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                  4. lift-*.f64N/A

                                    \[\leadsto -1 \cdot x + x \]
                                  5. mul-1-negN/A

                                    \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                  6. lower-neg.f642.8%

                                    \[\leadsto \left(-x\right) + x \]
                                9. Applied rewrites2.8%

                                  \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                10. Taylor expanded in x around 0

                                  \[\leadsto t + x \]
                                11. Step-by-step derivation
                                  1. Applied rewrites34.6%

                                    \[\leadsto t + x \]
                                12. Recombined 3 regimes into one program.
                                13. Add Preprocessing

                                Alternative 12: 43.8% accurate, 0.9× speedup?

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

                                  1. Initial program 68.3%

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

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

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

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

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

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

                                      \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                    6. lower--.f6441.5%

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

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

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

                                      \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                    2. lower--.f6423.1%

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

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

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

                                      \[\leadsto y \cdot \frac{t - x}{a} \]
                                    2. lower--.f6424.9%

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

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

                                  if -8.0000000000000003e170 < y < 1.45e50

                                  1. Initial program 68.3%

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

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  3. Step-by-step derivation
                                    1. lower--.f6419.7%

                                      \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                  4. Applied rewrites19.7%

                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                  5. Taylor expanded in x around inf

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  6. Step-by-step derivation
                                    1. lower-*.f642.8%

                                      \[\leadsto x + -1 \cdot x \]
                                  7. Applied rewrites2.8%

                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                  8. Step-by-step derivation
                                    1. lift-+.f64N/A

                                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                    2. +-commutativeN/A

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    3. lower-+.f642.8%

                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                    4. lift-*.f64N/A

                                      \[\leadsto -1 \cdot x + x \]
                                    5. mul-1-negN/A

                                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                    6. lower-neg.f642.8%

                                      \[\leadsto \left(-x\right) + x \]
                                  9. Applied rewrites2.8%

                                    \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                  10. Taylor expanded in x around 0

                                    \[\leadsto t + x \]
                                  11. Step-by-step derivation
                                    1. Applied rewrites34.6%

                                      \[\leadsto t + x \]
                                  12. Recombined 2 regimes into one program.
                                  13. Add Preprocessing

                                  Alternative 13: 42.4% accurate, 0.9× speedup?

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

                                    1. Initial program 68.3%

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

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

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

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

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

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

                                        \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                      6. lower--.f6441.5%

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

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

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

                                        \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                      2. lower--.f6423.1%

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

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

                                    if -1.0500000000000001e171 < y < 1.45e50

                                    1. Initial program 68.3%

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

                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                    3. Step-by-step derivation
                                      1. lower--.f6419.7%

                                        \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                    4. Applied rewrites19.7%

                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                    5. Taylor expanded in x around inf

                                      \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                    6. Step-by-step derivation
                                      1. lower-*.f642.8%

                                        \[\leadsto x + -1 \cdot x \]
                                    7. Applied rewrites2.8%

                                      \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                    8. Step-by-step derivation
                                      1. lift-+.f64N/A

                                        \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                      2. +-commutativeN/A

                                        \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                      3. lower-+.f642.8%

                                        \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                      4. lift-*.f64N/A

                                        \[\leadsto -1 \cdot x + x \]
                                      5. mul-1-negN/A

                                        \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                      6. lower-neg.f642.8%

                                        \[\leadsto \left(-x\right) + x \]
                                    9. Applied rewrites2.8%

                                      \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                    10. Taylor expanded in x around 0

                                      \[\leadsto t + x \]
                                    11. Step-by-step derivation
                                      1. Applied rewrites34.6%

                                        \[\leadsto t + x \]
                                    12. Recombined 2 regimes into one program.
                                    13. Add Preprocessing

                                    Alternative 14: 39.9% accurate, 0.9× speedup?

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

                                      1. Initial program 68.3%

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

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

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

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

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

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

                                          \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                        6. lower--.f6441.5%

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

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

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

                                          \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                        2. lower--.f6423.1%

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

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

                                        \[\leadsto y \cdot \frac{t}{a} \]
                                      9. Step-by-step derivation
                                        1. Applied rewrites17.8%

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

                                        if -1.0500000000000001e171 < y < 1.45e50

                                        1. Initial program 68.3%

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

                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                        3. Step-by-step derivation
                                          1. lower--.f6419.7%

                                            \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                        4. Applied rewrites19.7%

                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                        5. Taylor expanded in x around inf

                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                        6. Step-by-step derivation
                                          1. lower-*.f642.8%

                                            \[\leadsto x + -1 \cdot x \]
                                        7. Applied rewrites2.8%

                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                        8. Step-by-step derivation
                                          1. lift-+.f64N/A

                                            \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                          2. +-commutativeN/A

                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                          3. lower-+.f642.8%

                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                          4. lift-*.f64N/A

                                            \[\leadsto -1 \cdot x + x \]
                                          5. mul-1-negN/A

                                            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                          6. lower-neg.f642.8%

                                            \[\leadsto \left(-x\right) + x \]
                                        9. Applied rewrites2.8%

                                          \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                        10. Taylor expanded in x around 0

                                          \[\leadsto t + x \]
                                        11. Step-by-step derivation
                                          1. Applied rewrites34.6%

                                            \[\leadsto t + x \]

                                          if 1.45e50 < y

                                          1. Initial program 68.3%

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

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

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

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

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

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

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                            6. lower--.f6441.5%

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

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

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

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

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

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

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

                                        Alternative 15: 39.3% accurate, 1.0× speedup?

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

                                          1. Initial program 68.3%

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

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

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

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

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

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

                                              \[\leadsto y \cdot \left(\frac{t}{a - z} - \frac{x}{\color{blue}{a - z}}\right) \]
                                            6. lower--.f6441.5%

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

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

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

                                              \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
                                            2. lower--.f6423.1%

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

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

                                            \[\leadsto y \cdot \frac{t}{a} \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites17.8%

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

                                            if -1.0500000000000001e171 < y < 8.5000000000000002e116

                                            1. Initial program 68.3%

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

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            3. Step-by-step derivation
                                              1. lower--.f6419.7%

                                                \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                            4. Applied rewrites19.7%

                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                            5. Taylor expanded in x around inf

                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                            6. Step-by-step derivation
                                              1. lower-*.f642.8%

                                                \[\leadsto x + -1 \cdot x \]
                                            7. Applied rewrites2.8%

                                              \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                            8. Step-by-step derivation
                                              1. lift-+.f64N/A

                                                \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                              2. +-commutativeN/A

                                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                              3. lower-+.f642.8%

                                                \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                              4. lift-*.f64N/A

                                                \[\leadsto -1 \cdot x + x \]
                                              5. mul-1-negN/A

                                                \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                              6. lower-neg.f642.8%

                                                \[\leadsto \left(-x\right) + x \]
                                            9. Applied rewrites2.8%

                                              \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                            10. Taylor expanded in x around 0

                                              \[\leadsto t + x \]
                                            11. Step-by-step derivation
                                              1. Applied rewrites34.6%

                                                \[\leadsto t + x \]
                                            12. Recombined 2 regimes into one program.
                                            13. Add Preprocessing

                                            Alternative 16: 37.7% accurate, 0.8× speedup?

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

                                              1. Initial program 68.3%

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

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              3. Step-by-step derivation
                                                1. lower--.f6419.7%

                                                  \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                              4. Applied rewrites19.7%

                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                              5. Taylor expanded in x around inf

                                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                              6. Step-by-step derivation
                                                1. lower-*.f642.8%

                                                  \[\leadsto x + -1 \cdot x \]
                                              7. Applied rewrites2.8%

                                                \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                              8. Step-by-step derivation
                                                1. lift-+.f64N/A

                                                  \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                2. +-commutativeN/A

                                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                3. lower-+.f642.8%

                                                  \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                4. lift-*.f64N/A

                                                  \[\leadsto -1 \cdot x + x \]
                                                5. mul-1-negN/A

                                                  \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                6. lower-neg.f642.8%

                                                  \[\leadsto \left(-x\right) + x \]
                                              9. Applied rewrites2.8%

                                                \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                              10. Taylor expanded in x around 0

                                                \[\leadsto t + x \]
                                              11. Step-by-step derivation
                                                1. Applied rewrites34.6%

                                                  \[\leadsto t + x \]

                                                if -1.6e-12 < a < 5.4999999999999999e-278

                                                1. Initial program 68.3%

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

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

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

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

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

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

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

                                                    \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                                                  8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                                                  6. lower--.f6451.7%

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

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

                                                  \[\leadsto t \cdot 1 \]
                                                8. Step-by-step derivation
                                                  1. Applied rewrites25.6%

                                                    \[\leadsto t \cdot 1 \]

                                                  if 5.4999999999999999e-278 < a < 1.6e-179

                                                  1. Initial program 68.3%

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

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

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

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

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

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

                                                      \[\leadsto x \cdot \left(1 + -1 \cdot \frac{y - z}{\color{blue}{a} - z}\right) \]
                                                    6. lower--.f6443.2%

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

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

                                                    \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                                  6. Step-by-step derivation
                                                    1. lower-/.f6419.4%

                                                      \[\leadsto x \cdot \frac{y}{z} \]
                                                  7. Applied rewrites19.4%

                                                    \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                                9. Recombined 3 regimes into one program.
                                                10. Add Preprocessing

                                                Alternative 17: 37.4% accurate, 0.8× speedup?

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

                                                  1. Initial program 68.3%

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

                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                  3. Step-by-step derivation
                                                    1. lower--.f6419.7%

                                                      \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                  4. Applied rewrites19.7%

                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                  5. Taylor expanded in x around inf

                                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                  6. Step-by-step derivation
                                                    1. lower-*.f642.8%

                                                      \[\leadsto x + -1 \cdot x \]
                                                  7. Applied rewrites2.8%

                                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                  8. Step-by-step derivation
                                                    1. lift-+.f64N/A

                                                      \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                    2. +-commutativeN/A

                                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                    3. lower-+.f642.8%

                                                      \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                    4. lift-*.f64N/A

                                                      \[\leadsto -1 \cdot x + x \]
                                                    5. mul-1-negN/A

                                                      \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                    6. lower-neg.f642.8%

                                                      \[\leadsto \left(-x\right) + x \]
                                                  9. Applied rewrites2.8%

                                                    \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                  10. Taylor expanded in x around 0

                                                    \[\leadsto t + x \]
                                                  11. Step-by-step derivation
                                                    1. Applied rewrites34.6%

                                                      \[\leadsto t + x \]

                                                    if -1.6e-12 < a < 5.4999999999999999e-278

                                                    1. Initial program 68.3%

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

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

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

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

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

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

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

                                                        \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                                                      8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                                                      6. lower--.f6451.7%

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

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

                                                      \[\leadsto t \cdot 1 \]
                                                    8. Step-by-step derivation
                                                      1. Applied rewrites25.6%

                                                        \[\leadsto t \cdot 1 \]

                                                      if 5.4999999999999999e-278 < a < 8.5999999999999991e-180

                                                      1. Initial program 68.3%

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

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

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

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

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

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

                                                          \[\leadsto x \cdot \left(1 + -1 \cdot \frac{y - z}{\color{blue}{a} - z}\right) \]
                                                        6. lower--.f6443.2%

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

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

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

                                                          \[\leadsto x \cdot \frac{y - a}{z} \]
                                                        2. lower--.f6423.6%

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

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

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

                                                          \[\leadsto \frac{x \cdot y}{z} \]
                                                        2. lower-*.f6416.7%

                                                          \[\leadsto \frac{x \cdot y}{z} \]
                                                      10. Applied rewrites16.7%

                                                        \[\leadsto \frac{x \cdot y}{\color{blue}{z}} \]
                                                    9. Recombined 3 regimes into one program.
                                                    10. Add Preprocessing

                                                    Alternative 18: 37.0% accurate, 1.6× speedup?

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

                                                      1. Initial program 68.3%

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

                                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                      3. Step-by-step derivation
                                                        1. lower--.f6419.7%

                                                          \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                      4. Applied rewrites19.7%

                                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                      5. Taylor expanded in x around inf

                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                      6. Step-by-step derivation
                                                        1. lower-*.f642.8%

                                                          \[\leadsto x + -1 \cdot x \]
                                                      7. Applied rewrites2.8%

                                                        \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                      8. Step-by-step derivation
                                                        1. lift-+.f64N/A

                                                          \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                        2. +-commutativeN/A

                                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                        3. lower-+.f642.8%

                                                          \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                        4. lift-*.f64N/A

                                                          \[\leadsto -1 \cdot x + x \]
                                                        5. mul-1-negN/A

                                                          \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                        6. lower-neg.f642.8%

                                                          \[\leadsto \left(-x\right) + x \]
                                                      9. Applied rewrites2.8%

                                                        \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                      10. Taylor expanded in x around 0

                                                        \[\leadsto t + x \]
                                                      11. Step-by-step derivation
                                                        1. Applied rewrites34.6%

                                                          \[\leadsto t + x \]

                                                        if -1.6e-12 < a < 6.8e13

                                                        1. Initial program 68.3%

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

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

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

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

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

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

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

                                                            \[\leadsto x + \color{blue}{\left(\left(y - z\right) \cdot \frac{1}{a - z}\right) \cdot \left(t - x\right)} \]
                                                          8. fp-cancel-sign-sub-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto t \cdot \left(\frac{y}{a - z} - \frac{z}{\color{blue}{a - z}}\right) \]
                                                          6. lower--.f6451.7%

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

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

                                                          \[\leadsto t \cdot 1 \]
                                                        8. Step-by-step derivation
                                                          1. Applied rewrites25.6%

                                                            \[\leadsto t \cdot 1 \]
                                                        9. Recombined 2 regimes into one program.
                                                        10. Add Preprocessing

                                                        Alternative 19: 34.6% accurate, 7.3× speedup?

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

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

                                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                        3. Step-by-step derivation
                                                          1. lower--.f6419.7%

                                                            \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                                                        4. Applied rewrites19.7%

                                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                        5. Taylor expanded in x around inf

                                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                        6. Step-by-step derivation
                                                          1. lower-*.f642.8%

                                                            \[\leadsto x + -1 \cdot x \]
                                                        7. Applied rewrites2.8%

                                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                        8. Step-by-step derivation
                                                          1. lift-+.f64N/A

                                                            \[\leadsto \color{blue}{x + -1 \cdot x} \]
                                                          2. +-commutativeN/A

                                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                          3. lower-+.f642.8%

                                                            \[\leadsto \color{blue}{-1 \cdot x + x} \]
                                                          4. lift-*.f64N/A

                                                            \[\leadsto -1 \cdot x + x \]
                                                          5. mul-1-negN/A

                                                            \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                                                          6. lower-neg.f642.8%

                                                            \[\leadsto \left(-x\right) + x \]
                                                        9. Applied rewrites2.8%

                                                          \[\leadsto \color{blue}{\left(-x\right) + x} \]
                                                        10. Taylor expanded in x around 0

                                                          \[\leadsto t + x \]
                                                        11. Step-by-step derivation
                                                          1. Applied rewrites34.6%

                                                            \[\leadsto t + x \]
                                                          2. Add Preprocessing

                                                          Reproduce

                                                          ?
                                                          herbie shell --seed 2025258 
                                                          (FPCore (x y z t a)
                                                            :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                                            :precision binary64
                                                            (+ x (/ (* (- y z) (- t x)) (- a z))))