Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 81.2% → 90.3%
Time: 5.6s
Alternatives: 19
Speedup: 0.3×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 81.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 90.3% accurate, 0.1× 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^{-191}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+19}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{\left(y - z\right) \cdot \left(-x\right)}{a - z}\right)\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(y - z\right) \cdot t}{x}}{a - z}, -1, \frac{y}{a - z}\right) - \left(\frac{z}{a - z} - -1\right)\right)\\ \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-191)
     t_1
     (if (<= t_1 0.0)
       (- t (/ (* (- t x) (- y a)) z))
       (if (<= t_1 5e+19)
         (+ x (fma (/ (- y z) (- a z)) t (/ (* (- y z) (- x)) (- a z))))
         (if (<= t_1 5e+305)
           t_1
           (*
            (- x)
            (-
             (fma (/ (/ (* (- y z) t) x) (- a z)) -1.0 (/ y (- a z)))
             (- (/ z (- a z)) -1.0)))))))))
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-191) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = t - (((t - x) * (y - a)) / z);
	} else if (t_1 <= 5e+19) {
		tmp = x + fma(((y - z) / (a - z)), t, (((y - z) * -x) / (a - z)));
	} else if (t_1 <= 5e+305) {
		tmp = t_1;
	} else {
		tmp = -x * (fma(((((y - z) * t) / x) / (a - z)), -1.0, (y / (a - z))) - ((z / (a - z)) - -1.0));
	}
	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-191)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
	elseif (t_1 <= 5e+19)
		tmp = Float64(x + fma(Float64(Float64(y - z) / Float64(a - z)), t, Float64(Float64(Float64(y - z) * Float64(-x)) / Float64(a - z))));
	elseif (t_1 <= 5e+305)
		tmp = t_1;
	else
		tmp = Float64(Float64(-x) * Float64(fma(Float64(Float64(Float64(Float64(y - z) * t) / x) / Float64(a - z)), -1.0, Float64(y / Float64(a - z))) - Float64(Float64(z / Float64(a - z)) - -1.0)));
	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-191], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+19], N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + N[(N[(N[(y - z), $MachinePrecision] * (-x)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+305], t$95$1, N[((-x) * N[(N[(N[(N[(N[(N[(y - z), $MachinePrecision] * t), $MachinePrecision] / x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * -1.0 + N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(z / N[(a - z), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $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 -1 \cdot 10^{-191}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;t\_1\\

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


\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)))) < -1e-191 or 5e19 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.00000000000000009e305

    1. Initial program 93.7%

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

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

    1. Initial program 4.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
    3. 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--.f644.9

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

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

      \[\leadsto \color{blue}{x} \]
    6. Step-by-step derivation
      1. Applied rewrites4.6%

        \[\leadsto \color{blue}{x} \]
      2. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 82.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 5.00000000000000009e305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

      1. Initial program 70.7%

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

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

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

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

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

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

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

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

      \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-191}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 5 \cdot 10^{+19}:\\ \;\;\;\;x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{\left(y - z\right) \cdot \left(-x\right)}{a - z}\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(y - z\right) \cdot t}{x}}{a - z}, -1, \frac{y}{a - z}\right) - \left(\frac{z}{a - z} - -1\right)\right)\\ \end{array} \]
    9. Add Preprocessing

    Alternative 2: 90.0% 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^{-191}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+19} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\ \;\;\;\;x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{\left(y - z\right) \cdot \left(-x\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-191)
         t_1
         (if (<= t_1 0.0)
           (- t (/ (* (- t x) (- y a)) z))
           (if (or (<= t_1 5e+19) (not (<= t_1 2e+305)))
             (+ x (fma (/ (- y z) (- a z)) t (/ (* (- y z) (- x)) (- 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-191) {
    		tmp = t_1;
    	} else if (t_1 <= 0.0) {
    		tmp = t - (((t - x) * (y - a)) / z);
    	} else if ((t_1 <= 5e+19) || !(t_1 <= 2e+305)) {
    		tmp = x + fma(((y - z) / (a - z)), t, (((y - z) * -x) / (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-191)
    		tmp = t_1;
    	elseif (t_1 <= 0.0)
    		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
    	elseif ((t_1 <= 5e+19) || !(t_1 <= 2e+305))
    		tmp = Float64(x + fma(Float64(Float64(y - z) / Float64(a - z)), t, Float64(Float64(Float64(y - z) * Float64(-x)) / 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-191], t$95$1, If[LessEqual[t$95$1, 0.0], N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 5e+19], N[Not[LessEqual[t$95$1, 2e+305]], $MachinePrecision]], N[(x + N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + N[(N[(N[(y - z), $MachinePrecision] * (-x)), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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^{-191}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t\_1 \leq 0:\\
    \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+19} \lor \neg \left(t\_1 \leq 2 \cdot 10^{+305}\right):\\
    \;\;\;\;x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{\left(y - z\right) \cdot \left(-x\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)))) < -1e-191 or 5e19 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999999e305

      1. Initial program 93.7%

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

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

      1. Initial program 4.0%

        \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
      2. Add Preprocessing
      3. 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--.f644.9

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

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

        \[\leadsto \color{blue}{x} \]
      6. Step-by-step derivation
        1. Applied rewrites4.6%

          \[\leadsto \color{blue}{x} \]
        2. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

        if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5e19 or 1.9999999999999999e305 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

        1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-191}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 5 \cdot 10^{+19} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 2 \cdot 10^{+305}\right):\\ \;\;\;\;x + \mathsf{fma}\left(\frac{y - z}{a - z}, t, \frac{\left(y - z\right) \cdot \left(-x\right)}{a - z}\right)\\ \mathbf{else}:\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 3: 87.2% accurate, 0.2× 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^{-191}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-303}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \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-191)
           t_2
           (if (<= t_3 -1e-303)
             (* t (/ (- y z) (- a z)))
             (if (<= t_3 0.0) (* (/ (- y a) z) x) 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-191) {
      		tmp = t_2;
      	} else if (t_3 <= -1e-303) {
      		tmp = t * ((y - z) / (a - z));
      	} else if (t_3 <= 0.0) {
      		tmp = ((y - a) / z) * x;
      	} 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-191)
      		tmp = t_2;
      	elseif (t_3 <= -1e-303)
      		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
      	elseif (t_3 <= 0.0)
      		tmp = Float64(Float64(Float64(y - a) / z) * x);
      	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-191], t$95$2, If[LessEqual[t$95$3, -1e-303], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $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^{-191}:\\
      \;\;\;\;t\_2\\
      
      \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-303}:\\
      \;\;\;\;t \cdot \frac{y - z}{a - z}\\
      
      \mathbf{elif}\;t\_3 \leq 0:\\
      \;\;\;\;\frac{y - a}{z} \cdot x\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_2\\
      
      
      \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)))) < -1e-191 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

        1. Initial program 88.5%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. 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--.f6488.4

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

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

        if -1e-191 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999931e-304

        1. Initial program 6.6%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. 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--.f646.6

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

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

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

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

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

        1. Initial program 3.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y - a}{z} \cdot x \]
          2. lower--.f6473.4

            \[\leadsto \frac{y - a}{z} \cdot x \]
        8. Applied rewrites73.4%

          \[\leadsto \frac{y - a}{z} \cdot x \]
      3. Recombined 3 regimes into one program.
      4. Final simplification86.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-191}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-303}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\ \end{array} \]
      5. Add Preprocessing

      Alternative 4: 89.2% 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^{-191} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (+ x (* (- y z) (/ (- t x) (- a z))))))
         (if (or (<= t_1 -1e-191) (not (<= t_1 0.0)))
           t_1
           (- t (/ (* (- t x) (- y a)) z)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
      	double tmp;
      	if ((t_1 <= -1e-191) || !(t_1 <= 0.0)) {
      		tmp = t_1;
      	} else {
      		tmp = t - (((t - x) * (y - a)) / z);
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a)
      use fmin_fmax_functions
          real(8), intent (in) :: x
          real(8), intent (in) :: y
          real(8), intent (in) :: z
          real(8), intent (in) :: t
          real(8), intent (in) :: a
          real(8) :: t_1
          real(8) :: tmp
          t_1 = x + ((y - z) * ((t - x) / (a - z)))
          if ((t_1 <= (-1d-191)) .or. (.not. (t_1 <= 0.0d0))) then
              tmp = t_1
          else
              tmp = t - (((t - x) * (y - a)) / z)
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a) {
      	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
      	double tmp;
      	if ((t_1 <= -1e-191) || !(t_1 <= 0.0)) {
      		tmp = t_1;
      	} else {
      		tmp = t - (((t - x) * (y - a)) / z);
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a):
      	t_1 = x + ((y - z) * ((t - x) / (a - z)))
      	tmp = 0
      	if (t_1 <= -1e-191) or not (t_1 <= 0.0):
      		tmp = t_1
      	else:
      		tmp = t - (((t - x) * (y - a)) / z)
      	return tmp
      
      function code(x, y, z, t, a)
      	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
      	tmp = 0.0
      	if ((t_1 <= -1e-191) || !(t_1 <= 0.0))
      		tmp = t_1;
      	else
      		tmp = Float64(t - Float64(Float64(Float64(t - x) * Float64(y - a)) / z));
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a)
      	t_1 = x + ((y - z) * ((t - x) / (a - z)));
      	tmp = 0.0;
      	if ((t_1 <= -1e-191) || ~((t_1 <= 0.0)))
      		tmp = t_1;
      	else
      		tmp = t - (((t - x) * (y - a)) / z);
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Or[LessEqual[t$95$1, -1e-191], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], t$95$1, N[(t - N[(N[(N[(t - x), $MachinePrecision] * N[(y - a), $MachinePrecision]), $MachinePrecision] / 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 -1 \cdot 10^{-191} \lor \neg \left(t\_1 \leq 0\right):\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\
      
      
      \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)))) < -1e-191 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

        1. Initial program 88.5%

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

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

        1. Initial program 4.0%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing
        3. 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--.f644.9

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

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

          \[\leadsto \color{blue}{x} \]
        6. Step-by-step derivation
          1. Applied rewrites4.6%

            \[\leadsto \color{blue}{x} \]
          2. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-191} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0\right):\\ \;\;\;\;x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 5: 89.2% accurate, 0.3× speedup?

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

          1. Initial program 88.5%

            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
          2. Add Preprocessing
          3. 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--.f6488.4

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

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

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

          1. Initial program 4.0%

            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
          2. Add Preprocessing
          3. 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--.f644.9

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

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

            \[\leadsto \color{blue}{x} \]
          6. Step-by-step derivation
            1. Applied rewrites4.6%

              \[\leadsto \color{blue}{x} \]
            2. Taylor expanded in z around -inf

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-191} \lor \neg \left(x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a - z}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{\left(t - x\right) \cdot \left(y - a\right)}{z}\\ \end{array} \]
          9. Add Preprocessing

          Alternative 6: 57.6% accurate, 0.6× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+183}:\\ \;\;\;\;t\\ \mathbf{elif}\;z \leq -340000000000:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{elif}\;z \leq 9.6 \cdot 10^{-246}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \mathbf{elif}\;z \leq 2.25 \cdot 10^{+111}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= z -4.1e+183)
             t
             (if (<= z -340000000000.0)
               (* (/ (- y a) z) x)
               (if (<= z 9.6e-246)
                 (fma y (/ (- t x) a) x)
                 (if (<= z 2.25e+111) (fma (/ t a) (- y z) x) t)))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (z <= -4.1e+183) {
          		tmp = t;
          	} else if (z <= -340000000000.0) {
          		tmp = ((y - a) / z) * x;
          	} else if (z <= 9.6e-246) {
          		tmp = fma(y, ((t - x) / a), x);
          	} else if (z <= 2.25e+111) {
          		tmp = fma((t / a), (y - z), x);
          	} else {
          		tmp = t;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (z <= -4.1e+183)
          		tmp = t;
          	elseif (z <= -340000000000.0)
          		tmp = Float64(Float64(Float64(y - a) / z) * x);
          	elseif (z <= 9.6e-246)
          		tmp = fma(y, Float64(Float64(t - x) / a), x);
          	elseif (z <= 2.25e+111)
          		tmp = fma(Float64(t / a), Float64(y - z), x);
          	else
          		tmp = t;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.1e+183], t, If[LessEqual[z, -340000000000.0], N[(N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] * x), $MachinePrecision], If[LessEqual[z, 9.6e-246], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 2.25e+111], N[(N[(t / a), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], t]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;z \leq -4.1 \cdot 10^{+183}:\\
          \;\;\;\;t\\
          
          \mathbf{elif}\;z \leq -340000000000:\\
          \;\;\;\;\frac{y - a}{z} \cdot x\\
          
          \mathbf{elif}\;z \leq 9.6 \cdot 10^{-246}:\\
          \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
          
          \mathbf{elif}\;z \leq 2.25 \cdot 10^{+111}:\\
          \;\;\;\;\mathsf{fma}\left(\frac{t}{a}, y - z, x\right)\\
          
          \mathbf{else}:\\
          \;\;\;\;t\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if z < -4.10000000000000015e183 or 2.25e111 < z

            1. Initial program 52.4%

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

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

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

              if -4.10000000000000015e183 < z < -3.4e11

              1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{y - a}{z} \cdot x \]
                2. lower--.f6444.8

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

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

              if -3.4e11 < z < 9.5999999999999992e-246

              1. Initial program 87.3%

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

                \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
              4. 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--.f6475.9

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

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

              if 9.5999999999999992e-246 < z < 2.25e111

              1. Initial program 88.6%

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

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

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

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

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

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

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

                Alternative 7: 74.7% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -5.8 \cdot 10^{+64}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.9:\\ \;\;\;\;x + y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\ \;\;\;\;\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 -5.8e+64)
                     t_1
                     (if (<= z 0.9)
                       (+ x (* y (/ (- t x) (- a z))))
                       (if (<= z 7.8e+113) (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 <= -5.8e+64) {
                		tmp = t_1;
                	} else if (z <= 0.9) {
                		tmp = x + (y * ((t - x) / (a - z)));
                	} else if (z <= 7.8e+113) {
                		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 <= -5.8e+64)
                		tmp = t_1;
                	elseif (z <= 0.9)
                		tmp = Float64(x + Float64(y * Float64(Float64(t - x) / Float64(a - z))));
                	elseif (z <= 7.8e+113)
                		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, -5.8e+64], t$95$1, If[LessEqual[z, 0.9], N[(x + N[(y * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.8e+113], 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 -5.8 \cdot 10^{+64}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;z \leq 0.9:\\
                \;\;\;\;x + y \cdot \frac{t - x}{a - z}\\
                
                \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\
                \;\;\;\;\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 < -5.79999999999999986e64 or 7.80000000000000039e113 < z

                  1. Initial program 54.1%

                    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                  2. Add Preprocessing
                  3. 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--.f6454.0

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

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

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

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

                  if -5.79999999999999986e64 < z < 0.900000000000000022

                  1. Initial program 85.1%

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

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

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

                    if 0.900000000000000022 < z < 7.80000000000000039e113

                    1. Initial program 95.8%

                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                    2. Add Preprocessing
                    3. 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--.f6495.9

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

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+64}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 0.9:\\ \;\;\;\;x + y \cdot \frac{t - x}{a - z}\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 8: 71.5% accurate, 0.7× speedup?

                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := t \cdot \frac{y - z}{a - z}\\ \mathbf{if}\;z \leq -140000000000:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-115}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\ \;\;\;\;\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 -140000000000.0)
                         t_1
                         (if (<= z 8.5e-115)
                           (fma (- t x) (/ (- y z) a) x)
                           (if (<= z 7.8e+113) (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 <= -140000000000.0) {
                    		tmp = t_1;
                    	} else if (z <= 8.5e-115) {
                    		tmp = fma((t - x), ((y - z) / a), x);
                    	} else if (z <= 7.8e+113) {
                    		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 <= -140000000000.0)
                    		tmp = t_1;
                    	elseif (z <= 8.5e-115)
                    		tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x);
                    	elseif (z <= 7.8e+113)
                    		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, -140000000000.0], t$95$1, If[LessEqual[z, 8.5e-115], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 7.8e+113], 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 -140000000000:\\
                    \;\;\;\;t\_1\\
                    
                    \mathbf{elif}\;z \leq 8.5 \cdot 10^{-115}:\\
                    \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
                    
                    \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\
                    \;\;\;\;\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 < -1.4e11 or 7.80000000000000039e113 < z

                      1. Initial program 54.9%

                        \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                      2. Add Preprocessing
                      3. 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--.f6454.9

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

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

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

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

                      if -1.4e11 < z < 8.49999999999999953e-115

                      1. Initial program 86.6%

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

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

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

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

                      if 8.49999999999999953e-115 < z < 7.80000000000000039e113

                      1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -140000000000:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-115}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \mathbf{elif}\;z \leq 7.8 \cdot 10^{+113}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t}{a - z}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \end{array} \]
                      9. Add Preprocessing

                      Alternative 9: 58.5% accurate, 0.7× speedup?

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

                        1. Initial program 50.8%

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

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

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

                          if -4.10000000000000015e183 < z < -3.4e11

                          1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{y - a}{z} \cdot x \]
                            2. lower--.f6444.8

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

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

                          if -3.4e11 < z < 3.8e143

                          1. Initial program 87.9%

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

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

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

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

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

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

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

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

                        Alternative 10: 69.6% accurate, 0.8× speedup?

                        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -140000000000 \lor \neg \left(z \leq 1.35 \cdot 10^{+26}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \end{array} \end{array} \]
                        (FPCore (x y z t a)
                         :precision binary64
                         (if (or (<= z -140000000000.0) (not (<= z 1.35e+26)))
                           (* t (/ (- y z) (- a z)))
                           (fma (- t x) (/ (- y z) a) x)))
                        double code(double x, double y, double z, double t, double a) {
                        	double tmp;
                        	if ((z <= -140000000000.0) || !(z <= 1.35e+26)) {
                        		tmp = t * ((y - z) / (a - z));
                        	} else {
                        		tmp = fma((t - x), ((y - z) / a), x);
                        	}
                        	return tmp;
                        }
                        
                        function code(x, y, z, t, a)
                        	tmp = 0.0
                        	if ((z <= -140000000000.0) || !(z <= 1.35e+26))
                        		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
                        	else
                        		tmp = fma(Float64(t - x), Float64(Float64(y - z) / a), x);
                        	end
                        	return tmp
                        end
                        
                        code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -140000000000.0], N[Not[LessEqual[z, 1.35e+26]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]
                        
                        \begin{array}{l}
                        
                        \\
                        \begin{array}{l}
                        \mathbf{if}\;z \leq -140000000000 \lor \neg \left(z \leq 1.35 \cdot 10^{+26}\right):\\
                        \;\;\;\;t \cdot \frac{y - z}{a - z}\\
                        
                        \mathbf{else}:\\
                        \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\
                        
                        
                        \end{array}
                        \end{array}
                        
                        Derivation
                        1. Split input into 2 regimes
                        2. if z < -1.4e11 or 1.35e26 < z

                          1. Initial program 61.7%

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

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

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

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

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

                          if -1.4e11 < z < 1.35e26

                          1. Initial program 86.8%

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

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

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

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -140000000000 \lor \neg \left(z \leq 1.35 \cdot 10^{+26}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)\\ \end{array} \]
                        5. Add Preprocessing

                        Alternative 11: 51.8% accurate, 0.8× speedup?

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

                          1. Initial program 52.4%

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

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

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

                            if -4.10000000000000015e183 < z < -3.4e11

                            1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{y - a}{z} \cdot x \]
                              2. lower--.f6444.8

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

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

                            if -3.4e11 < z < 2.09999999999999995e111

                            1. Initial program 87.7%

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

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

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

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

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

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

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

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

                              \[\leadsto \mathsf{fma}\left(y, \frac{t}{\color{blue}{a}}, x\right) \]
                            7. Step-by-step derivation
                              1. lower-/.f6454.9

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

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

                          Alternative 12: 51.4% accurate, 0.8× speedup?

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

                            1. Initial program 52.4%

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

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

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

                              if -4.04999999999999997e183 < z < -3.4e11

                              1. Initial program 59.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
                                3. lower--.f6441.8

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

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

                              if -3.4e11 < z < 2.09999999999999995e111

                              1. Initial program 87.7%

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(y, \frac{t}{\color{blue}{a}}, x\right) \]
                              7. Step-by-step derivation
                                1. lower-/.f6454.9

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

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

                            Alternative 13: 63.9% accurate, 0.8× speedup?

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

                              1. Initial program 66.3%

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

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

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

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

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

                              if -6.5e-93 < z < 5.00000000000000003e-42

                              1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{-93} \lor \neg \left(z \leq 5 \cdot 10^{-42}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a}\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 14: 66.2% accurate, 0.8× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -24000000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-53}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (if (or (<= z -24000000000.0) (not (<= z 1.2e-53)))
                               (* t (/ (- y z) (- a z)))
                               (fma y (/ (- t x) a) x)))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if ((z <= -24000000000.0) || !(z <= 1.2e-53)) {
                            		tmp = t * ((y - z) / (a - z));
                            	} else {
                            		tmp = fma(y, ((t - x) / a), x);
                            	}
                            	return tmp;
                            }
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if ((z <= -24000000000.0) || !(z <= 1.2e-53))
                            		tmp = Float64(t * Float64(Float64(y - z) / Float64(a - z)));
                            	else
                            		tmp = fma(y, Float64(Float64(t - x) / a), x);
                            	end
                            	return tmp
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -24000000000.0], N[Not[LessEqual[z, 1.2e-53]], $MachinePrecision]], N[(t * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;z \leq -24000000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-53}\right):\\
                            \;\;\;\;t \cdot \frac{y - z}{a - z}\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 2 regimes
                            2. if z < -2.4e10 or 1.20000000000000004e-53 < z

                              1. Initial program 64.7%

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

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

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

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

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

                              if -2.4e10 < z < 1.20000000000000004e-53

                              1. Initial program 86.8%

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

                                \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                              4. 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--.f6472.5

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -24000000000 \lor \neg \left(z \leq 1.2 \cdot 10^{-53}\right):\\ \;\;\;\;t \cdot \frac{y - z}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t - x}{a}, x\right)\\ \end{array} \]
                            5. Add Preprocessing

                            Alternative 15: 38.4% accurate, 0.8× speedup?

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

                              1. Initial program 86.4%

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

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

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

                                if -7.5e8 < a < 7.4000000000000005e-245

                                1. Initial program 74.7%

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

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

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

                                  if 7.4000000000000005e-245 < a < 2.20000000000000008e-4

                                  1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \frac{y}{z} \cdot x \]
                                  8. Applied rewrites37.1%

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

                                Alternative 16: 60.7% accurate, 0.8× speedup?

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

                                  1. Initial program 88.0%

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

                                    \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                  4. 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--.f6469.5

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

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

                                  if -4.4e7 < a < 8.0000000000000002e-13

                                  1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

                                  if 8.0000000000000002e-13 < a

                                  1. Initial program 81.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 17: 53.3% accurate, 1.0× speedup?

                                    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+77} \lor \neg \left(z \leq 2.1 \cdot 10^{+111}\right):\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \end{array} \end{array} \]
                                    (FPCore (x y z t a)
                                     :precision binary64
                                     (if (or (<= z -1e+77) (not (<= z 2.1e+111))) t (fma y (/ t a) x)))
                                    double code(double x, double y, double z, double t, double a) {
                                    	double tmp;
                                    	if ((z <= -1e+77) || !(z <= 2.1e+111)) {
                                    		tmp = t;
                                    	} else {
                                    		tmp = fma(y, (t / a), x);
                                    	}
                                    	return tmp;
                                    }
                                    
                                    function code(x, y, z, t, a)
                                    	tmp = 0.0
                                    	if ((z <= -1e+77) || !(z <= 2.1e+111))
                                    		tmp = t;
                                    	else
                                    		tmp = fma(y, Float64(t / a), x);
                                    	end
                                    	return tmp
                                    end
                                    
                                    code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1e+77], N[Not[LessEqual[z, 2.1e+111]], $MachinePrecision]], t, N[(y * N[(t / a), $MachinePrecision] + x), $MachinePrecision]]
                                    
                                    \begin{array}{l}
                                    
                                    \\
                                    \begin{array}{l}
                                    \mathbf{if}\;z \leq -1 \cdot 10^{+77} \lor \neg \left(z \leq 2.1 \cdot 10^{+111}\right):\\
                                    \;\;\;\;t\\
                                    
                                    \mathbf{else}:\\
                                    \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\
                                    
                                    
                                    \end{array}
                                    \end{array}
                                    
                                    Derivation
                                    1. Split input into 2 regimes
                                    2. if z < -9.99999999999999983e76 or 2.09999999999999995e111 < z

                                      1. Initial program 53.0%

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

                                        \[\leadsto \color{blue}{t} \]
                                      4. Step-by-step derivation
                                        1. Applied rewrites53.9%

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

                                        if -9.99999999999999983e76 < z < 2.09999999999999995e111

                                        1. Initial program 86.3%

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

                                          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                        4. 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--.f6463.7

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(y, \frac{t}{\color{blue}{a}}, x\right) \]
                                      5. Recombined 2 regimes into one program.
                                      6. Final simplification52.7%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1 \cdot 10^{+77} \lor \neg \left(z \leq 2.1 \cdot 10^{+111}\right):\\ \;\;\;\;t\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{t}{a}, x\right)\\ \end{array} \]
                                      7. Add Preprocessing

                                      Alternative 18: 38.9% accurate, 2.2× speedup?

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

                                        1. Initial program 86.6%

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

                                          \[\leadsto \color{blue}{x} \]
                                        4. Step-by-step derivation
                                          1. Applied rewrites43.1%

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

                                          if -7.5e8 < a < 1.4499999999999999e-7

                                          1. Initial program 67.3%

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

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

                                              \[\leadsto \color{blue}{t} \]
                                          5. Recombined 2 regimes into one program.
                                          6. Add Preprocessing

                                          Alternative 19: 24.4% accurate, 29.0× speedup?

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

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

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

                                              \[\leadsto \color{blue}{t} \]
                                            2. Add Preprocessing

                                            Reproduce

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