Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.2% → 94.6%
Time: 7.5s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 80.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 94.6% 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 -4 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\ \mathbf{else}:\\ \;\;\;\;t - \frac{t - x}{z} \cdot \left(y - a\right)\\ \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 -4e-290) (not (<= t_1 0.0)))
     (fma (- t x) (/ (- y z) (- a z)) x)
     (- t (* (/ (- t x) z) (- y a))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + ((y - z) * ((t - x) / (a - z)));
	double tmp;
	if ((t_1 <= -4e-290) || !(t_1 <= 0.0)) {
		tmp = fma((t - x), ((y - z) / (a - z)), x);
	} else {
		tmp = t - (((t - x) / z) * (y - a));
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	tmp = 0.0
	if ((t_1 <= -4e-290) || !(t_1 <= 0.0))
		tmp = fma(Float64(t - x), Float64(Float64(y - z) / Float64(a - z)), x);
	else
		tmp = Float64(t - Float64(Float64(Float64(t - x) / z) * Float64(y - a)));
	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[Or[LessEqual[t$95$1, -4e-290], N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision]], N[(N[(t - x), $MachinePrecision] * N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[(t - N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $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 -4 \cdot 10^{-290} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)\\

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


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

    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 35.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+80}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 3.3 \cdot 10^{+56}\right):\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -4.5e+80)
   (+ x (- t x))
   (if (or (<= z -3.5e+33) (not (<= z 3.3e+56)))
     (* (/ (- x t) z) y)
     (* (/ (- t x) a) y))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.5e+80) {
		tmp = x + (t - x);
	} else if ((z <= -3.5e+33) || !(z <= 3.3e+56)) {
		tmp = ((x - t) / z) * y;
	} else {
		tmp = ((t - x) / a) * y;
	}
	return tmp;
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

real(8) function code(x, y, z, t, a)
use fmin_fmax_functions
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-4.5d+80)) then
        tmp = x + (t - x)
    else if ((z <= (-3.5d+33)) .or. (.not. (z <= 3.3d+56))) then
        tmp = ((x - t) / z) * y
    else
        tmp = ((t - x) / a) * y
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -4.5e+80) {
		tmp = x + (t - x);
	} else if ((z <= -3.5e+33) || !(z <= 3.3e+56)) {
		tmp = ((x - t) / z) * y;
	} else {
		tmp = ((t - x) / a) * y;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -4.5e+80:
		tmp = x + (t - x)
	elif (z <= -3.5e+33) or not (z <= 3.3e+56):
		tmp = ((x - t) / z) * y
	else:
		tmp = ((t - x) / a) * y
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -4.5e+80)
		tmp = Float64(x + Float64(t - x));
	elseif ((z <= -3.5e+33) || !(z <= 3.3e+56))
		tmp = Float64(Float64(Float64(x - t) / z) * y);
	else
		tmp = Float64(Float64(Float64(t - x) / a) * y);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -4.5e+80)
		tmp = x + (t - x);
	elseif ((z <= -3.5e+33) || ~((z <= 3.3e+56)))
		tmp = ((x - t) / z) * y;
	else
		tmp = ((t - x) / a) * y;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -4.5e+80], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, -3.5e+33], N[Not[LessEqual[z, 3.3e+56]], $MachinePrecision]], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.5 \cdot 10^{+80}:\\
\;\;\;\;x + \left(t - x\right)\\

