Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 81.0% → 89.8%
Time: 5.2s
Alternatives: 23
Speedup: 0.4×

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 23 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: 81.0% 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: 89.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-296}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-271}:\\
\;\;\;\;\mathsf{fma}\left(\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}, -1, t\right)\\

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


\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)))) < -inf.0

    1. Initial program 84.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, -1 \cdot \frac{x \cdot \left(y - z\right)}{a - z}\right) \]
      10. mul-1-negN/A

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

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

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

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

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

        \[\leadsto x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, -\frac{\left(y - z\right) \cdot x}{a - z}\right) \]
      16. lift--.f6485.6

        \[\leadsto x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, -\frac{\left(y - z\right) \cdot x}{a - z}\right) \]
    4. Applied rewrites85.6%

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 3.99999999999999985e-271 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 91.9%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

    1. Initial program 6.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 47.7% 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^{+306}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-68}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-296}:\\ \;\;\;\;x\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a - z}\\ \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+306)
     (/ (* t y) a)
     (if (<= t_1 -1e-68)
       (+ x t)
       (if (<= t_1 -2e-296)
         x
         (if (<= t_1 0.0)
           (* (/ (- y a) z) x)
           (if (<= t_1 2e+300) (+ x t) (/ (* t y) (- 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 tmp;
	if (t_1 <= -5e+306) {
		tmp = (t * y) / a;
	} else if (t_1 <= -1e-68) {
		tmp = x + t;
	} else if (t_1 <= -2e-296) {
		tmp = x;
	} else if (t_1 <= 0.0) {
		tmp = ((y - a) / z) * x;
	} else if (t_1 <= 2e+300) {
		tmp = x + t;
	} else {
		tmp = (t * y) / (a - z);
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x + ((y - z) * ((t - x) / (a - z)))
    if (t_1 <= (-5d+306)) then
        tmp = (t * y) / a
    else if (t_1 <= (-1d-68)) then
        tmp = x + t
    else if (t_1 <= (-2d-296)) then
        tmp = x
    else if (t_1 <= 0.0d0) then
        tmp = ((y - a) / z) * x
    else if (t_1 <= 2d+300) then
        tmp = x + t
    else
        tmp = (t * y) / (a - z)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -5e+306) {
		tmp = (t * y) / a;
	} else if (t_1 <= -1e-68) {
		tmp = x + t;
	} else if (t_1 <= -2e-296) {
		tmp = x;
	} else if (t_1 <= 0.0) {
		tmp = ((y - a) / z) * x;
	} else if (t_1 <= 2e+300) {
		tmp = x + t;
	} else {
		tmp = (t * y) / (a - z);
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + ((y - z) * ((t - x) / (a - z)))
	tmp = 0
	if t_1 <= -5e+306:
		tmp = (t * y) / a
	elif t_1 <= -1e-68:
		tmp = x + t
	elif t_1 <= -2e-296:
		tmp = x
	elif t_1 <= 0.0:
		tmp = ((y - a) / z) * x
	elif t_1 <= 2e+300:
		tmp = x + t
	else:
		tmp = (t * y) / (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))))
	tmp = 0.0
	if (t_1 <= -5e+306)
		tmp = Float64(Float64(t * y) / a);
	elseif (t_1 <= -1e-68)
		tmp = Float64(x + t);
	elseif (t_1 <= -2e-296)
		tmp = x;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(y - a) / z) * x);
	elseif (t_1 <= 2e+300)
		tmp = Float64(x + t);
	else
		tmp = Float64(Float64(t * y) / 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)));
	tmp = 0.0;
	if (t_1 <= -5e+306)
		tmp = (t * y) / a;
	elseif (t_1 <= -1e-68)
		tmp = x + t;
	elseif (t_1 <= -2e-296)
		tmp = x;
	elseif (t_1 <= 0.0)
		tmp = ((y - a) / z) * x;
	elseif (t_1 <= 2e+300)
		tmp = x + t;
	else
		tmp = (t * y) / (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]}, If[LessEqual[t$95$1, -5e+306], N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, -1e-68], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, -2e-296], x, If[LessEqual[t$95$1, 0.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], N[(x + t), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $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^{+306}:\\
\;\;\;\;\frac{t \cdot y}{a}\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-68}:\\
\;\;\;\;x + t\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-296}:\\
\;\;\;\;x\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y - a}{z} \cdot x\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;x + t\\

