Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3

Percentage Accurate: 68.3% → 88.8%
Time: 4.6s
Alternatives: 16
Speedup: 0.8×

Specification

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

Alternative 1: 88.8% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000002e-262 or 2.0000000000000001e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000002e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.00000000000000001e-262

    1. Initial program 15.9%

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

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

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

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

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

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

    if 1.00000000000000001e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.0000000000000001e289

    1. Initial program 96.5%

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

Alternative 2: 88.8% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+289}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -2.00000000000000002e-262 or 2.0000000000000001e289 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z)))

    1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000002e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.00000000000000001e-262

    1. Initial program 15.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.00000000000000001e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.0000000000000001e289

    1. Initial program 96.5%

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

Alternative 3: 86.6% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.00000000000000002e-262 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 1.00000000000000001e-262

    1. Initial program 15.9%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 70.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;z \leq -1.12 \cdot 10^{-170}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+118}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.7e172

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
      6. lift--.f6467.1

        \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
    10. Applied rewrites67.1%

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

    if -5.7e172 < z < -1.12000000000000009e-170 or 9.00000000000000037e-173 < z < 1.65e118

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.12000000000000009e-170 < z < 9.00000000000000037e-173

      1. Initial program 91.6%

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

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

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

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

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

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

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

      if 1.65e118 < z

      1. Initial program 32.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 39.8% accurate, 0.6× speedup?

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

      1. Initial program 34.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.8000000000000001e115 < z < -1.5500000000000001e-12 or 4.3000000000000001e-256 < z < 4.4e116

      1. Initial program 79.6%

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

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

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

        if -1.5500000000000001e-12 < z < 4.3000000000000001e-256

        1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

        Alternative 6: 63.8% accurate, 0.7× speedup?

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

          1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
            6. lift--.f6462.0

              \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
          10. Applied rewrites62.0%

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

          if -6.1000000000000003e128 < z < -1.3000000000000001e-170

          1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.3000000000000001e-170 < z < 2.09999999999999995e-45

              1. Initial program 90.3%

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

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

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

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

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

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

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

              if 2.09999999999999995e-45 < z

              1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 7: 65.2% accurate, 0.7× speedup?

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

              1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                6. lift--.f6462.0

                  \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
              10. Applied rewrites62.0%

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

              if -6.1000000000000003e128 < z < -1.6e-170

              1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -1.6e-170 < z < 4.1999999999999999e-45

                  1. Initial program 90.3%

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

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

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

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

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

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

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

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

                  if 4.1999999999999999e-45 < z

                  1. Initial program 50.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 8: 63.2% accurate, 0.7× speedup?

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

                  1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                    6. lift--.f6462.9

                      \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                  10. Applied rewrites62.9%

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

                  if -6.1000000000000003e128 < z < -1.6e-170

                  1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -1.6e-170 < z < 4.7000000000000003e116

                      1. Initial program 85.5%

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

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

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

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

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

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

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

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

                    Alternative 9: 83.6% accurate, 0.7× speedup?

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

                      1. Initial program 25.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                        6. lift--.f6470.5

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

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

                      if -5.7e172 < z < 1.2999999999999999e212

                      1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 10: 36.8% accurate, 0.8× speedup?

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

                      1. Initial program 31.5%

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

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

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

                        if -3.50000000000000026e160 < z < -1.5500000000000001e-12 or 4.3000000000000001e-256 < z < 4.4e116

                        1. Initial program 77.5%

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

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

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

                          if -1.5500000000000001e-12 < z < 4.3000000000000001e-256

                          1. Initial program 90.2%

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

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

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

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

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

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

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

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

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

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

                          Alternative 11: 73.7% accurate, 0.8× speedup?

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

                            1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -1.72e-6 < a < 7.5999999999999995e-105

                              1. Initial program 66.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 12: 68.7% accurate, 0.8× speedup?

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

                              1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                                6. lift--.f6462.0

                                  \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                              10. Applied rewrites62.0%

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

                              if -6.1000000000000003e128 < z < 4.3999999999999998e79

                              1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

                              if 4.3999999999999998e79 < z

                              1. Initial program 37.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 13: 38.1% accurate, 0.8× speedup?

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

                              1. Initial program 31.5%

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

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

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

                                if -3.50000000000000026e160 < z < -1.05e-258 or 4.3000000000000001e-256 < z < 4.4e116

                                1. Initial program 81.2%

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

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

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

                                  if -1.05e-258 < z < 4.3000000000000001e-256

                                  1. Initial program 91.8%

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

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

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

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

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

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

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

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

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

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

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

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

                                Alternative 14: 63.1% accurate, 0.9× speedup?

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

                                  1. Initial program 33.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                                    6. lift--.f6462.9

                                      \[\leadsto \mathsf{fma}\left(\frac{t - x}{z}, a, t\right) \]
                                  10. Applied rewrites62.9%

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

                                  if -5.9999999999999997e128 < z < 4.7000000000000003e116

                                  1. Initial program 83.6%

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

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

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

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

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

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

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

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

                                Alternative 15: 38.2% accurate, 2.2× speedup?

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

                                  1. Initial program 31.5%

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

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

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

                                    if -3.50000000000000026e160 < z < 4.4e116

                                    1. Initial program 82.5%

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

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

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

                                    Alternative 16: 25.2% accurate, 29.0× speedup?

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

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

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

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

                                      Developer Target 1: 84.6% accurate, 0.6× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\ \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\ \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a)
                                       :precision binary64
                                       (let* ((t_1 (- t (* (/ y z) (- t x)))))
                                         (if (< z -1.2536131056095036e+188)
                                           t_1
                                           (if (< z 4.446702369113811e+64)
                                             (+ x (/ (- y z) (/ (- a z) (- t x))))
                                             t_1))))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double t_1 = t - ((y / z) * (t - x));
                                      	double tmp;
                                      	if (z < -1.2536131056095036e+188) {
                                      		tmp = t_1;
                                      	} else if (z < 4.446702369113811e+64) {
                                      		tmp = x + ((y - z) / ((a - z) / (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 = t - ((y / z) * (t - x))
                                          if (z < (-1.2536131056095036d+188)) then
                                              tmp = t_1
                                          else if (z < 4.446702369113811d+64) then
                                              tmp = x + ((y - z) / ((a - z) / (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 = t - ((y / z) * (t - x));
                                      	double tmp;
                                      	if (z < -1.2536131056095036e+188) {
                                      		tmp = t_1;
                                      	} else if (z < 4.446702369113811e+64) {
                                      		tmp = x + ((y - z) / ((a - z) / (t - x)));
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      def code(x, y, z, t, a):
                                      	t_1 = t - ((y / z) * (t - x))
                                      	tmp = 0
                                      	if z < -1.2536131056095036e+188:
                                      		tmp = t_1
                                      	elif z < 4.446702369113811e+64:
                                      		tmp = x + ((y - z) / ((a - z) / (t - x)))
                                      	else:
                                      		tmp = t_1
                                      	return tmp
                                      
                                      function code(x, y, z, t, a)
                                      	t_1 = Float64(t - Float64(Float64(y / z) * Float64(t - x)))
                                      	tmp = 0.0
                                      	if (z < -1.2536131056095036e+188)
                                      		tmp = t_1;
                                      	elseif (z < 4.446702369113811e+64)
                                      		tmp = Float64(x + Float64(Float64(y - z) / Float64(Float64(a - z) / Float64(t - x))));
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      function tmp_2 = code(x, y, z, t, a)
                                      	t_1 = t - ((y / z) * (t - x));
                                      	tmp = 0.0;
                                      	if (z < -1.2536131056095036e+188)
                                      		tmp = t_1;
                                      	elseif (z < 4.446702369113811e+64)
                                      		tmp = x + ((y - z) / ((a - z) / (t - x)));
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	tmp_2 = tmp;
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(N[(y / z), $MachinePrecision] * N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -1.2536131056095036e+188], t$95$1, If[Less[z, 4.446702369113811e+64], N[(x + N[(N[(y - z), $MachinePrecision] / N[(N[(a - z), $MachinePrecision] / N[(t - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := t - \frac{y}{z} \cdot \left(t - x\right)\\
                                      \mathbf{if}\;z < -1.2536131056095036 \cdot 10^{+188}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;z < 4.446702369113811 \cdot 10^{+64}:\\
                                      \;\;\;\;x + \frac{y - z}{\frac{a - z}{t - x}}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      

                                      Reproduce

                                      ?
                                      herbie shell --seed 2025093 
                                      (FPCore (x y z t a)
                                        :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                                        :precision binary64
                                      
                                        :alt
                                        (! :herbie-platform default (if (< z -125361310560950360000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- t (* (/ y z) (- t x))) (if (< z 44467023691138110000000000000000000000000000000000000000000000000) (+ x (/ (- y z) (/ (- a z) (- t x)))) (- t (* (/ y z) (- t x))))))
                                      
                                        (+ x (/ (* (- y z) (- t x)) (- a z))))