\mathbf{elif}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 3.3 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{x - t}{z} \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.50000000000000007e80

    1. Initial program 56.6%

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

      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
    4. Step-by-step derivation
      1. lower--.f6441.5

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

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

    if -4.50000000000000007e80 < z < -3.5000000000000001e33 or 3.30000000000000002e56 < z

    1. Initial program 67.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
    4. Step-by-step derivation
      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -3.5000000000000001e33 < z < 3.30000000000000002e56

      1. Initial program 92.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{t - x}{a} \cdot \color{blue}{y} \]
      10. Recombined 3 regimes into one program.
      11. Final simplification43.7%

        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+80}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 3.3 \cdot 10^{+56}\right):\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \end{array} \]
      12. Add Preprocessing

      Alternative 3: 33.6% accurate, 0.8× speedup?

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

        1. Initial program 56.6%

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

          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
        4. Step-by-step derivation
          1. lower--.f6441.5

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

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

        if -4.50000000000000007e80 < z < -3.5000000000000001e33 or 2.50000000000000008e39 < z

        1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.5000000000000001e33 < z < 2.50000000000000008e39

          1. Initial program 91.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.5 \cdot 10^{+80}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;z \leq -3.5 \cdot 10^{+33} \lor \neg \left(z \leq 2.5 \cdot 10^{+39}\right):\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\ \end{array} \]
            6. Add Preprocessing

            Alternative 4: 46.3% accurate, 0.8× speedup?

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

              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 x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
              4. Step-by-step derivation
                1. lower-/.f64N/A

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

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

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

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

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

                \[\leadsto x + \frac{t \cdot y}{a} \]
              7. Step-by-step derivation
                1. Applied rewrites60.4%

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

                if -1.7999999999999999e-14 < a < 2.59999999999999981e-128

                1. Initial program 68.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                4. Step-by-step derivation
                  1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.59999999999999981e-128 < a < 2.45000000000000015e91

                  1. Initial program 86.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{t - x}{a} \cdot \color{blue}{y} \]
                  10. Recombined 3 regimes into one program.
                  11. Final simplification53.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.8 \cdot 10^{-14}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;a \leq 2.45 \cdot 10^{+91}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 5: 30.9% accurate, 0.8× speedup?

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

                    1. Initial program 79.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                    4. Step-by-step derivation
                      1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -3.0999999999999998e159 < y < -3.39999999999999977e-157

                      1. Initial program 86.2%

                        \[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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                      9. Step-by-step derivation
                        1. Applied rewrites33.1%

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

                        if -3.39999999999999977e-157 < y < 2.50000000000000021e-87

                        1. Initial program 72.6%

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

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

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

                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                      10. Recombined 3 regimes into one program.
                      11. Final simplification39.8%

                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+159}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-157}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-87}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \end{array} \]
                      12. Add Preprocessing

                      Alternative 6: 29.6% accurate, 0.8× speedup?

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

                        1. Initial program 79.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                        4. Step-by-step derivation
                          1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.0000000000000002e159 < y < -3.39999999999999977e-157

                          1. Initial program 86.2%

                            \[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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                          9. Step-by-step derivation
                            1. Applied rewrites33.1%

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

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

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

                              if -3.39999999999999977e-157 < y < 2.50000000000000021e-87

                              1. Initial program 72.6%

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

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

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

                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                            4. Recombined 3 regimes into one program.
                            5. Final simplification38.2%

                              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3 \cdot 10^{+159}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;y \leq -3.4 \cdot 10^{-157}:\\ \;\;\;\;t \cdot \frac{y}{a}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{-87}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \end{array} \]
                            6. Add Preprocessing

                            Alternative 7: 76.5% accurate, 0.8× speedup?

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

                              1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -3500 < z < 4.00000000000000023e63

                                1. Initial program 91.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 8: 75.4% accurate, 0.8× speedup?

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

                                1. Initial program 64.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  if -300 < z < 4.00000000000000023e63

                                  1. Initial program 91.7%

                                    \[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 \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a} + x} \]
                                    2. *-commutativeN/A

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

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

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

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

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

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

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

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

                                Alternative 9: 74.6% accurate, 0.8× speedup?

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

                                  1. Initial program 65.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                  4. Step-by-step derivation
                                    1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -3300 < z < 1.4999999999999999e41

                                    1. Initial program 91.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    Alternative 10: 70.2% accurate, 0.9× speedup?

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

                                      1. Initial program 65.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                      4. Step-by-step derivation
                                        1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -3300 < z < 1.4999999999999999e41

                                        1. Initial program 91.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 11: 69.3% accurate, 0.9× speedup?

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

                                          1. Initial program 65.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                          4. Step-by-step derivation
                                            1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            if -300 < z < 1.4999999999999999e41

                                            1. Initial program 91.6%

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

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

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

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

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

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

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

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

                                          Alternative 12: 62.8% accurate, 0.9× speedup?

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

                                            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 x + \color{blue}{\frac{y \cdot \left(t - x\right)}{a}} \]
                                            4. Step-by-step derivation
                                              1. lower-/.f64N/A

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

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

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

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

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

                                              \[\leadsto x + \frac{t \cdot y}{a} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites58.3%

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

                                              if -4.60000000000000014e-10 < a < 4.2999999999999998e42

                                              1. Initial program 72.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}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                              4. Step-by-step derivation
                                                1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              Alternative 13: 28.9% accurate, 1.0× speedup?

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

                                                1. Initial program 67.0%

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

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

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

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

                                                if -5500 < z < 1e14

                                                1. Initial program 91.2%

                                                  \[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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{t \cdot y}{a} \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Final simplification30.3%

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

                                                  Alternative 14: 27.5% accurate, 1.0× speedup?

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

                                                    1. Initial program 62.0%

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

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

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

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

                                                    if -6600 < z < 8.8e8

                                                    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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if 8.8e8 < z

                                                        1. Initial program 74.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            \[\leadsto \frac{x \cdot y}{z} \]
                                                          3. Step-by-step derivation
                                                            1. Applied rewrites28.2%

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

                                                          Alternative 15: 25.2% accurate, 1.0× speedup?

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

                                                            1. Initial program 96.2%

                                                              \[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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                                            9. Step-by-step derivation
                                                              1. Applied rewrites46.1%

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

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

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

                                                                if -2.1e41 < t < 2.29999999999999994e54

                                                                1. Initial program 66.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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    \[\leadsto \frac{x \cdot y}{z} \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites28.6%

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

                                                                    if 2.29999999999999994e54 < t

                                                                    1. Initial program 90.1%

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

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

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

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

                                                                  Alternative 16: 19.1% accurate, 4.1× speedup?

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

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

                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. lower--.f6418.5

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

                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 17: 2.8% accurate, 4.8× speedup?

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

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

                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                  4. Step-by-step derivation
                                                                    1. lower--.f6418.5

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

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

                                                                    \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                                  7. Step-by-step derivation
                                                                    1. Applied rewrites2.9%

                                                                      \[\leadsto x + \left(-x\right) \]
                                                                    2. Add Preprocessing

                                                                    Reproduce

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