\mathbf{else}:\\
\;\;\;\;\frac{t \cdot y}{a - z}\\


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999993e306

    1. Initial program 84.1%

      \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t \cdot y}{a} \]
    9. Applied rewrites43.9%

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

    if -4.99999999999999993e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000007e-68 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e300

    1. Initial program 94.1%

      \[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. lift--.f6425.8

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

      \[\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 rewrites46.1%

        \[\leadsto x + t \]

      if -1.00000000000000007e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296

      1. Initial program 74.2%

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

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

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

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

        1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
          10. lift--.f644.2

            \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
        4. Applied rewrites4.2%

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

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

            \[\leadsto \frac{y - a}{z} \cdot x \]
          2. lift--.f6460.5

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

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

        if 2.0000000000000001e300 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

        1. Initial program 86.9%

          \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{t \cdot y}{a - z} \]
        9. Recombined 5 regimes into one program.
        10. Add Preprocessing

        Alternative 3: 47.0% accurate, 0.2× speedup?

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

          1. Initial program 85.3%

            \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{t \cdot y}{a} \]
          9. Applied rewrites42.7%

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

          if -4.99999999999999993e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000007e-68 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e304

          1. Initial program 94.1%

            \[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. lift--.f6425.8

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

            \[\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 rewrites46.1%

              \[\leadsto x + t \]

            if -1.00000000000000007e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296

            1. Initial program 74.2%

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

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

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

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

              1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                10. lift--.f644.2

                  \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
              4. Applied rewrites4.2%

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

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

                  \[\leadsto \frac{y - a}{z} \cdot x \]
                2. lift--.f6460.5

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

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

            Alternative 4: 45.7% accurate, 0.2× speedup?

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

              1. Initial program 85.3%

                \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{t \cdot y}{a} \]
              9. Applied rewrites42.7%

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

              if -4.99999999999999993e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000007e-68 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e304

              1. Initial program 94.1%

                \[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. lift--.f6425.8

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

                \[\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 rewrites46.1%

                  \[\leadsto x + t \]

                if -1.00000000000000007e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296

                1. Initial program 74.2%

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

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

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

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

                  1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                    10. lift--.f644.2

                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                  4. Applied rewrites4.2%

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

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

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

                      \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
                    3. lift--.f6448.5

                      \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
                  7. Applied rewrites48.5%

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

                Alternative 5: 43.8% accurate, 0.2× speedup?

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

                  1. Initial program 85.3%

                    \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{t \cdot y}{a} \]
                  9. Applied rewrites42.7%

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

                  if -4.99999999999999993e306 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -1.00000000000000007e-68 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e304

                  1. Initial program 94.1%

                    \[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. lift--.f6425.8

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

                    \[\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 rewrites46.1%

                      \[\leadsto x + t \]

                    if -1.00000000000000007e-68 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296

                    1. Initial program 74.2%

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

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

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

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

                      1. Initial program 4.3%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                        10. lift--.f644.2

                          \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                      4. Applied rewrites4.2%

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

                        \[\leadsto \frac{y}{z} \cdot x \]
                      6. Step-by-step derivation
                        1. lower-/.f6431.6

                          \[\leadsto \frac{y}{z} \cdot x \]
                      7. Applied rewrites31.6%

                        \[\leadsto \frac{y}{z} \cdot x \]
                    4. Recombined 4 regimes into one program.
                    5. Add Preprocessing

                    Alternative 6: 76.6% accurate, 0.2× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\ t_2 := \frac{t - x}{a - z}\\ t_3 := x + \left(y - z\right) \cdot t\_2\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-271}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right)\\ \mathbf{elif}\;t\_3 \leq 10^{+224}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;x + y \cdot t\_2\\ \end{array} \end{array} \]
                    (FPCore (x y z t a)
                     :precision binary64
                     (let* ((t_1 (fma (/ t (- a z)) (- y z) x))
                            (t_2 (/ (- t x) (- a z)))
                            (t_3 (+ x (* (- y z) t_2))))
                       (if (<= t_3 (- INFINITY))
                         (/ (* (- t x) y) (- a z))
                         (if (<= t_3 -2e-296)
                           t_1
                           (if (<= t_3 4e-271)
                             (fma (/ (* y (- t x)) z) -1.0 t)
                             (if (<= t_3 1e+224) t_1 (+ x (* y t_2))))))))
                    double code(double x, double y, double z, double t, double a) {
                    	double t_1 = fma((t / (a - z)), (y - z), x);
                    	double t_2 = (t - x) / (a - z);
                    	double t_3 = x + ((y - z) * t_2);
                    	double tmp;
                    	if (t_3 <= -((double) INFINITY)) {
                    		tmp = ((t - x) * y) / (a - z);
                    	} else if (t_3 <= -2e-296) {
                    		tmp = t_1;
                    	} else if (t_3 <= 4e-271) {
                    		tmp = fma(((y * (t - x)) / z), -1.0, t);
                    	} else if (t_3 <= 1e+224) {
                    		tmp = t_1;
                    	} else {
                    		tmp = x + (y * t_2);
                    	}
                    	return tmp;
                    }
                    
                    function code(x, y, z, t, a)
                    	t_1 = fma(Float64(t / Float64(a - z)), Float64(y - z), x)
                    	t_2 = Float64(Float64(t - x) / Float64(a - z))
                    	t_3 = Float64(x + Float64(Float64(y - z) * t_2))
                    	tmp = 0.0
                    	if (t_3 <= Float64(-Inf))
                    		tmp = Float64(Float64(Float64(t - x) * y) / Float64(a - z));
                    	elseif (t_3 <= -2e-296)
                    		tmp = t_1;
                    	elseif (t_3 <= 4e-271)
                    		tmp = fma(Float64(Float64(y * Float64(t - x)) / z), -1.0, t);
                    	elseif (t_3 <= 1e+224)
                    		tmp = t_1;
                    	else
                    		tmp = Float64(x + Float64(y * t_2));
                    	end
                    	return tmp
                    end
                    
                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$2 = N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y - z), $MachinePrecision] * t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -2e-296], t$95$1, If[LessEqual[t$95$3, 4e-271], N[(N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + t), $MachinePrecision], If[LessEqual[t$95$3, 1e+224], t$95$1, N[(x + N[(y * t$95$2), $MachinePrecision]), $MachinePrecision]]]]]]]]
                    
                    \begin{array}{l}
                    
                    \\
                    \begin{array}{l}
                    t_1 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\
                    t_2 := \frac{t - x}{a - z}\\
                    t_3 := x + \left(y - z\right) \cdot t\_2\\
                    \mathbf{if}\;t\_3 \leq -\infty:\\
                    \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\
                    
                    \mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-296}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;t\_3 \leq 4 \cdot 10^{-271}:\\
                    \;\;\;\;\mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right)\\
                    
                    \mathbf{elif}\;t\_3 \leq 10^{+224}:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{else}:\\
                    \;\;\;\;x + y \cdot t\_2\\
                    
                    
                    \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)))) < -inf.0

                      1. Initial program 84.0%

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

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

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

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

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

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

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

                          \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
                        7. lift--.f6491.9

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

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

                      if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 3.99999999999999985e-271 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.9999999999999997e223

                      1. Initial program 91.9%

                        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

                        1. Initial program 6.7%

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                          2. lift--.f6457.2

                            \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                        7. Applied rewrites57.2%

                          \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]

                        if 9.9999999999999997e223 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                        1. Initial program 91.7%

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

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

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

                        Alternative 7: 77.4% accurate, 0.2× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(t - x\right) \cdot y}{a - z}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_3 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-271}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right)\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                        (FPCore (x y z t a)
                         :precision binary64
                         (let* ((t_1 (/ (* (- t x) y) (- a z)))
                                (t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
                                (t_3 (fma (/ t (- a z)) (- y z) x)))
                           (if (<= t_2 (- INFINITY))
                             t_1
                             (if (<= t_2 -2e-296)
                               t_3
                               (if (<= t_2 4e-271)
                                 (fma (/ (* y (- t x)) z) -1.0 t)
                                 (if (<= t_2 5e+304) t_3 t_1))))))
                        double code(double x, double y, double z, double t, double a) {
                        	double t_1 = ((t - x) * y) / (a - z);
                        	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
                        	double t_3 = fma((t / (a - z)), (y - z), x);
                        	double tmp;
                        	if (t_2 <= -((double) INFINITY)) {
                        		tmp = t_1;
                        	} else if (t_2 <= -2e-296) {
                        		tmp = t_3;
                        	} else if (t_2 <= 4e-271) {
                        		tmp = fma(((y * (t - x)) / z), -1.0, t);
                        	} else if (t_2 <= 5e+304) {
                        		tmp = t_3;
                        	} else {
                        		tmp = t_1;
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a)
                        	t_1 = Float64(Float64(Float64(t - x) * y) / Float64(a - z))
                        	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
                        	t_3 = fma(Float64(t / Float64(a - z)), Float64(y - z), x)
                        	tmp = 0.0
                        	if (t_2 <= Float64(-Inf))
                        		tmp = t_1;
                        	elseif (t_2 <= -2e-296)
                        		tmp = t_3;
                        	elseif (t_2 <= 4e-271)
                        		tmp = fma(Float64(Float64(y * Float64(t - x)) / z), -1.0, t);
                        	elseif (t_2 <= 5e+304)
                        		tmp = t_3;
                        	else
                        		tmp = t_1;
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-296], t$95$3, If[LessEqual[t$95$2, 4e-271], N[(N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] * -1.0 + t), $MachinePrecision], If[LessEqual[t$95$2, 5e+304], t$95$3, t$95$1]]]]]]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        t_1 := \frac{\left(t - x\right) \cdot y}{a - z}\\
                        t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
                        t_3 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\
                        \mathbf{if}\;t\_2 \leq -\infty:\\
                        \;\;\;\;t\_1\\
                        
                        \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-296}:\\
                        \;\;\;\;t\_3\\
                        
                        \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-271}:\\
                        \;\;\;\;\mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right)\\
                        
                        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
                        \;\;\;\;t\_3\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;t\_1\\
                        
                        
                        \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)))) < -inf.0 or 4.9999999999999997e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                          1. Initial program 85.2%

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

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

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

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

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

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

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

                              \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
                            7. lift--.f6491.3

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

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

                          if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 3.99999999999999985e-271 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e304

                          1. Initial program 92.5%

                            \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

                            1. Initial program 6.7%

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                              2. lift--.f6457.2

                                \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                            7. Applied rewrites57.2%

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

                          Alternative 8: 77.5% accurate, 0.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\left(t - x\right) \cdot y}{a - z}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_3 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-296}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-271}:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (let* ((t_1 (/ (* (- t x) y) (- a z)))
                                  (t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
                                  (t_3 (fma (/ t (- a z)) (- y z) x)))
                             (if (<= t_2 (- INFINITY))
                               t_1
                               (if (<= t_2 -2e-296)
                                 t_3
                                 (if (<= t_2 4e-271)
                                   (* (/ (- y a) z) x)
                                   (if (<= t_2 5e+304) t_3 t_1))))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = ((t - x) * y) / (a - z);
                          	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
                          	double t_3 = fma((t / (a - z)), (y - z), x);
                          	double tmp;
                          	if (t_2 <= -((double) INFINITY)) {
                          		tmp = t_1;
                          	} else if (t_2 <= -2e-296) {
                          		tmp = t_3;
                          	} else if (t_2 <= 4e-271) {
                          		tmp = ((y - a) / z) * x;
                          	} else if (t_2 <= 5e+304) {
                          		tmp = t_3;
                          	} else {
                          		tmp = t_1;
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	t_1 = Float64(Float64(Float64(t - x) * y) / Float64(a - z))
                          	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
                          	t_3 = fma(Float64(t / Float64(a - z)), Float64(y - z), x)
                          	tmp = 0.0
                          	if (t_2 <= Float64(-Inf))
                          		tmp = t_1;
                          	elseif (t_2 <= -2e-296)
                          		tmp = t_3;
                          	elseif (t_2 <= 4e-271)
                          		tmp = Float64(Float64(Float64(y - a) / z) * x);
                          	elseif (t_2 <= 5e+304)
                          		tmp = t_3;
                          	else
                          		tmp = t_1;
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(t / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-296], t$95$3, If[LessEqual[t$95$2, 4e-271], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$2, 5e+304], t$95$3, t$95$1]]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \frac{\left(t - x\right) \cdot y}{a - z}\\
                          t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
                          t_3 := \mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\
                          \mathbf{if}\;t\_2 \leq -\infty:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-296}:\\
                          \;\;\;\;t\_3\\
                          
                          \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-271}:\\
                          \;\;\;\;\frac{y - a}{z} \cdot x\\
                          
                          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+304}:\\
                          \;\;\;\;t\_3\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;t\_1\\
                          
                          
                          \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)))) < -inf.0 or 4.9999999999999997e304 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                            1. Initial program 85.2%

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

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

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

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

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

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

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

                                \[\leadsto \frac{\left(t - x\right) \cdot y}{a - z} \]
                              7. lift--.f6491.3

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

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

                            if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2e-296 or 3.99999999999999985e-271 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999997e304

                            1. Initial program 92.5%

                              \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

                              1. Initial program 6.7%

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                10. lift--.f646.4

                                  \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                              4. Applied rewrites6.4%

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

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

                                  \[\leadsto \frac{y - a}{z} \cdot x \]
                                2. lift--.f6457.7

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

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

                            Alternative 9: 89.7% accurate, 0.3× speedup?

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

                              1. Initial program 91.1%

                                \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

                              1. Initial program 6.7%

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 87.1% accurate, 0.3× speedup?

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

                              1. Initial program 91.1%

                                \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -2e-296 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 3.99999999999999985e-271

                              1. Initial program 6.7%

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                                2. lift--.f6457.2

                                  \[\leadsto \mathsf{fma}\left(\frac{y \cdot \left(t - x\right)}{z}, -1, t\right) \]
                              7. Applied rewrites57.2%

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

                            Alternative 11: 91.1% accurate, 0.4× speedup?

                            \[\begin{array}{l} \\ \mathsf{fma}\left(-1, x \cdot \left(\frac{y}{a - z} - \left(1 + \frac{z}{a - z}\right)\right), t \cdot \frac{y - z}{a - z}\right) \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (fma
                              -1.0
                              (* x (- (/ y (- a z)) (+ 1.0 (/ z (- a z)))))
                              (* t (/ (- y z) (- a z)))))
                            double code(double x, double y, double z, double t, double a) {
                            	return fma(-1.0, (x * ((y / (a - z)) - (1.0 + (z / (a - z))))), (t * ((y - z) / (a - z))));
                            }
                            
                            function code(x, y, z, t, a)
                            	return fma(-1.0, Float64(x * Float64(Float64(y / Float64(a - z)) - Float64(1.0 + Float64(z / Float64(a - z))))), Float64(t * Float64(Float64(y - z) / Float64(a - z))))
                            end
                            
                            code[x_, y_, z_, t_, a_] := N[(-1.0 * N[(x * N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] - N[(1.0 + N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
                            
                            \begin{array}{l}
                            
                            \\
                            \mathsf{fma}\left(-1, x \cdot \left(\frac{y}{a - z} - \left(1 + \frac{z}{a - z}\right)\right), t \cdot \frac{y - z}{a - z}\right)
                            \end{array}
                            
                            Derivation
                            1. Initial program 81.0%

                              \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(-1, \color{blue}{x \cdot \left(\frac{y}{a - z} - \left(1 + \frac{z}{a - z}\right)\right)}, t \cdot \frac{y - z}{a - z}\right) \]
                            10. Add Preprocessing

                            Alternative 12: 37.5% accurate, 0.7× speedup?

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

                              1. Initial program 88.3%

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

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

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

                                if -5.79999999999999984e79 < a < -0.599999999999999978

                                1. Initial program 82.6%

                                  \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{t \cdot \left(y - z\right)}{a} \]
                                8. Step-by-step derivation
                                  1. Applied rewrites23.4%

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

                                  if -0.599999999999999978 < a < 1.30000000000000007e-91

                                  1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                    10. lift--.f6432.3

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

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

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

                                      \[\leadsto \frac{y - a}{z} \cdot x \]
                                    2. lift--.f6432.6

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

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

                                  if 1.30000000000000007e-91 < a < 1.7000000000000001e26

                                  1. Initial program 79.4%

                                    \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
                                    4. lift--.f6448.3

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

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

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

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

                                  Alternative 13: 63.5% accurate, 0.7× speedup?

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

                                    1. Initial program 88.2%

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

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

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

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

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

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

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

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

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

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

                                      if -1.0999999999999999e84 < a < 6.19999999999999987e-215

                                      1. Initial program 75.8%

                                        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto t \cdot \frac{y - z}{\color{blue}{a} - z} \]
                                        5. lift--.f6461.4

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

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

                                      if 6.19999999999999987e-215 < a < 1.15e31

                                      1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

                                    Alternative 14: 58.9% accurate, 0.7× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{if}\;a \leq -3.4 \cdot 10^{+79}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-122}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (let* ((t_1 (fma y (/ (- t x) a) x)))
                                       (if (<= a -3.4e+79)
                                         t_1
                                         (if (<= a -2.7e-122)
                                           (/ (* (- y z) t) (- a z))
                                           (if (<= a 3.8e-35) (/ (* (- t x) y) (- a z)) t_1)))))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double t_1 = fma(y, ((t - x) / a), x);
                                    	double tmp;
                                    	if (a <= -3.4e+79) {
                                    		tmp = t_1;
                                    	} else if (a <= -2.7e-122) {
                                    		tmp = ((y - z) * t) / (a - z);
                                    	} else if (a <= 3.8e-35) {
                                    		tmp = ((t - x) * y) / (a - z);
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a)
                                    	t_1 = fma(y, Float64(Float64(t - x) / a), x)
                                    	tmp = 0.0
                                    	if (a <= -3.4e+79)
                                    		tmp = t_1;
                                    	elseif (a <= -2.7e-122)
                                    		tmp = Float64(Float64(Float64(y - z) * t) / Float64(a - z));
                                    	elseif (a <= 3.8e-35)
                                    		tmp = Float64(Float64(Float64(t - x) * y) / Float64(a - z));
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -3.4e+79], t$95$1, If[LessEqual[a, -2.7e-122], N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 3.8e-35], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
                                    \mathbf{if}\;a \leq -3.4 \cdot 10^{+79}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;a \leq -2.7 \cdot 10^{-122}:\\
                                    \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\
                                    
                                    \mathbf{elif}\;a \leq 3.8 \cdot 10^{-35}:\\
                                    \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 3 regimes
                                    2. if a < -3.40000000000000032e79 or 3.8000000000000001e-35 < a

                                      1. Initial program 87.5%

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{\color{blue}{a}}, x\right) \]
                                        5. lift--.f6466.8

                                          \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
                                      4. Applied rewrites66.8%

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

                                      if -3.40000000000000032e79 < a < -2.70000000000000009e-122

                                      1. Initial program 80.3%

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

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

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

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

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

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

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

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

                                      if -2.70000000000000009e-122 < a < 3.8000000000000001e-35

                                      1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

                                    Alternative 15: 68.1% accurate, 0.8× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{if}\;a \leq -1.1 \cdot 10^{+84}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 9 \cdot 10^{-35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (let* ((t_1 (fma (- t x) (/ (- y z) a) x)))
                                       (if (<= a -1.1e+84) t_1 (if (<= a 9e-35) (* t (/ (- y z) (- a z))) t_1))))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double t_1 = fma((t - x), ((y - z) / a), x);
                                    	double tmp;
                                    	if (a <= -1.1e+84) {
                                    		tmp = t_1;
                                    	} else if (a <= 9e-35) {
                                    		tmp = t * ((y - z) / (a - z));
                                    	} else {
                                    		tmp = t_1;
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a)
                                    	t_1 = fma(Float64(t - x), Float64(Float64(y - z) / a), x)
                                    	tmp = 0.0
                                    	if (a <= -1.1e+84)
                                    		tmp = t_1;
                                    	elseif (a <= 9e-35)
                                    		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
                                    	else
                                    		tmp = t_1;
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.1e+84], t$95$1, If[LessEqual[a, 9e-35], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    t_1 := \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
                                    \mathbf{if}\;a \leq -1.1 \cdot 10^{+84}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    \mathbf{elif}\;a \leq 9 \cdot 10^{-35}:\\
                                    \;\;\;\;t \cdot \frac{y - z}{a - z}\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;t\_1\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if a < -1.0999999999999999e84 or 9.0000000000000002e-35 < a

                                      1. Initial program 87.4%

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right) \]
                                      4. Applied rewrites75.7%

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

                                      if -1.0999999999999999e84 < a < 9.0000000000000002e-35

                                      1. Initial program 75.4%

                                        \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto t \cdot \frac{y - z}{\color{blue}{a} - z} \]
                                        5. lift--.f6461.4

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

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

                                    Alternative 16: 38.4% accurate, 0.8× speedup?

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

                                      1. Initial program 89.4%

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

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

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

                                        if -1.0999999999999999e84 < a < -8.1999999999999998e-106

                                        1. Initial program 80.8%

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

                                          \[\leadsto \color{blue}{t} \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites29.6%

                                            \[\leadsto \color{blue}{t} \]

                                          if -8.1999999999999998e-106 < a < 2.8e-104

                                          1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                            10. lift--.f6431.2

                                              \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                          4. Applied rewrites31.2%

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

                                            \[\leadsto \frac{y}{z} \cdot x \]
                                          6. Step-by-step derivation
                                            1. lower-/.f6432.0

                                              \[\leadsto \frac{y}{z} \cdot x \]
                                          7. Applied rewrites32.0%

                                            \[\leadsto \frac{y}{z} \cdot x \]

                                          if 2.8e-104 < a < 3.50000000000000016e118

                                          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. lift--.f6420.2

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

                                            \[\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 rewrites32.5%

                                              \[\leadsto x + t \]
                                          7. Recombined 4 regimes into one program.
                                          8. Add Preprocessing

                                          Alternative 17: 39.3% accurate, 0.8× speedup?

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

                                            1. Initial program 89.4%

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

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

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

                                              if -1.0999999999999999e84 < a < 9.4e-213

                                              1. Initial program 75.8%

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

                                                \[\leadsto \color{blue}{t} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites34.3%

                                                  \[\leadsto \color{blue}{t} \]

                                                if 9.4e-213 < a < 2.84999999999999992e-176

                                                1. Initial program 70.9%

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                  10. lift--.f6428.6

                                                    \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                4. Applied rewrites28.6%

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

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

                                                    \[\leadsto \frac{x \cdot y}{z} \]
                                                  2. lower-*.f6427.0

                                                    \[\leadsto \frac{x \cdot y}{z} \]
                                                7. Applied rewrites27.0%

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

                                                if 2.84999999999999992e-176 < a < 3.50000000000000016e118

                                                1. Initial program 78.9%

                                                  \[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. lift--.f6421.5

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

                                                  \[\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 rewrites31.8%

                                                    \[\leadsto x + t \]
                                                7. Recombined 4 regimes into one program.
                                                8. Add Preprocessing

                                                Alternative 18: 60.5% accurate, 0.8× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+165}:\\ \;\;\;\;\left(1 + \frac{z}{a - z}\right) \cdot x\\ \mathbf{elif}\;a \leq 9.2 \cdot 10^{-35}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (if (<= a -2.1e+165)
                                                   (* (+ 1.0 (/ z (- a z))) x)
                                                   (if (<= a 9.2e-35) (* t (/ (- y z) (- a z))) (fma y (/ (- t x) a) x))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if (a <= -2.1e+165) {
                                                		tmp = (1.0 + (z / (a - z))) * x;
                                                	} else if (a <= 9.2e-35) {
                                                		tmp = t * ((y - z) / (a - z));
                                                	} else {
                                                		tmp = fma(y, ((t - x) / a), x);
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a)
                                                	tmp = 0.0
                                                	if (a <= -2.1e+165)
                                                		tmp = Float64(Float64(1.0 + Float64(z / Float64(a - z))) * x);
                                                	elseif (a <= 9.2e-35)
                                                		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
                                                	else
                                                		tmp = fma(y, Float64(Float64(t - x) / a), x);
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e+165], N[(N[(1.0 + N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[a, 9.2e-35], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;a \leq -2.1 \cdot 10^{+165}:\\
                                                \;\;\;\;\left(1 + \frac{z}{a - z}\right) \cdot x\\
                                                
                                                \mathbf{elif}\;a \leq 9.2 \cdot 10^{-35}:\\
                                                \;\;\;\;t \cdot \frac{y - z}{a - z}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 3 regimes
                                                2. if a < -2.1000000000000001e165

                                                  1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                    10. lift--.f6463.2

                                                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                  4. Applied rewrites63.2%

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

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

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

                                                      \[\leadsto \left(1 + \frac{z}{a - z}\right) \cdot x \]
                                                    3. lift--.f6457.7

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

                                                    \[\leadsto \left(1 + \frac{z}{a - z}\right) \cdot x \]

                                                  if -2.1000000000000001e165 < a < 9.1999999999999996e-35

                                                  1. Initial program 76.3%

                                                    \[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. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto t \cdot \frac{y - z}{\color{blue}{a} - z} \]
                                                    5. lift--.f6459.1

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

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

                                                  if 9.1999999999999996e-35 < a

                                                  1. Initial program 86.4%

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{\color{blue}{a}}, x\right) \]
                                                    5. lift--.f6464.7

                                                      \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
                                                  4. Applied rewrites64.7%

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

                                                Alternative 19: 59.4% accurate, 0.8× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{if}\;a \leq -1.85 \cdot 10^{+59}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 3.8 \cdot 10^{-35}:\\ \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (let* ((t_1 (fma y (/ (- t x) a) x)))
                                                   (if (<= a -1.85e+59)
                                                     t_1
                                                     (if (<= a 3.8e-35) (/ (* (- t x) y) (- a z)) t_1))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double t_1 = fma(y, ((t - x) / a), x);
                                                	double tmp;
                                                	if (a <= -1.85e+59) {
                                                		tmp = t_1;
                                                	} else if (a <= 3.8e-35) {
                                                		tmp = ((t - x) * y) / (a - z);
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a)
                                                	t_1 = fma(y, Float64(Float64(t - x) / a), x)
                                                	tmp = 0.0
                                                	if (a <= -1.85e+59)
                                                		tmp = t_1;
                                                	elseif (a <= 3.8e-35)
                                                		tmp = Float64(Float64(Float64(t - x) * y) / Float64(a - z));
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -1.85e+59], t$95$1, If[LessEqual[a, 3.8e-35], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
                                                \mathbf{if}\;a \leq -1.85 \cdot 10^{+59}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;a \leq 3.8 \cdot 10^{-35}:\\
                                                \;\;\;\;\frac{\left(t - x\right) \cdot y}{a - z}\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if a < -1.84999999999999999e59 or 3.8000000000000001e-35 < a

                                                  1. Initial program 87.3%

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
                                                  4. Applied rewrites66.6%

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

                                                  if -1.84999999999999999e59 < a < 3.8000000000000001e-35

                                                  1. Initial program 75.1%

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

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

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

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

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

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

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

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

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

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

                                                Alternative 20: 51.3% accurate, 0.9× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{if}\;a \leq -5.5 \cdot 10^{-136}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-78}:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (let* ((t_1 (fma y (/ (- t x) a) x)))
                                                   (if (<= a -5.5e-136) t_1 (if (<= a 4.2e-78) (* (/ (- y a) z) x) t_1))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double t_1 = fma(y, ((t - x) / a), x);
                                                	double tmp;
                                                	if (a <= -5.5e-136) {
                                                		tmp = t_1;
                                                	} else if (a <= 4.2e-78) {
                                                		tmp = ((y - a) / z) * x;
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                function code(x, y, z, t, a)
                                                	t_1 = fma(y, Float64(Float64(t - x) / a), x)
                                                	tmp = 0.0
                                                	if (a <= -5.5e-136)
                                                		tmp = t_1;
                                                	elseif (a <= 4.2e-78)
                                                		tmp = Float64(Float64(Float64(y - a) / z) * x);
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	return tmp
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -5.5e-136], t$95$1, If[LessEqual[a, 4.2e-78], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], t$95$1]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
                                                \mathbf{if}\;a \leq -5.5 \cdot 10^{-136}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;a \leq 4.2 \cdot 10^{-78}:\\
                                                \;\;\;\;\frac{y - a}{z} \cdot x\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if a < -5.4999999999999999e-136 or 4.2000000000000001e-78 < a

                                                  1. Initial program 84.8%

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{\color{blue}{a}}, x\right) \]
                                                    5. lift--.f6459.9

                                                      \[\leadsto \mathsf{fma}\left(y, \frac{t - x}{a}, x\right) \]
                                                  4. Applied rewrites59.9%

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

                                                  if -5.4999999999999999e-136 < a < 4.2000000000000001e-78

                                                  1. Initial program 73.4%

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                    10. lift--.f6431.5

                                                      \[\leadsto \mathsf{fma}\left(\frac{y - z}{a - z}, -1, 1\right) \cdot x \]
                                                  4. Applied rewrites31.5%

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

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

                                                      \[\leadsto \frac{y - a}{z} \cdot x \]
                                                    2. lift--.f6433.8

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

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

                                                Alternative 21: 50.3% accurate, 0.9× speedup?

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

                                                  1. Initial program 62.6%

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

                                                    \[\leadsto \color{blue}{t} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites51.3%

                                                      \[\leadsto \color{blue}{t} \]

                                                    if -8.00000000000000047e140 < z < 9.8000000000000006e90

                                                    1. Initial program 89.4%

                                                      \[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. *-commutativeN/A

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

                                                        \[\leadsto x + \frac{\left(t - x\right) \cdot y}{a} \]
                                                      4. lift--.f6459.5

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

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

                                                      \[\leadsto x + \frac{t \cdot y}{a} \]
                                                    6. Step-by-step derivation
                                                      1. Applied rewrites49.8%

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

                                                    Alternative 22: 38.8% accurate, 2.2× speedup?

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

                                                      1. Initial program 87.8%

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

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

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

                                                        if -1.0999999999999999e84 < a < 1.6999999999999999e-9

                                                        1. Initial program 75.6%

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

                                                          \[\leadsto \color{blue}{t} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites33.6%

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

                                                        Alternative 23: 24.8% accurate, 29.0× speedup?

                                                        \[\begin{array}{l} \\ t \end{array} \]
                                                        (FPCore (x y z t a) :precision binary64 t)
                                                        double code(double x, double y, double z, double t, double a) {
                                                        	return 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 = t
                                                        end function
                                                        
                                                        public static double code(double x, double y, double z, double t, double a) {
                                                        	return t;
                                                        }
                                                        
                                                        def code(x, y, z, t, a):
                                                        	return t
                                                        
                                                        function code(x, y, z, t, a)
                                                        	return t
                                                        end
                                                        
                                                        function tmp = code(x, y, z, t, a)
                                                        	tmp = t;
                                                        end
                                                        
                                                        code[x_, y_, z_, t_, a_] := t
                                                        
                                                        \begin{array}{l}
                                                        
                                                        \\
                                                        t
                                                        \end{array}
                                                        
                                                        Derivation
                                                        1. Initial program 81.0%

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

                                                          \[\leadsto \color{blue}{t} \]
                                                        3. Step-by-step derivation
                                                          1. Applied rewrites24.8%

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

                                                          Reproduce

                                                          ?
                                                          herbie shell --seed 2025105 
                                                          (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)))))