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

Percentage Accurate: 68.2% → 87.5%
Time: 5.5s
Alternatives: 15
Speedup: 0.8×

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}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 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.2% 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: 87.5% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{-62} \lor \neg \left(y \leq 5.8 \cdot 10^{-171}\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\left(-x\right) \cdot \left(\mathsf{fma}\left(\frac{\frac{\left(z - t\right) \cdot y}{x}}{a - t}, -1, \frac{z}{a - t}\right) - \left(\frac{t}{a - t} - -1\right)\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= y -1.55e-62) (not (<= y 5.8e-171)))
   (fma (- y x) (/ (- z t) (- a t)) x)
   (*
    (- x)
    (-
     (fma (/ (/ (* (- z t) y) x) (- a t)) -1.0 (/ z (- a t)))
     (- (/ t (- a t)) -1.0)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((y <= -1.55e-62) || !(y <= 5.8e-171)) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = -x * (fma(((((z - t) * y) / x) / (a - t)), -1.0, (z / (a - t))) - ((t / (a - t)) - -1.0));
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((y <= -1.55e-62) || !(y <= 5.8e-171))
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(Float64(-x) * Float64(fma(Float64(Float64(Float64(Float64(z - t) * y) / x) / Float64(a - t)), -1.0, Float64(z / Float64(a - t))) - Float64(Float64(t / Float64(a - t)) - -1.0)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e-62], N[Not[LessEqual[y, 5.8e-171]], $MachinePrecision]], N[(N[(y - x), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], N[((-x) * N[(N[(N[(N[(N[(N[(z - t), $MachinePrecision] * y), $MachinePrecision] / x), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision] * -1.0 + N[(z / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(N[(t / N[(a - t), $MachinePrecision]), $MachinePrecision] - -1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.55 \cdot 10^{-62} \lor \neg \left(y \leq 5.8 \cdot 10^{-171}\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.55e-62 or 5.7999999999999997e-171 < y

    1. Initial program 64.1%

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

        \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \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--.f6490.2

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

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

    if -1.55e-62 < y < 5.7999999999999997e-171

    1. Initial program 63.2%

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

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

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

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

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

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

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

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

Alternative 2: 90.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.3% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 67.3%

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

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

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

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

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

    1. Initial program 4.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 42.7% accurate, 0.8× speedup?

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

      1. Initial program 63.3%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{a} \]
      7. Step-by-step derivation
        1. Applied rewrites39.0%

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

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

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

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

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

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

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

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

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

        if -6.2000000000000005e39 < z < 3.79999999999999972e-117

        1. Initial program 63.0%

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

          \[\leadsto x + \color{blue}{\left(y - x\right)} \]
        4. Step-by-step derivation
          1. lift--.f6421.7

            \[\leadsto x + \left(y - \color{blue}{x}\right) \]
        5. Applied rewrites21.7%

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

          \[\leadsto x + y \]
        7. Step-by-step derivation
          1. Applied rewrites44.4%

            \[\leadsto x + y \]

          if 3.79999999999999972e-117 < z < 1.25000000000000009e69

          1. Initial program 67.8%

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

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

              \[\leadsto \color{blue}{x} \]
          5. Recombined 3 regimes into one program.
          6. Final simplification46.1%

            \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.2 \cdot 10^{+39}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-117}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;z \leq 1.25 \cdot 10^{+69}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a}\\ \end{array} \]
          7. Add Preprocessing

          Alternative 5: 41.6% accurate, 0.8× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-267}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \mathbf{elif}\;a \leq 54:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (if (<= a -2.65e+169)
             x
             (if (<= a -4e-76)
               (+ x y)
               (if (<= a 7.8e-267) (* (/ (- x y) t) z) (if (<= a 54.0) y x)))))
          double code(double x, double y, double z, double t, double a) {
          	double tmp;
          	if (a <= -2.65e+169) {
          		tmp = x;
          	} else if (a <= -4e-76) {
          		tmp = x + y;
          	} else if (a <= 7.8e-267) {
          		tmp = ((x - y) / t) * z;
          	} else if (a <= 54.0) {
          		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 <= (-2.65d+169)) then
                  tmp = x
              else if (a <= (-4d-76)) then
                  tmp = x + y
              else if (a <= 7.8d-267) then
                  tmp = ((x - y) / t) * z
              else if (a <= 54.0d0) 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 <= -2.65e+169) {
          		tmp = x;
          	} else if (a <= -4e-76) {
          		tmp = x + y;
          	} else if (a <= 7.8e-267) {
          		tmp = ((x - y) / t) * z;
          	} else if (a <= 54.0) {
          		tmp = y;
          	} else {
          		tmp = x;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a):
          	tmp = 0
          	if a <= -2.65e+169:
          		tmp = x
          	elif a <= -4e-76:
          		tmp = x + y
          	elif a <= 7.8e-267:
          		tmp = ((x - y) / t) * z
          	elif a <= 54.0:
          		tmp = y
          	else:
          		tmp = x
          	return tmp
          
          function code(x, y, z, t, a)
          	tmp = 0.0
          	if (a <= -2.65e+169)
          		tmp = x;
          	elseif (a <= -4e-76)
          		tmp = Float64(x + y);
          	elseif (a <= 7.8e-267)
          		tmp = Float64(Float64(Float64(x - y) / t) * z);
          	elseif (a <= 54.0)
          		tmp = y;
          	else
          		tmp = x;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a)
          	tmp = 0.0;
          	if (a <= -2.65e+169)
          		tmp = x;
          	elseif (a <= -4e-76)
          		tmp = x + y;
          	elseif (a <= 7.8e-267)
          		tmp = ((x - y) / t) * z;
          	elseif (a <= 54.0)
          		tmp = y;
          	else
          		tmp = x;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.65e+169], x, If[LessEqual[a, -4e-76], N[(x + y), $MachinePrecision], If[LessEqual[a, 7.8e-267], N[(N[(N[(x - y), $MachinePrecision] / t), $MachinePrecision] * z), $MachinePrecision], If[LessEqual[a, 54.0], y, x]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\
          \;\;\;\;x\\
          
          \mathbf{elif}\;a \leq -4 \cdot 10^{-76}:\\
          \;\;\;\;x + y\\
          
          \mathbf{elif}\;a \leq 7.8 \cdot 10^{-267}:\\
          \;\;\;\;\frac{x - y}{t} \cdot z\\
          
          \mathbf{elif}\;a \leq 54:\\
          \;\;\;\;y\\
          
          \mathbf{else}:\\
          \;\;\;\;x\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if a < -2.64999999999999995e169 or 54 < a

            1. Initial program 63.5%

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

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

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

              if -2.64999999999999995e169 < a < -3.99999999999999971e-76

              1. Initial program 63.5%

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

                \[\leadsto x + \color{blue}{\left(y - x\right)} \]
              4. Step-by-step derivation
                1. lift--.f6426.7

                  \[\leadsto x + \left(y - \color{blue}{x}\right) \]
              5. Applied rewrites26.7%

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

                \[\leadsto x + y \]
              7. Step-by-step derivation
                1. Applied rewrites42.7%

                  \[\leadsto x + y \]

                if -3.99999999999999971e-76 < a < 7.79999999999999954e-267

                1. Initial program 53.9%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{\left(y - x\right) \cdot z}{a} \]
                7. Step-by-step derivation
                  1. Applied rewrites26.2%

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{x - y}{t} \cdot z \]
                    5. lower--.f6448.9

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

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

                  if 7.79999999999999954e-267 < a < 54

                  1. Initial program 73.1%

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

                    \[\leadsto \color{blue}{y} \]
                  4. Step-by-step derivation
                    1. Applied rewrites40.7%

                      \[\leadsto \color{blue}{y} \]
                  5. Recombined 4 regimes into one program.
                  6. Final simplification46.1%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -4 \cdot 10^{-76}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.8 \cdot 10^{-267}:\\ \;\;\;\;\frac{x - y}{t} \cdot z\\ \mathbf{elif}\;a \leq 54:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                  7. Add Preprocessing

                  Alternative 6: 39.2% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-96}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-268}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 54:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= a -2.65e+169)
                     x
                     (if (<= a -6.5e-96)
                       (+ x y)
                       (if (<= a 7.4e-268) (* x (/ (- z a) t)) (if (<= a 54.0) y x)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (a <= -2.65e+169) {
                  		tmp = x;
                  	} else if (a <= -6.5e-96) {
                  		tmp = x + y;
                  	} else if (a <= 7.4e-268) {
                  		tmp = x * ((z - a) / t);
                  	} else if (a <= 54.0) {
                  		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 <= (-2.65d+169)) then
                          tmp = x
                      else if (a <= (-6.5d-96)) then
                          tmp = x + y
                      else if (a <= 7.4d-268) then
                          tmp = x * ((z - a) / t)
                      else if (a <= 54.0d0) 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 <= -2.65e+169) {
                  		tmp = x;
                  	} else if (a <= -6.5e-96) {
                  		tmp = x + y;
                  	} else if (a <= 7.4e-268) {
                  		tmp = x * ((z - a) / t);
                  	} else if (a <= 54.0) {
                  		tmp = y;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if a <= -2.65e+169:
                  		tmp = x
                  	elif a <= -6.5e-96:
                  		tmp = x + y
                  	elif a <= 7.4e-268:
                  		tmp = x * ((z - a) / t)
                  	elif a <= 54.0:
                  		tmp = y
                  	else:
                  		tmp = x
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (a <= -2.65e+169)
                  		tmp = x;
                  	elseif (a <= -6.5e-96)
                  		tmp = Float64(x + y);
                  	elseif (a <= 7.4e-268)
                  		tmp = Float64(x * Float64(Float64(z - a) / t));
                  	elseif (a <= 54.0)
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a)
                  	tmp = 0.0;
                  	if (a <= -2.65e+169)
                  		tmp = x;
                  	elseif (a <= -6.5e-96)
                  		tmp = x + y;
                  	elseif (a <= 7.4e-268)
                  		tmp = x * ((z - a) / t);
                  	elseif (a <= 54.0)
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.65e+169], x, If[LessEqual[a, -6.5e-96], N[(x + y), $MachinePrecision], If[LessEqual[a, 7.4e-268], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 54.0], y, x]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\
                  \;\;\;\;x\\
                  
                  \mathbf{elif}\;a \leq -6.5 \cdot 10^{-96}:\\
                  \;\;\;\;x + y\\
                  
                  \mathbf{elif}\;a \leq 7.4 \cdot 10^{-268}:\\
                  \;\;\;\;x \cdot \frac{z - a}{t}\\
                  
                  \mathbf{elif}\;a \leq 54:\\
                  \;\;\;\;y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if a < -2.64999999999999995e169 or 54 < a

                    1. Initial program 63.5%

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

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

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

                      if -2.64999999999999995e169 < a < -6.50000000000000001e-96

                      1. Initial program 62.7%

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

                        \[\leadsto x + \color{blue}{\left(y - x\right)} \]
                      4. Step-by-step derivation
                        1. lift--.f6426.7

                          \[\leadsto x + \left(y - \color{blue}{x}\right) \]
                      5. Applied rewrites26.7%

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

                        \[\leadsto x + y \]
                      7. Step-by-step derivation
                        1. Applied rewrites41.6%

                          \[\leadsto x + y \]

                        if -6.50000000000000001e-96 < a < 7.40000000000000036e-268

                        1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x \cdot \frac{z - a}{t} \]
                          4. lift--.f6444.7

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

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

                        if 7.40000000000000036e-268 < a < 54

                        1. Initial program 73.1%

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

                          \[\leadsto \color{blue}{y} \]
                        4. Step-by-step derivation
                          1. Applied rewrites40.7%

                            \[\leadsto \color{blue}{y} \]
                        5. Recombined 4 regimes into one program.
                        6. Final simplification45.0%

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.65 \cdot 10^{+169}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-96}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-268}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 54:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 7: 74.9% accurate, 0.8× speedup?

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

                          1. Initial program 33.4%

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

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

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

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

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

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

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

                          if -1.3199999999999999e23 < t < 2.45000000000000013e76

                          1. Initial program 87.9%

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

                              \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \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--.f6495.8

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

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

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

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

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

                          Alternative 8: 73.3% accurate, 0.8× speedup?

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

                            1. Initial program 64.5%

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

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

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

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

                            if -1.4e20 < a < 1.7500000000000001e-98

                            1. Initial program 62.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{x \cdot \left(z - a\right)}{t} \]
                              3. lift--.f6426.8

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(-z, \frac{y - x}{t}, y\right) \]
                              10. lift--.f6467.0

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

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

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

                          Alternative 9: 68.0% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -2 \lor \neg \left(t \leq 4.9 \cdot 10^{+73}\right):\\ \;\;\;\;y \cdot \frac{z - t}{a - 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 (or (<= t -2.0) (not (<= t 4.9e+73)))
                             (* y (/ (- z t) (- a t)))
                             (fma (- y x) (/ z a) x)))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((t <= -2.0) || !(t <= 4.9e+73)) {
                          		tmp = y * ((z - t) / (a - t));
                          	} else {
                          		tmp = fma((y - x), (z / a), x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((t <= -2.0) || !(t <= 4.9e+73))
                          		tmp = Float64(y * Float64(Float64(z - t) / Float64(a - t)));
                          	else
                          		tmp = fma(Float64(y - x), Float64(z / a), x);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -2.0], N[Not[LessEqual[t, 4.9e+73]], $MachinePrecision]], N[(y * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;t \leq -2 \lor \neg \left(t \leq 4.9 \cdot 10^{+73}\right):\\
                          \;\;\;\;y \cdot \frac{z - t}{a - t}\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -2 or 4.8999999999999999e73 < t

                            1. Initial program 35.4%

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

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

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

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

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

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

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

                            if -2 < t < 4.8999999999999999e73

                            1. Initial program 88.1%

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

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

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

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

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

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

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

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

                          Alternative 10: 69.9% accurate, 0.8× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+46} \lor \neg \left(t \leq 4 \cdot 10^{+28}\right):\\ \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\ \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 (or (<= t -5.5e+46) (not (<= t 4e+28)))
                             (fma (- z) (/ (- y x) t) y)
                             (fma (- y x) (/ z a) x)))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((t <= -5.5e+46) || !(t <= 4e+28)) {
                          		tmp = fma(-z, ((y - x) / t), y);
                          	} else {
                          		tmp = fma((y - x), (z / a), x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((t <= -5.5e+46) || !(t <= 4e+28))
                          		tmp = fma(Float64(-z), Float64(Float64(y - x) / t), y);
                          	else
                          		tmp = fma(Float64(y - x), Float64(z / a), x);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -5.5e+46], N[Not[LessEqual[t, 4e+28]], $MachinePrecision]], N[((-z) * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] + y), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;t \leq -5.5 \cdot 10^{+46} \lor \neg \left(t \leq 4 \cdot 10^{+28}\right):\\
                          \;\;\;\;\mathsf{fma}\left(-z, \frac{y - x}{t}, y\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -5.4999999999999998e46 or 3.99999999999999983e28 < t

                            1. Initial program 29.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(-z, \frac{y - x}{t}, y\right) \]
                              10. lift--.f6459.8

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

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

                            if -5.4999999999999998e46 < t < 3.99999999999999983e28

                            1. Initial program 88.9%

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

                                \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \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--.f6496.0

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

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

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

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

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

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

                          Alternative 11: 63.7% accurate, 0.9× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{+44} \lor \neg \left(t \leq 2.55 \cdot 10^{+57}\right):\\ \;\;\;\;\mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\ \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 (or (<= t -9.2e+44) (not (<= t 2.55e+57)))
                             (fma (/ (- y x) t) a y)
                             (fma (- y x) (/ z a) x)))
                          double code(double x, double y, double z, double t, double a) {
                          	double tmp;
                          	if ((t <= -9.2e+44) || !(t <= 2.55e+57)) {
                          		tmp = fma(((y - x) / t), a, y);
                          	} else {
                          		tmp = fma((y - x), (z / a), x);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	tmp = 0.0
                          	if ((t <= -9.2e+44) || !(t <= 2.55e+57))
                          		tmp = fma(Float64(Float64(y - x) / t), a, y);
                          	else
                          		tmp = fma(Float64(y - x), Float64(z / a), x);
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[t, -9.2e+44], N[Not[LessEqual[t, 2.55e+57]], $MachinePrecision]], N[(N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision] * a + y), $MachinePrecision], N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          \mathbf{if}\;t \leq -9.2 \cdot 10^{+44} \lor \neg \left(t \leq 2.55 \cdot 10^{+57}\right):\\
                          \;\;\;\;\mathsf{fma}\left(\frac{y - x}{t}, a, y\right)\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 2 regimes
                          2. if t < -9.20000000000000018e44 or 2.55000000000000011e57 < t

                            1. Initial program 28.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto a \cdot \frac{y - x}{t} + y \]
                              3. sub-divN/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y - x}{t}, a, y\right) \]
                              8. lift--.f6453.7

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

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

                            if -9.20000000000000018e44 < t < 2.55000000000000011e57

                            1. Initial program 89.6%

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

                                \[\leadsto x + \frac{\color{blue}{\left(y - x\right) \cdot \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--.f6496.6

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

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

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

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

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

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

                          Alternative 12: 62.8% accurate, 0.9× speedup?

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

                            1. Initial program 28.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto a \cdot \frac{y - x}{t} + y \]
                              3. sub-divN/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y - x}{t}, a, y\right) \]
                              8. lift--.f6453.7

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

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

                            if -9.20000000000000018e44 < t < 2.55000000000000011e57

                            1. Initial program 89.6%

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

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

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

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

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

                          Alternative 13: 42.3% accurate, 0.9× speedup?

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

                            1. Initial program 28.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto a \cdot \frac{y - x}{t} + y \]
                              3. sub-divN/A

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

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

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

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

                                \[\leadsto \mathsf{fma}\left(\frac{y - x}{t}, a, y\right) \]
                              8. lift--.f6453.7

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

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

                            if -1.4e41 < t < 1.79999999999999994e55

                            1. Initial program 89.6%

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

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

                                \[\leadsto \color{blue}{x} \]
                            5. Recombined 2 regimes into one program.
                            6. Final simplification47.3%

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

                            Alternative 14: 38.9% accurate, 2.2× speedup?

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

                              1. Initial program 28.6%

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

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

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

                                if -5.2000000000000002e51 < t < 9.4999999999999998e77

                                1. Initial program 87.9%

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

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

                                    \[\leadsto \color{blue}{x} \]
                                5. Recombined 2 regimes into one program.
                                6. Final simplification41.3%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.2 \cdot 10^{+51}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 9.5 \cdot 10^{+77}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
                                7. Add Preprocessing

                                Alternative 15: 24.9% accurate, 29.0× 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 63.8%

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

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

                                    \[\leadsto \color{blue}{x} \]
                                  2. Final simplification28.4%

                                    \[\leadsto x \]
                                  3. Add Preprocessing

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

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

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025064 
                                  (FPCore (x y z t a)
                                    :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                    :precision binary64
                                  
                                    :alt
                                    (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                  
                                    (+ x (/ (* (- y x) (- z t)) (- a t))))