Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.1% → 92.6%
Time: 5.6s
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: 80.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ x + \left(y - z\right) \cdot \frac{t - x}{a - z} \end{array} \]
(FPCore (x y z t a) :precision binary64 (+ x (* (- y z) (/ (- t x) (- a z)))))
double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    code = x + ((y - z) * ((t - x) / (a - z)))
end function
public static double code(double x, double y, double z, double t, double a) {
	return x + ((y - z) * ((t - x) / (a - z)));
}
def code(x, y, z, t, a):
	return x + ((y - z) * ((t - x) / (a - z)))
function code(x, y, z, t, a)
	return Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
end
function tmp = code(x, y, z, t, a)
	tmp = x + ((y - z) * ((t - x) / (a - z)));
end
code[x_, y_, z_, t_, a_] := N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

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

Alternative 1: 92.6% 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 -1 \cdot 10^{-290}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\mathsf{fma}\left(-1, \frac{\left(a + \frac{t \cdot y}{x}\right) - \left(y + \frac{a \cdot t}{x}\right)}{z}, \frac{t}{x}\right) \cdot x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+37}:\\ \;\;\;\;\mathsf{fma}\left(x, \left(1 + \frac{z}{a - z}\right) - \frac{y}{a - z}, \frac{t \cdot \left(y - z\right)}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
   (if (<= t_1 -1e-290)
     t_1
     (if (<= t_1 0.0)
       (*
        (fma -1.0 (/ (- (+ a (/ (* t y) x)) (+ y (/ (* a t) x))) z) (/ t x))
        x)
       (if (<= t_1 5e+37)
         (fma
          x
          (- (+ 1.0 (/ z (- a z))) (/ y (- a z)))
          (/ (* t (- y z)) (- a z)))
         t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if (t_1 <= -1e-290) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = fma(-1.0, (((a + ((t * y) / x)) - (y + ((a * t) / x))) / z), (t / x)) * x;
	} else if (t_1 <= 5e+37) {
		tmp = fma(x, ((1.0 + (z / (a - z))) - (y / (a - z))), ((t * (y - z)) / (a - z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if (t_1 <= -1e-290)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(fma(-1.0, Float64(Float64(Float64(a + Float64(Float64(t * y) / x)) - Float64(y + Float64(Float64(a * t) / x))) / z), Float64(t / x)) * x);
	elseif (t_1 <= 5e+37)
		tmp = fma(x, Float64(Float64(1.0 + Float64(z / Float64(a - z))) - Float64(y / Float64(a - z))), Float64(Float64(t * 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[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-290], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(-1.0 * N[(N[(N[(a + N[(N[(t * y), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision] - N[(y + N[(N[(a * t), $MachinePrecision] / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] + N[(t / x), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e+37], N[(x * N[(N[(1.0 + N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[(t * N[(y - z), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+37}:\\
\;\;\;\;\mathsf{fma}\left(x, \left(1 + \frac{z}{a - z}\right) - \frac{y}{a - z}, \frac{t \cdot \left(y - z\right)}{a - z}\right)\\

\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)))) < -1.0000000000000001e-290 or 4.99999999999999989e37 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.99999999999999989e37

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.5% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.1999999999999998e37

    1. Initial program 80.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--.f6480.1

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

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

    if -5.1999999999999998e37 < t < 6.1e18

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.1e18 < t

    1. Initial program 80.1%

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

Alternative 3: 88.1% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-140}:\\
\;\;\;\;\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right) + t\\

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


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

    1. Initial program 80.1%

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

    if -1.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000015e-140

    1. Initial program 80.1%

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

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

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

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

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

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

        \[\leadsto \left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right) + t \]
      6. distribute-rgt-out--N/A

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

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

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

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

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

Alternative 4: 88.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 -1 \cdot 10^{-290}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-140}:\\ \;\;\;\;\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right) + t\\ \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 -1e-290)
     t_2
     (if (<= t_3 5e-140) (+ (- (/ (* (- t x) (- y a)) z)) 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 <= -1e-290) {
		tmp = t_2;
	} else if (t_3 <= 5e-140) {
		tmp = -(((t - x) * (y - a)) / z) + 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 <= -1e-290)
		tmp = t_2;
	elseif (t_3 <= 5e-140)
		tmp = Float64(Float64(-Float64(Float64(Float64(t - x) * Float64(y - a)) / z)) + 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, -1e-290], t$95$2, If[LessEqual[t$95$3, 5e-140], N[((-N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]) + 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 -1 \cdot 10^{-290}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-140}:\\
\;\;\;\;\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right) + t\\

\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)))) < -1.0000000000000001e-290 or 5.00000000000000015e-140 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 80.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--.f6480.1

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

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

    if -1.0000000000000001e-290 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000015e-140

    1. Initial program 80.1%

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

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

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

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

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

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

        \[\leadsto \left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right) + t \]
      6. distribute-rgt-out--N/A

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

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

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

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

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

Alternative 5: 75.0% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;a \leq 3.1 \cdot 10^{-13}:\\
\;\;\;\;\left(-\frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\right) + t\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.44999999999999997e-38

    1. Initial program 80.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--.f6480.1

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

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

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

      if -1.44999999999999997e-38 < a < 3.0999999999999999e-13

      1. Initial program 80.1%

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

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

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

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

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

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

          \[\leadsto \left(-\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right) + t \]
        6. distribute-rgt-out--N/A

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

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

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

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

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

      if 3.0999999999999999e-13 < a

      1. Initial program 80.1%

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

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

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

      Alternative 6: 72.9% accurate, 0.7× speedup?

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

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

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

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

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

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

            \[\leadsto t \cdot \frac{y - z}{a - \color{blue}{z}} \]
        7. Applied rewrites51.5%

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

        if -2.8e52 < z < 5.4999999999999998e-104

        1. Initial program 80.1%

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

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

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

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

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

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

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

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

        if 5.4999999999999998e-104 < z < 1.95000000000000012e163

        1. Initial program 80.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--.f6480.1

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

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

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

        Alternative 7: 71.6% accurate, 0.7× speedup?

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

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

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

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

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

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

              \[\leadsto t \cdot \frac{y - z}{a - \color{blue}{z}} \]
          7. Applied rewrites51.5%

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

          if -2.30000000000000012e39 < z < 3.59999999999999976e-107

          1. Initial program 80.1%

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

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

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

          if 3.59999999999999976e-107 < z < 1.95000000000000012e163

          1. Initial program 80.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--.f6480.1

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

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

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

          Alternative 8: 68.8% accurate, 0.8× speedup?

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

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

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

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

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

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

                \[\leadsto t \cdot \frac{y - z}{a - \color{blue}{z}} \]
            7. Applied rewrites51.5%

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

            if -2.30000000000000012e39 < z < 1.49999999999999995e-69

            1. Initial program 80.1%

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

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

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

          Alternative 9: 66.8% accurate, 0.9× speedup?

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

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

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

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

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

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

                \[\leadsto t \cdot \frac{y - z}{a - \color{blue}{z}} \]
            7. Applied rewrites51.5%

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

            if -1.85000000000000006e39 < z < 1.35e-102

            1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 65.7% accurate, 0.9× speedup?

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

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

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

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

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

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

                \[\leadsto t \cdot \frac{y - z}{a - \color{blue}{z}} \]
            7. Applied rewrites51.5%

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

            if -1.85000000000000006e39 < z < 1.35e-102

            1. Initial program 80.1%

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

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

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

          Alternative 11: 59.6% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]
            9. Step-by-step derivation
              1. lower-/.f6425.1

                \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]
            10. Applied rewrites25.1%

              \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]

            if -7.9999999999999994e45 < z < 4.80000000000000046e43

            1. Initial program 80.1%

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

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

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

          Alternative 12: 51.2% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]
            9. Step-by-step derivation
              1. lower-/.f6425.1

                \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]
            10. Applied rewrites25.1%

              \[\leadsto t \cdot \left(x \cdot \frac{1}{x}\right) \]

            if -7.7999999999999999e45 < z < 3.20000000000000014e43

            1. Initial program 80.1%

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

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

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

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

            Alternative 13: 48.8% accurate, 1.0× speedup?

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

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

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

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

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

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

                  \[\leadsto \frac{t}{x} \cdot x \]
              7. Applied rewrites22.0%

                \[\leadsto \frac{t}{x} \cdot x \]

              if -5.50000000000000036e77 < z < 2.09999999999999991e57

              1. Initial program 80.1%

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

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

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

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

                if 2.09999999999999991e57 < z

                1. Initial program 80.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--.f6419.3

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

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

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

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

                Alternative 14: 46.0% accurate, 0.8× speedup?

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

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

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

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

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

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

                      \[\leadsto \frac{t}{x} \cdot x \]
                  7. Applied rewrites22.0%

                    \[\leadsto \frac{t}{x} \cdot x \]

                  if -2.49999999999999994e37 < z < 1.3499999999999999e-69

                  1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                    2. lower-/.f6436.9

                      \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                  7. Applied rewrites36.9%

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

                  if 1.3499999999999999e-69 < z < 2.99999999999999989e31

                  1. Initial program 80.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--.f6480.1

                      \[\leadsto \mathsf{fma}\left(\frac{t - x}{a - z}, \color{blue}{y - z}, x\right) \]
                  3. Applied rewrites80.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. *-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--.f6439.3

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

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

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

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

                    if 2.99999999999999989e31 < z

                    1. Initial program 80.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--.f6419.3

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

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

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

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

                    Alternative 15: 45.0% accurate, 1.0× speedup?

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

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

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

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

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

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

                          \[\leadsto \frac{t}{x} \cdot x \]
                      7. Applied rewrites22.0%

                        \[\leadsto \frac{t}{x} \cdot x \]

                      if -2.49999999999999994e37 < z < 4.2999999999999999e-41

                      1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                        2. lower-/.f6436.9

                          \[\leadsto \left(1 - \frac{y}{a}\right) \cdot x \]
                      7. Applied rewrites36.9%

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

                      if 4.2999999999999999e-41 < z

                      1. Initial program 80.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--.f6419.3

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

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

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

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

                      Alternative 16: 44.2% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto y \cdot \frac{t - x}{a} \]
                          2. lift--.f6426.1

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

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

                        if -2.30000000000000016e206 < y < -1.15e139

                        1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

                          \[\leadsto \color{blue}{\left(\left(-\frac{y - z}{a - z}\right) + 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. associate-/l*N/A

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

                            \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                          3. lift-/.f6419.2

                            \[\leadsto x \cdot \frac{y}{z} \]
                        7. Applied rewrites19.2%

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

                        if -1.15e139 < y < 1.49999999999999993e122

                        1. Initial program 80.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--.f6419.3

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

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

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

                            \[\leadsto x + t \]

                          if 1.49999999999999993e122 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 17: 44.1% 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 -\infty:\\ \;\;\;\;t \cdot \frac{y - z}{a}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \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 (- INFINITY))
                             (* t (/ (- y z) a))
                             (if (<= t_1 -1e-266)
                               (+ x t)
                               (if (<= t_1 5e-145)
                                 (* (/ t x) x)
                                 (if (<= t_1 5e+307) (+ x t) (/ (* t y) a)))))))
                        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 <= -((double) INFINITY)) {
                        		tmp = t * ((y - z) / a);
                        	} else if (t_1 <= -1e-266) {
                        		tmp = x + t;
                        	} else if (t_1 <= 5e-145) {
                        		tmp = (t / x) * x;
                        	} else if (t_1 <= 5e+307) {
                        		tmp = x + t;
                        	} else {
                        		tmp = (t * y) / a;
                        	}
                        	return tmp;
                        }
                        
                        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 <= -Double.POSITIVE_INFINITY) {
                        		tmp = t * ((y - z) / a);
                        	} else if (t_1 <= -1e-266) {
                        		tmp = x + t;
                        	} else if (t_1 <= 5e-145) {
                        		tmp = (t / x) * x;
                        	} else if (t_1 <= 5e+307) {
                        		tmp = x + t;
                        	} else {
                        		tmp = (t * y) / a;
                        	}
                        	return tmp;
                        }
                        
                        def code(x, y, z, t, a):
                        	t_1 = x + ((y - z) * ((t - x) / (a - z)))
                        	tmp = 0
                        	if t_1 <= -math.inf:
                        		tmp = t * ((y - z) / a)
                        	elif t_1 <= -1e-266:
                        		tmp = x + t
                        	elif t_1 <= 5e-145:
                        		tmp = (t / x) * x
                        	elif t_1 <= 5e+307:
                        		tmp = x + t
                        	else:
                        		tmp = (t * y) / a
                        	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 <= Float64(-Inf))
                        		tmp = Float64(t * Float64(Float64(y - z) / a));
                        	elseif (t_1 <= -1e-266)
                        		tmp = Float64(x + t);
                        	elseif (t_1 <= 5e-145)
                        		tmp = Float64(Float64(t / x) * x);
                        	elseif (t_1 <= 5e+307)
                        		tmp = Float64(x + t);
                        	else
                        		tmp = Float64(Float64(t * y) / a);
                        	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 <= -Inf)
                        		tmp = t * ((y - z) / a);
                        	elseif (t_1 <= -1e-266)
                        		tmp = x + t;
                        	elseif (t_1 <= 5e-145)
                        		tmp = (t / x) * x;
                        	elseif (t_1 <= 5e+307)
                        		tmp = x + t;
                        	else
                        		tmp = (t * y) / a;
                        	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, (-Infinity)], N[(t * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-266], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 5e-145], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(x + t), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $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 -\infty:\\
                        \;\;\;\;t \cdot \frac{y - z}{a}\\
                        
                        \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\
                        \;\;\;\;x + t\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\
                        \;\;\;\;\frac{t}{x} \cdot x\\
                        
                        \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                        \;\;\;\;x + t\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\frac{t \cdot y}{a}\\
                        
                        
                        \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 80.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 + \left(-1 \cdot \frac{y - z}{a - z} + \frac{t \cdot \left(y - z\right)}{x \cdot \left(a - z\right)}\right)\right)} \]
                          3. Step-by-step derivation
                            1. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999998e-267 or 4.9999999999999998e-145 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e307

                          1. Initial program 80.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--.f6419.3

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

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

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

                              \[\leadsto x + t \]

                            if -9.9999999999999998e-267 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-145

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

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

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

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

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

                                \[\leadsto \frac{t}{x} \cdot x \]
                            7. Applied rewrites22.0%

                              \[\leadsto \frac{t}{x} \cdot x \]

                            if 5e307 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                            1. Initial program 80.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--.f6480.1

                                \[\leadsto \mathsf{fma}\left(\frac{t - x}{a - z}, \color{blue}{y - z}, x\right) \]
                            3. Applied rewrites80.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. *-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--.f6439.3

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

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

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

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

                          Alternative 18: 43.9% accurate, 0.2× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;\frac{t \cdot y}{a}\\ \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 (- INFINITY))
                               (/ (* x y) z)
                               (if (<= t_1 -1e-266)
                                 (+ x t)
                                 (if (<= t_1 5e-145)
                                   (* (/ t x) x)
                                   (if (<= t_1 5e+307) (+ x t) (/ (* t y) a)))))))
                          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 <= -((double) INFINITY)) {
                          		tmp = (x * y) / z;
                          	} else if (t_1 <= -1e-266) {
                          		tmp = x + t;
                          	} else if (t_1 <= 5e-145) {
                          		tmp = (t / x) * x;
                          	} else if (t_1 <= 5e+307) {
                          		tmp = x + t;
                          	} else {
                          		tmp = (t * y) / a;
                          	}
                          	return tmp;
                          }
                          
                          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 <= -Double.POSITIVE_INFINITY) {
                          		tmp = (x * y) / z;
                          	} else if (t_1 <= -1e-266) {
                          		tmp = x + t;
                          	} else if (t_1 <= 5e-145) {
                          		tmp = (t / x) * x;
                          	} else if (t_1 <= 5e+307) {
                          		tmp = x + t;
                          	} else {
                          		tmp = (t * y) / a;
                          	}
                          	return tmp;
                          }
                          
                          def code(x, y, z, t, a):
                          	t_1 = x + ((y - z) * ((t - x) / (a - z)))
                          	tmp = 0
                          	if t_1 <= -math.inf:
                          		tmp = (x * y) / z
                          	elif t_1 <= -1e-266:
                          		tmp = x + t
                          	elif t_1 <= 5e-145:
                          		tmp = (t / x) * x
                          	elif t_1 <= 5e+307:
                          		tmp = x + t
                          	else:
                          		tmp = (t * y) / a
                          	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 <= Float64(-Inf))
                          		tmp = Float64(Float64(x * y) / z);
                          	elseif (t_1 <= -1e-266)
                          		tmp = Float64(x + t);
                          	elseif (t_1 <= 5e-145)
                          		tmp = Float64(Float64(t / x) * x);
                          	elseif (t_1 <= 5e+307)
                          		tmp = Float64(x + t);
                          	else
                          		tmp = Float64(Float64(t * y) / a);
                          	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 <= -Inf)
                          		tmp = (x * y) / z;
                          	elseif (t_1 <= -1e-266)
                          		tmp = x + t;
                          	elseif (t_1 <= 5e-145)
                          		tmp = (t / x) * x;
                          	elseif (t_1 <= 5e+307)
                          		tmp = x + t;
                          	else
                          		tmp = (t * y) / a;
                          	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, (-Infinity)], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, -1e-266], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 5e-145], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(x + t), $MachinePrecision], N[(N[(t * y), $MachinePrecision] / a), $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 -\infty:\\
                          \;\;\;\;\frac{x \cdot y}{z}\\
                          
                          \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\
                          \;\;\;\;x + t\\
                          
                          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\
                          \;\;\;\;\frac{t}{x} \cdot x\\
                          
                          \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                          \;\;\;\;x + t\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\frac{t \cdot y}{a}\\
                          
                          
                          \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 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot y}{a - z}} \]
                            6. Step-by-step derivation
                              1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{x \cdot y}{z} \]
                            10. Applied rewrites16.6%

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

                            if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999998e-267 or 4.9999999999999998e-145 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e307

                            1. Initial program 80.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--.f6419.3

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

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

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

                                \[\leadsto x + t \]

                              if -9.9999999999999998e-267 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-145

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

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

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

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

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

                                  \[\leadsto \frac{t}{x} \cdot x \]
                              7. Applied rewrites22.0%

                                \[\leadsto \frac{t}{x} \cdot x \]

                              if 5e307 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                              1. Initial program 80.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--.f6480.1

                                  \[\leadsto \mathsf{fma}\left(\frac{t - x}{a - z}, \color{blue}{y - z}, x\right) \]
                              3. Applied rewrites80.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. *-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--.f6439.3

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

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

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

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

                            Alternative 19: 42.6% 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 -\infty:\\ \;\;\;\;\frac{x \cdot y}{z}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\ \;\;\;\;x + t\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\ \;\;\;\;\frac{t}{x} \cdot x\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\ \;\;\;\;x + t\\ \mathbf{else}:\\ \;\;\;\;x \cdot \frac{y}{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 (- INFINITY))
                                 (/ (* x y) z)
                                 (if (<= t_1 -1e-266)
                                   (+ x t)
                                   (if (<= t_1 5e-145)
                                     (* (/ t x) x)
                                     (if (<= t_1 5e+307) (+ x t) (* x (/ y 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 <= -((double) INFINITY)) {
                            		tmp = (x * y) / z;
                            	} else if (t_1 <= -1e-266) {
                            		tmp = x + t;
                            	} else if (t_1 <= 5e-145) {
                            		tmp = (t / x) * x;
                            	} else if (t_1 <= 5e+307) {
                            		tmp = x + t;
                            	} else {
                            		tmp = x * (y / z);
                            	}
                            	return tmp;
                            }
                            
                            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 <= -Double.POSITIVE_INFINITY) {
                            		tmp = (x * y) / z;
                            	} else if (t_1 <= -1e-266) {
                            		tmp = x + t;
                            	} else if (t_1 <= 5e-145) {
                            		tmp = (t / x) * x;
                            	} else if (t_1 <= 5e+307) {
                            		tmp = x + t;
                            	} else {
                            		tmp = x * (y / z);
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	t_1 = x + ((y - z) * ((t - x) / (a - z)))
                            	tmp = 0
                            	if t_1 <= -math.inf:
                            		tmp = (x * y) / z
                            	elif t_1 <= -1e-266:
                            		tmp = x + t
                            	elif t_1 <= 5e-145:
                            		tmp = (t / x) * x
                            	elif t_1 <= 5e+307:
                            		tmp = x + t
                            	else:
                            		tmp = x * (y / 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 <= Float64(-Inf))
                            		tmp = Float64(Float64(x * y) / z);
                            	elseif (t_1 <= -1e-266)
                            		tmp = Float64(x + t);
                            	elseif (t_1 <= 5e-145)
                            		tmp = Float64(Float64(t / x) * x);
                            	elseif (t_1 <= 5e+307)
                            		tmp = Float64(x + t);
                            	else
                            		tmp = Float64(x * Float64(y / 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 <= -Inf)
                            		tmp = (x * y) / z;
                            	elseif (t_1 <= -1e-266)
                            		tmp = x + t;
                            	elseif (t_1 <= 5e-145)
                            		tmp = (t / x) * x;
                            	elseif (t_1 <= 5e+307)
                            		tmp = x + t;
                            	else
                            		tmp = x * (y / 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, (-Infinity)], N[(N[(x * y), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, -1e-266], N[(x + t), $MachinePrecision], If[LessEqual[t$95$1, 5e-145], N[(N[(t / x), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[t$95$1, 5e+307], N[(x + t), $MachinePrecision], N[(x * N[(y / 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 -\infty:\\
                            \;\;\;\;\frac{x \cdot y}{z}\\
                            
                            \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-266}:\\
                            \;\;\;\;x + t\\
                            
                            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-145}:\\
                            \;\;\;\;\frac{t}{x} \cdot x\\
                            
                            \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+307}:\\
                            \;\;\;\;x + t\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;x \cdot \frac{y}{z}\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 4 regimes
                            2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0

                              1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                                \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot y}{a - z}} \]
                              6. Step-by-step derivation
                                1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{x \cdot y}{z} \]
                              10. Applied rewrites16.6%

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

                              if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.9999999999999998e-267 or 4.9999999999999998e-145 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e307

                              1. Initial program 80.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--.f6419.3

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

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

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

                                  \[\leadsto x + t \]

                                if -9.9999999999999998e-267 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 4.9999999999999998e-145

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

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

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

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

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

                                    \[\leadsto \frac{t}{x} \cdot x \]
                                7. Applied rewrites22.0%

                                  \[\leadsto \frac{t}{x} \cdot x \]

                                if 5e307 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

                                1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(-\frac{y - z}{a - z}\right) + 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. associate-/l*N/A

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

                                    \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                  3. lift-/.f6419.2

                                    \[\leadsto x \cdot \frac{y}{z} \]
                                7. Applied rewrites19.2%

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

                              Alternative 20: 41.0% accurate, 1.0× speedup?

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

                                1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

                                  \[\leadsto \color{blue}{\left(\left(-\frac{y - z}{a - z}\right) + 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. associate-/l*N/A

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

                                    \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                  3. lift-/.f6419.2

                                    \[\leadsto x \cdot \frac{y}{z} \]
                                7. Applied rewrites19.2%

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

                                if -1.15e139 < y < 1.49999999999999993e122

                                1. Initial program 80.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--.f6419.3

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

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

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

                                    \[\leadsto x + t \]

                                  if 1.49999999999999993e122 < y

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 21: 39.4% accurate, 1.2× speedup?

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

                                  1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

                                    \[\leadsto \color{blue}{\left(\left(-\frac{y - z}{a - z}\right) + 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. associate-/l*N/A

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

                                      \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                    3. lift-/.f6419.2

                                      \[\leadsto x \cdot \frac{y}{z} \]
                                  7. Applied rewrites19.2%

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

                                  if -1.15e139 < y < 2.5e128

                                  1. Initial program 80.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--.f6419.3

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

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

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

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

                                  Alternative 22: 37.4% accurate, 1.2× speedup?

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

                                    1. Initial program 80.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. lower-+.f64N/A

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

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

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

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

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

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

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

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

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

                                      \[\leadsto -1 \cdot \color{blue}{\frac{x \cdot y}{a - z}} \]
                                    6. Step-by-step derivation
                                      1. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{x \cdot y}{z} \]
                                    10. Applied rewrites16.6%

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

                                    if -4.3999999999999997e186 < y < 2.5e128

                                    1. Initial program 80.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--.f6419.3

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

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

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

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

                                    Alternative 23: 34.1% accurate, 4.8× speedup?

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

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

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

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

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

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025139 
                                      (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)))))