Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 92.8%
Time: 4.3s
Alternatives: 15
Speedup: 0.3×

Specification

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

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

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 15 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: 80.2% accurate, 1.0× speedup?

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

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

Alternative 1: 92.8% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-232}:\\ \;\;\;\;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} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x t) (/ (- z y) (- a z)) x))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_2 -1e-232)
     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 = fma((x - t), ((z - y) / (a - z)), x);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -1e-232) {
		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;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - t), Float64(Float64(z - y) / Float64(a - z)), x)
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_2 <= -1e-232)
		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
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-232], 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}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-232}:\\
\;\;\;\;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}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000002e-232 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{z - y}{a - z}}, x\right) \]
      17. lower--.f6484.2

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

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

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

    1. Initial program 80.2%

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

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

      \[\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: 87.3% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-232}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;t \cdot 1\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (fma (- x t) (/ (- z y) (- a z)) x))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_2 -1e-232) t_1 (if (<= t_2 0.0) (* t 1.0) t_1))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = fma((x - t), ((z - y) / (a - z)), x);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_2 <= -1e-232) {
		tmp = t_1;
	} else if (t_2 <= 0.0) {
		tmp = t * 1.0;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = fma(Float64(x - t), Float64(Float64(z - y) / Float64(a - z)), x)
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_2 <= -1e-232)
		tmp = t_1;
	elseif (t_2 <= 0.0)
		tmp = Float64(t * 1.0);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-232], t$95$1, If[LessEqual[t$95$2, 0.0], N[(t * 1.0), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x - t, \frac{z - y}{a - z}, x\right)\\
t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-232}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;t \cdot 1\\

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


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

    1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{z - y}{a - z}}, x\right) \]
      17. lower--.f6484.2

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

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

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

    1. Initial program 80.2%

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

      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
    3. 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.8

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

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

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

        \[\leadsto t \cdot 1 \]
    7. Recombined 2 regimes into one program.
    8. Add Preprocessing

    Alternative 3: 74.5% accurate, 0.2× speedup?

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

      1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \mathsf{fma}\left(\frac{x - t}{\color{blue}{z - a}}, y - z, x\right) \]
        14. lower--.f6480.3

          \[\leadsto \mathsf{fma}\left(\frac{x - t}{\color{blue}{z - a}}, y - z, x\right) \]
      3. Applied rewrites80.3%

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

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

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

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

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

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

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

      if -4.9999999999999997e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000002e-232 or 5.00000000000000023e-231 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.00000000000000021e301

      1. Initial program 80.2%

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

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

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

        if -1.00000000000000002e-232 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000023e-231

        1. Initial program 80.2%

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

          \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
        3. 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.8

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

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

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

            \[\leadsto t \cdot 1 \]

          if 4.00000000000000021e301 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

          1. Initial program 80.2%

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

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

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

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

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

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

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

        Alternative 4: 67.7% accurate, 0.6× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z - y}{z - a} \cdot t\\ t_2 := \mathsf{fma}\left(x - t, \frac{z - y}{a}, x\right)\\ \mathbf{if}\;a \leq -3 \cdot 10^{+180}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -3.5 \cdot 10^{-258}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 10^{-90}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - z}{z}, x\right)\\ \mathbf{elif}\;a \leq 1.9 \cdot 10^{+44}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (* (/ (- z y) (- z a)) t)) (t_2 (fma (- x t) (/ (- z y) a) x)))
           (if (<= a -3e+180)
             t_2
             (if (<= a -3.5e-258)
               t_1
               (if (<= a 1e-90)
                 (fma (- x t) (/ (- y z) z) x)
                 (if (<= a 1.9e+44) t_1 t_2))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = ((z - y) / (z - a)) * t;
        	double t_2 = fma((x - t), ((z - y) / a), x);
        	double tmp;
        	if (a <= -3e+180) {
        		tmp = t_2;
        	} else if (a <= -3.5e-258) {
        		tmp = t_1;
        	} else if (a <= 1e-90) {
        		tmp = fma((x - t), ((y - z) / z), x);
        	} else if (a <= 1.9e+44) {
        		tmp = t_1;
        	} else {
        		tmp = t_2;
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a)
        	t_1 = Float64(Float64(Float64(z - y) / Float64(z - a)) * t)
        	t_2 = fma(Float64(x - t), Float64(Float64(z - y) / a), x)
        	tmp = 0.0
        	if (a <= -3e+180)
        		tmp = t_2;
        	elseif (a <= -3.5e-258)
        		tmp = t_1;
        	elseif (a <= 1e-90)
        		tmp = fma(Float64(x - t), Float64(Float64(y - z) / z), x);
        	elseif (a <= 1.9e+44)
        		tmp = t_1;
        	else
        		tmp = t_2;
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - t), $MachinePrecision] * N[(N[(z - y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3e+180], t$95$2, If[LessEqual[a, -3.5e-258], t$95$1, If[LessEqual[a, 1e-90], N[(N[(x - t), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / z), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[a, 1.9e+44], t$95$1, t$95$2]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{z - y}{z - a} \cdot t\\
        t_2 := \mathsf{fma}\left(x - t, \frac{z - y}{a}, x\right)\\
        \mathbf{if}\;a \leq -3 \cdot 10^{+180}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;a \leq -3.5 \cdot 10^{-258}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;a \leq 10^{-90}:\\
        \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - z}{z}, x\right)\\
        
        \mathbf{elif}\;a \leq 1.9 \cdot 10^{+44}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_2\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if a < -3.00000000000000003e180 or 1.9000000000000001e44 < a

          1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{z - y}{a - z}}, x\right) \]
            17. lower--.f6484.2

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

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

            \[\leadsto \mathsf{fma}\left(x - t, \frac{z - y}{\color{blue}{a}}, x\right) \]
          5. Step-by-step derivation
            1. Applied rewrites53.2%

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

            if -3.00000000000000003e180 < a < -3.50000000000000001e-258 or 9.99999999999999995e-91 < a < 1.9000000000000001e44

            1. Initial program 80.2%

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

              \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
            3. 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.8

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

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

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

                \[\leadsto \left(\frac{y}{a - z} - \frac{z}{a - z}\right) \cdot \color{blue}{t} \]
              3. lower-*.f6451.8

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z - y}{z - a} \cdot t \]
              15. lower--.f6451.8

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

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

            if -3.50000000000000001e-258 < a < 9.99999999999999995e-91

            1. Initial program 80.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(x - t, \color{blue}{\frac{-1}{a - z}} \cdot \left(y - z\right), x\right) \]
              16. lower-/.f6484.1

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

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

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

                \[\leadsto \mathsf{fma}\left(x - t, \frac{y - z}{\color{blue}{z}}, x\right) \]
              2. lower--.f6439.1

                \[\leadsto \mathsf{fma}\left(x - t, \frac{y - z}{z}, x\right) \]
            6. Applied rewrites39.1%

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

          Alternative 5: 66.3% accurate, 0.9× speedup?

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

            1. Initial program 80.2%

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

              \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
            3. 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.8

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

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

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

                \[\leadsto \left(\frac{y}{a - z} - \frac{z}{a - z}\right) \cdot \color{blue}{t} \]
              3. lower-*.f6451.8

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z - y}{z - a} \cdot t \]
              15. lower--.f6451.8

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

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

            if -8.50000000000000003e-19 < z < 6.60000000000000034e-6

            1. Initial program 80.2%

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

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

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

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

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

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

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

              \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
            6. Step-by-step derivation
              1. Applied rewrites44.6%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a}} + x \]
                11. lower-/.f6449.0

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

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

            Alternative 6: 65.1% accurate, 0.9× speedup?

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

              1. Initial program 80.2%

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

                \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
              3. 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.8

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

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

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

                  \[\leadsto \left(\frac{y}{a - z} - \frac{z}{a - z}\right) \cdot \color{blue}{t} \]
                3. lower-*.f6451.8

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{z - y}{z - a} \cdot t \]
                15. lower--.f6451.8

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

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

              if -9.60000000000000008e-27 < z < 6.60000000000000034e-6

              1. Initial program 80.2%

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

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

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

            Alternative 7: 59.9% accurate, 0.9× speedup?

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

              1. Initial program 80.2%

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

                \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
              3. 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.8

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

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

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

                  \[\leadsto \left(\frac{y}{a - z} - \frac{z}{a - z}\right) \cdot \color{blue}{t} \]
                3. lower-*.f6451.8

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{z - y}{z - a} \cdot t \]
                15. lower--.f6451.8

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

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

              if -3.29999999999999973e-85 < z < 1.69999999999999987e-7

              1. Initial program 80.2%

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

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

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

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

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

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

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

                \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
              6. Step-by-step derivation
                1. Applied rewrites44.6%

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

                  \[\leadsto x + \frac{t \cdot y}{a} \]
                3. Step-by-step derivation
                  1. lower-*.f6438.9

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

                  \[\leadsto x + \frac{t \cdot y}{a} \]
              7. Recombined 2 regimes into one program.
              8. Add Preprocessing

              Alternative 8: 56.5% accurate, 0.7× speedup?

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

                1. Initial program 80.2%

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

                  \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                3. 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.8

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

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

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

                    \[\leadsto t \cdot 1 \]

                  if -1.9e205 < z < -3.29999999999999973e-85 or 1.69999999999999987e-7 < z

                  1. Initial program 80.2%

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

                    \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                  3. 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.8

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

                    \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                  5. 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{z}{a - z}\right) \]
                    4. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{t}{a - z} \cdot \left(\mathsf{neg}\left(\left(z - \frac{y}{a - z} \cdot \left(a - z\right)\right)\right)\right) \]
                  6. Applied rewrites46.4%

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

                  if -3.29999999999999973e-85 < z < 1.69999999999999987e-7

                  1. Initial program 80.2%

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

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

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

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

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

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

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

                    \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                  6. Step-by-step derivation
                    1. Applied rewrites44.6%

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

                      \[\leadsto x + \frac{t \cdot y}{a} \]
                    3. Step-by-step derivation
                      1. lower-*.f6438.9

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

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

                  Alternative 9: 51.4% accurate, 1.0× speedup?

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

                    1. Initial program 80.2%

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

                      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                    3. 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.8

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

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

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

                        \[\leadsto t \cdot 1 \]

                      if -1.22e55 < z < 9.2e14

                      1. Initial program 80.2%

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

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

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

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

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

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

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

                        \[\leadsto x + \frac{y \cdot \left(t - x\right)}{a} \]
                      6. Step-by-step derivation
                        1. Applied rewrites44.6%

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

                          \[\leadsto x + \frac{t \cdot y}{a} \]
                        3. Step-by-step derivation
                          1. lower-*.f6438.9

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

                          \[\leadsto x + \frac{t \cdot y}{a} \]
                      7. Recombined 2 regimes into one program.
                      8. Add Preprocessing

                      Alternative 10: 40.9% accurate, 0.2× speedup?

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

                        1. Initial program 80.2%

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

                          \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                        3. 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.8

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

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

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

                            \[\leadsto t \cdot 1 \]
                          2. Taylor expanded in z around 0

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

                              \[\leadsto t \cdot \frac{y}{a} \]
                          4. Applied rewrites19.3%

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

                          if -5.0000000000000002e280 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000006e-117 or 4.99999999999999976e-45 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                          1. Initial program 80.2%

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

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

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

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

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

                              \[\leadsto x + t \]

                            if -2.00000000000000006e-117 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000023e-231

                            1. Initial program 80.2%

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

                              \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                            3. 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.8

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

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

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

                                \[\leadsto t \cdot 1 \]

                              if 5.00000000000000023e-231 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999976e-45

                              1. Initial program 80.2%

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

                                \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                              3. 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.8

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

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

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

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

                                  \[\leadsto \frac{t \cdot \left(y - z\right)}{a} \]
                                3. lower--.f6420.1

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

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

                            Alternative 11: 40.3% accurate, 0.3× speedup?

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

                              1. Initial program 80.2%

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

                                \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                              3. 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.8

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

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

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

                                  \[\leadsto t \cdot 1 \]
                                2. Taylor expanded in z around 0

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

                                    \[\leadsto t \cdot \frac{y}{a} \]
                                4. Applied rewrites19.3%

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

                                if -5.0000000000000002e280 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000006e-117 or 9.9999999999999995e-113 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                                1. Initial program 80.2%

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

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

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

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

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

                                    \[\leadsto x + t \]

                                  if -2.00000000000000006e-117 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999995e-113

                                  1. Initial program 80.2%

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

                                    \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                  3. 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.8

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

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

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

                                      \[\leadsto t \cdot 1 \]
                                  7. Recombined 3 regimes into one program.
                                  8. Add Preprocessing

                                  Alternative 12: 39.6% accurate, 1.0× speedup?

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

                                    1. Initial program 80.2%

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

                                      \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                    3. 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.8

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

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

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

                                        \[\leadsto t \cdot 1 \]

                                      if -7.4999999999999997e53 < z < 1.15000000000000005e33

                                      1. Initial program 80.2%

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

                                        \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                      3. 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.8

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

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

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

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

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

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

                                    Alternative 13: 38.3% accurate, 0.3× speedup?

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

                                      1. Initial program 80.2%

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

                                        \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                      3. 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.8

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

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

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

                                          \[\leadsto \frac{t \cdot y}{a} \]
                                        2. lower-*.f6416.8

                                          \[\leadsto \frac{t \cdot y}{a} \]
                                      7. Applied rewrites16.8%

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

                                      if -9.9999999999999994e303 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000006e-117 or 9.9999999999999995e-113 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                                      1. Initial program 80.2%

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

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

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

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

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

                                          \[\leadsto x + t \]

                                        if -2.00000000000000006e-117 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999995e-113

                                        1. Initial program 80.2%

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

                                          \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                        3. 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.8

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

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

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

                                            \[\leadsto t \cdot 1 \]
                                        7. Recombined 3 regimes into one program.
                                        8. Add Preprocessing

                                        Alternative 14: 38.2% accurate, 0.4× speedup?

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

                                          1. Initial program 80.2%

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

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

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

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

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

                                              \[\leadsto x + t \]

                                            if -2.00000000000000006e-117 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999995e-113

                                            1. Initial program 80.2%

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

                                              \[\leadsto \color{blue}{t \cdot \left(\frac{y}{a - z} - \frac{z}{a - z}\right)} \]
                                            3. 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.8

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

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

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

                                                \[\leadsto t \cdot 1 \]
                                            7. Recombined 2 regimes into one program.
                                            8. Add Preprocessing

                                            Alternative 15: 34.7% accurate, 4.8× speedup?

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

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

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

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

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

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

                                                \[\leadsto x + t \]
                                              2. Add Preprocessing

                                              Reproduce

                                              ?
                                              herbie shell --seed 2025155 
                                              (FPCore (x y z t a)
                                                :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                                                :precision binary64
                                                (+ x (* (- y z) (/ (- t x) (- a z)))))