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

Percentage Accurate: 68.7% → 90.9%
Time: 4.3s
Alternatives: 14
Speedup: 0.9×

Specification

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

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

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

\\
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}
\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 14 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.7% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 90.9% accurate, 0.2× speedup?

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

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

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

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


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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.9% accurate, 0.3× speedup?

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

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

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

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

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

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


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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 90.9% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 74.7% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-88}:\\
\;\;\;\;y \cdot \frac{z - t}{a - t}\\

\mathbf{elif}\;a \leq 4.5 \cdot 10^{-6}:\\
\;\;\;\;z \cdot \frac{x - y}{t} + y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.15e10 or 4.50000000000000011e-6 < a

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

    if -1.15e10 < a < -2.50000000000000004e-88

    1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

      if -2.50000000000000004e-88 < a < 4.50000000000000011e-6

      1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto z \cdot \frac{x - y}{t} + y \]
        4. lower--.f6447.9

          \[\leadsto z \cdot \frac{x - y}{t} + y \]
      7. Applied rewrites47.9%

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

    Alternative 5: 70.8% accurate, 0.7× speedup?

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

      1. Initial program 68.7%

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

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

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

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

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

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

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

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

      if -1.2e10 < a < -2.50000000000000004e-88

      1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

        if -2.50000000000000004e-88 < a < 3.39999999999999974e-7

        1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto z \cdot \frac{x - y}{t} + y \]
          4. lower--.f6447.9

            \[\leadsto z \cdot \frac{x - y}{t} + y \]
        7. Applied rewrites47.9%

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

        if 3.39999999999999974e-7 < a

        1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 6: 69.2% accurate, 0.7× speedup?

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

        1. Initial program 68.7%

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

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

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

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

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

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

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

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

        if -1.2e10 < a < -2.9999999999999998e-129

        1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

          if -2.9999999999999998e-129 < a < 1.4000000000000001e-7

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.4000000000000001e-7 < a

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 69.0% accurate, 0.9× speedup?

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

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

          if -1.39999999999999997e-22 < a < 1.4000000000000001e-7

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.4000000000000001e-7 < a

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 54.7% accurate, 0.7× speedup?

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

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

          if -3.7e-57 < a < -1.05e-74

          1. Initial program 68.7%

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

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

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

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

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

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

              \[\leadsto \frac{y}{x} \cdot x \]
          7. Applied rewrites22.3%

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

          if -1.05e-74 < a < 1.18e-291

          1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto z \cdot \frac{x - y}{t} \]
            4. lower--.f6426.0

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

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

          if 1.18e-291 < a < 4.3999999999999997e-19

          1. Initial program 68.7%

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

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

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

            if 4.3999999999999997e-19 < a

            1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 54.6% accurate, 0.7× speedup?

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

            1. Initial program 68.7%

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

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

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

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

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

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

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

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

            if -3.7e-57 < a < -1.05e-74

            1. Initial program 68.7%

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

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

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

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

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

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

                \[\leadsto \frac{y}{x} \cdot x \]
            7. Applied rewrites22.3%

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

            if -1.05e-74 < a < 1.18e-291

            1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto z \cdot \frac{x - y}{t} \]
              4. lower--.f6426.0

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

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

            if 1.18e-291 < a < 4.3999999999999997e-19

            1. Initial program 68.7%

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

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

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

            Alternative 10: 45.8% accurate, 0.6× speedup?

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

              1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \left(-x\right) \cdot \left(\left(\frac{z}{a - t} - 1\right) - \frac{t}{\color{blue}{a - t}}\right) \]
                11. lift--.f6444.3

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

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

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

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

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

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

              if -7.6e7 < a < -2.55e-56

              1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.55e-56 < a < -1.05e-74

                  1. Initial program 68.7%

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

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

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

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

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

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

                      \[\leadsto \frac{y}{x} \cdot x \]
                  7. Applied rewrites22.3%

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

                  if -1.05e-74 < a < 1.18e-291

                  1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto z \cdot \frac{x - y}{t} \]
                    4. lower--.f6426.0

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

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

                  if 1.18e-291 < a < 1.69999999999999991e29

                  1. Initial program 68.7%

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

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

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

                  Alternative 11: 42.2% accurate, 0.7× speedup?

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

                    1. Initial program 68.7%

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

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

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

                      if -8.80000000000000002e43 < a < -2.69999999999999995e-56

                      1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

                        if -2.69999999999999995e-56 < a < -1.05e-74

                        1. Initial program 68.7%

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

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

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

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

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

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

                            \[\leadsto \frac{y}{x} \cdot x \]
                        7. Applied rewrites22.3%

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

                        if -1.05e-74 < a < 1.18e-291

                        1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto z \cdot \frac{x - y}{t} \]
                          4. lower--.f6426.0

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

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

                        if 1.18e-291 < a < 1.8499999999999999e67

                        1. Initial program 68.7%

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

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

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

                        Alternative 12: 41.4% accurate, 0.7× speedup?

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

                          1. Initial program 68.7%

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

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

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

                            if -1.00000000000000001e41 < a < -3.7999999999999997e-57

                            1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -3.7999999999999997e-57 < a < -1.05e-74

                              1. Initial program 68.7%

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

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

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

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

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

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

                                  \[\leadsto \frac{y}{x} \cdot x \]
                              7. Applied rewrites22.3%

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

                              if -1.05e-74 < a < 1.18e-291

                              1. Initial program 68.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto z \cdot \frac{x - y}{t} \]
                                4. lower--.f6426.0

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

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

                              if 1.18e-291 < a < 1.8499999999999999e67

                              1. Initial program 68.7%

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

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

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

                              Alternative 13: 39.0% accurate, 2.1× speedup?

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

                                1. Initial program 68.7%

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

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

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

                                  if -7.4e6 < a < 1.8499999999999999e67

                                  1. Initial program 68.7%

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

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

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

                                  Alternative 14: 25.8% accurate, 17.9× speedup?

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

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

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

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

                                    Reproduce

                                    ?
                                    herbie shell --seed 2025123 
                                    (FPCore (x y z t a)
                                      :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                      :precision binary64
                                      (+ x (/ (* (- y x) (- z t)) (- a t))))