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

Percentage Accurate: 67.6% → 89.5%
Time: 10.2s
Alternatives: 18
Speedup: 0.3×

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 18 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: 67.6% 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: 89.5% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(y - x, t\_1, x\right)\\


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

    1. Initial program 75.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 x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{\color{blue}{a - t}} \]
      2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.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 rewrites100.0%

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

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

    1. Initial program 70.0%

      \[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--.f6486.5

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

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

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

Alternative 2: 89.5% 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 -5 \cdot 10^{-197} \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 -5e-197) (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 <= -5e-197) || !(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 <= -5e-197) || !(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, -5e-197], 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 -5 \cdot 10^{-197} \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))) < -5.0000000000000002e-197 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 72.8%

      \[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--.f6489.7

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

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

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

    1. Initial program 3.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 rewrites100.0%

      \[\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 simplification90.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-197} \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: 87.4% 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 -5 \cdot 10^{-197} \lor \neg \left(t\_1 \leq 0\right):\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{a \cdot \left(y - x\right)}{t}\\ \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 -5e-197) (not (<= t_1 0.0)))
     (fma (- y x) (/ (- z t) (- a t)) x)
     (+ y (/ (* a (- y x)) t)))))
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 <= -5e-197) || !(t_1 <= 0.0)) {
		tmp = fma((y - x), ((z - t) / (a - t)), x);
	} else {
		tmp = y + ((a * (y - x)) / t);
	}
	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 <= -5e-197) || !(t_1 <= 0.0))
		tmp = fma(Float64(y - x), Float64(Float64(z - t) / Float64(a - t)), x);
	else
		tmp = Float64(y + Float64(Float64(a * Float64(y - x)) / t));
	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, -5e-197], 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[(y + N[(N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $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 -5 \cdot 10^{-197} \lor \neg \left(t\_1 \leq 0\right):\\
\;\;\;\;\mathsf{fma}\left(y - x, \frac{z - t}{a - t}, x\right)\\

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


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

    1. Initial program 72.8%

      \[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--.f6489.7

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

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

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

    1. Initial program 3.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 rewrites100.0%

      \[\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 0

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \leq -5 \cdot 10^{-197} \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}:\\ \;\;\;\;y + \frac{a \cdot \left(y - x\right)}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 60.5% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -4.4e89 or 1.10000000000000004e98 < t

    1. Initial program 36.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 rewrites65.1%

      \[\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 0

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

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

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

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

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

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

    if -4.4e89 < t < -2.8000000000000003e-228

    1. Initial program 86.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--.f6489.9

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.8000000000000003e-228 < t < 1.10000000000000004e98

        1. Initial program 82.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.9

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

          \[\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-/.f6469.9

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+89}:\\ \;\;\;\;y + \frac{a \cdot \left(y - x\right)}{t}\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-228}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a - t}, x\right)\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+98}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y + \frac{a \cdot \left(y - x\right)}{t}\\ \end{array} \]
      6. Add Preprocessing

      Alternative 5: 59.6% accurate, 0.7× speedup?

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

        1. Initial program 37.9%

          \[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 rewrites48.8%

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

          if -1.25000000000000006e116 < t < -2.8000000000000003e-228

          1. Initial program 84.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--.f6489.2

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.8000000000000003e-228 < t < 1.39999999999999994e88

              1. Initial program 83.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-/.f6470.6

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -2.8 \cdot 10^{-228}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a - t}, x\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
            6. Add Preprocessing

            Alternative 6: 58.7% accurate, 0.7× speedup?

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

              1. Initial program 37.9%

                \[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 rewrites48.8%

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

                if -1.25000000000000006e116 < t < -8.99999999999999997e-236

                1. Initial program 85.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--.f6489.7

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

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

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

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

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

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

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

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

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

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

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

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

                    if -8.99999999999999997e-236 < t < 1.39999999999999994e88

                    1. Initial program 82.4%

                      \[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--.f6467.4

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

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

                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.25 \cdot 10^{+116}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-236}:\\ \;\;\;\;\mathsf{fma}\left(y, \frac{z}{a - t}, x\right)\\ \mathbf{elif}\;t \leq 1.4 \cdot 10^{+88}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y - x}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
                  6. Add Preprocessing

                  Alternative 7: 39.1% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+161}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-155}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= a -3.6e+161)
                     x
                     (if (<= a -3.3e-155)
                       (+ x y)
                       (if (<= a 7.4e-240) (* x (/ (- z a) t)) (if (<= a 4.5e+75) y x)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (a <= -3.6e+161) {
                  		tmp = x;
                  	} else if (a <= -3.3e-155) {
                  		tmp = x + y;
                  	} else if (a <= 7.4e-240) {
                  		tmp = x * ((z - a) / t);
                  	} else if (a <= 4.5e+75) {
                  		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 <= (-3.6d+161)) then
                          tmp = x
                      else if (a <= (-3.3d-155)) then
                          tmp = x + y
                      else if (a <= 7.4d-240) then
                          tmp = x * ((z - a) / t)
                      else if (a <= 4.5d+75) 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 <= -3.6e+161) {
                  		tmp = x;
                  	} else if (a <= -3.3e-155) {
                  		tmp = x + y;
                  	} else if (a <= 7.4e-240) {
                  		tmp = x * ((z - a) / t);
                  	} else if (a <= 4.5e+75) {
                  		tmp = y;
                  	} else {
                  		tmp = x;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if a <= -3.6e+161:
                  		tmp = x
                  	elif a <= -3.3e-155:
                  		tmp = x + y
                  	elif a <= 7.4e-240:
                  		tmp = x * ((z - a) / t)
                  	elif a <= 4.5e+75:
                  		tmp = y
                  	else:
                  		tmp = x
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (a <= -3.6e+161)
                  		tmp = x;
                  	elseif (a <= -3.3e-155)
                  		tmp = Float64(x + y);
                  	elseif (a <= 7.4e-240)
                  		tmp = Float64(x * Float64(Float64(z - a) / t));
                  	elseif (a <= 4.5e+75)
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	return tmp
                  end
                  
                  function tmp_2 = code(x, y, z, t, a)
                  	tmp = 0.0;
                  	if (a <= -3.6e+161)
                  		tmp = x;
                  	elseif (a <= -3.3e-155)
                  		tmp = x + y;
                  	elseif (a <= 7.4e-240)
                  		tmp = x * ((z - a) / t);
                  	elseif (a <= 4.5e+75)
                  		tmp = y;
                  	else
                  		tmp = x;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[a, -3.6e+161], x, If[LessEqual[a, -3.3e-155], N[(x + y), $MachinePrecision], If[LessEqual[a, 7.4e-240], N[(x * N[(N[(z - a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 4.5e+75], y, x]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -3.6 \cdot 10^{+161}:\\
                  \;\;\;\;x\\
                  
                  \mathbf{elif}\;a \leq -3.3 \cdot 10^{-155}:\\
                  \;\;\;\;x + y\\
                  
                  \mathbf{elif}\;a \leq 7.4 \cdot 10^{-240}:\\
                  \;\;\;\;x \cdot \frac{z - a}{t}\\
                  
                  \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\
                  \;\;\;\;y\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;x\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 4 regimes
                  2. if a < -3.59999999999999984e161 or 4.5000000000000004e75 < a

                    1. Initial program 65.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 rewrites55.9%

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

                      if -3.59999999999999984e161 < a < -3.29999999999999986e-155

                      1. Initial program 72.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--.f6428.9

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

                        \[\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 rewrites35.7%

                          \[\leadsto x + y \]

                        if -3.29999999999999986e-155 < a < 7.4000000000000003e-240

                        1. Initial program 69.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 rewrites86.0%

                          \[\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--.f6443.9

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

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

                        if 7.4000000000000003e-240 < a < 4.5000000000000004e75

                        1. Initial program 64.8%

                          \[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 rewrites43.6%

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

                          \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -3.6 \cdot 10^{+161}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-155}:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 7.4 \cdot 10^{-240}:\\ \;\;\;\;x \cdot \frac{z - a}{t}\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                        7. Add Preprocessing

                        Alternative 8: 66.0% accurate, 0.8× speedup?

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

                          1. Initial program 64.7%

                            \[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--.f6479.9

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

                            \[\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 rewrites68.7%

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

                            if -4.6999999999999998e93 < x < 6.40000000000000004e-149

                            1. Initial program 71.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--.f6488.2

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

                              \[\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--.f6480.5

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

                              \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
                          7. Recombined 2 regimes into one program.
                          8. Final simplification74.0%

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

                          Alternative 9: 67.1% accurate, 0.8× speedup?

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

                            1. Initial program 68.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 + \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--.f6474.0

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

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

                            if -1.15e73 < a < 9.79999999999999976e-57

                            1. Initial program 67.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--.f6480.0

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

                              \[\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--.f6471.6

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

                              \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification72.8%

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

                          Alternative 10: 63.4% accurate, 0.8× speedup?

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

                            1. Initial program 68.8%

                              \[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.1

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

                              \[\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-/.f6466.9

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

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

                            if -1.4500000000000001e74 < a < 9.79999999999999976e-57

                            1. Initial program 67.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--.f6480.0

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

                              \[\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--.f6471.6

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

                              \[\leadsto \color{blue}{y \cdot \frac{z - t}{a - t}} \]
                          3. Recombined 2 regimes into one program.
                          4. Final simplification69.2%

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

                          Alternative 11: 57.6% accurate, 0.8× speedup?

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

                            1. Initial program 67.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--.f6486.8

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

                              \[\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-/.f6466.4

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

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

                            if -3.4000000000000001e54 < a < 9.79999999999999976e-57

                            1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

                          Alternative 12: 59.5% accurate, 0.9× speedup?

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

                            1. Initial program 37.9%

                              \[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 rewrites48.8%

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

                              if -9.4999999999999997e115 < t < 1.39999999999999994e88

                              1. Initial program 83.7%

                                \[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--.f6460.9

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

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

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

                            Alternative 13: 51.5% accurate, 0.9× speedup?

                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+117}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+30}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+194}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \end{array} \]
                            (FPCore (x y z t a)
                             :precision binary64
                             (if (<= t -3.2e+117)
                               y
                               (if (<= t 4.9e+30) (+ x (/ (* y z) a)) (if (<= t 1.12e+194) (+ x y) y))))
                            double code(double x, double y, double z, double t, double a) {
                            	double tmp;
                            	if (t <= -3.2e+117) {
                            		tmp = y;
                            	} else if (t <= 4.9e+30) {
                            		tmp = x + ((y * z) / a);
                            	} else if (t <= 1.12e+194) {
                            		tmp = x + y;
                            	} 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 <= (-3.2d+117)) then
                                    tmp = y
                                else if (t <= 4.9d+30) then
                                    tmp = x + ((y * z) / a)
                                else if (t <= 1.12d+194) then
                                    tmp = x + y
                                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 <= -3.2e+117) {
                            		tmp = y;
                            	} else if (t <= 4.9e+30) {
                            		tmp = x + ((y * z) / a);
                            	} else if (t <= 1.12e+194) {
                            		tmp = x + y;
                            	} else {
                            		tmp = y;
                            	}
                            	return tmp;
                            }
                            
                            def code(x, y, z, t, a):
                            	tmp = 0
                            	if t <= -3.2e+117:
                            		tmp = y
                            	elif t <= 4.9e+30:
                            		tmp = x + ((y * z) / a)
                            	elif t <= 1.12e+194:
                            		tmp = x + y
                            	else:
                            		tmp = y
                            	return tmp
                            
                            function code(x, y, z, t, a)
                            	tmp = 0.0
                            	if (t <= -3.2e+117)
                            		tmp = y;
                            	elseif (t <= 4.9e+30)
                            		tmp = Float64(x + Float64(Float64(y * z) / a));
                            	elseif (t <= 1.12e+194)
                            		tmp = Float64(x + y);
                            	else
                            		tmp = y;
                            	end
                            	return tmp
                            end
                            
                            function tmp_2 = code(x, y, z, t, a)
                            	tmp = 0.0;
                            	if (t <= -3.2e+117)
                            		tmp = y;
                            	elseif (t <= 4.9e+30)
                            		tmp = x + ((y * z) / a);
                            	elseif (t <= 1.12e+194)
                            		tmp = x + y;
                            	else
                            		tmp = y;
                            	end
                            	tmp_2 = tmp;
                            end
                            
                            code[x_, y_, z_, t_, a_] := If[LessEqual[t, -3.2e+117], y, If[LessEqual[t, 4.9e+30], N[(x + N[(N[(y * z), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.12e+194], N[(x + y), $MachinePrecision], y]]]
                            
                            \begin{array}{l}
                            
                            \\
                            \begin{array}{l}
                            \mathbf{if}\;t \leq -3.2 \cdot 10^{+117}:\\
                            \;\;\;\;y\\
                            
                            \mathbf{elif}\;t \leq 4.9 \cdot 10^{+30}:\\
                            \;\;\;\;x + \frac{y \cdot z}{a}\\
                            
                            \mathbf{elif}\;t \leq 1.12 \cdot 10^{+194}:\\
                            \;\;\;\;x + y\\
                            
                            \mathbf{else}:\\
                            \;\;\;\;y\\
                            
                            
                            \end{array}
                            \end{array}
                            
                            Derivation
                            1. Split input into 3 regimes
                            2. if t < -3.20000000000000005e117 or 1.11999999999999994e194 < t

                              1. Initial program 30.2%

                                \[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 rewrites56.0%

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

                                if -3.20000000000000005e117 < t < 4.89999999999999984e30

                                1. Initial program 83.3%

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

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

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

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

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

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

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

                                  \[\leadsto x + \frac{y \cdot z}{a} \]
                                7. Step-by-step derivation
                                  1. Applied rewrites49.8%

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

                                  if 4.89999999999999984e30 < t < 1.11999999999999994e194

                                  1. Initial program 63.9%

                                    \[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--.f6429.0

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

                                    \[\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 rewrites45.0%

                                      \[\leadsto x + y \]
                                  8. Recombined 3 regimes into one program.
                                  9. Final simplification50.5%

                                    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.2 \cdot 10^{+117}:\\ \;\;\;\;y\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+30}:\\ \;\;\;\;x + \frac{y \cdot z}{a}\\ \mathbf{elif}\;t \leq 1.12 \cdot 10^{+194}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;y\\ \end{array} \]
                                  10. Add Preprocessing

                                  Alternative 14: 42.9% accurate, 0.9× speedup?

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

                                    1. Initial program 69.5%

                                      \[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.2

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

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

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

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

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

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

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

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

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

                                      \[\leadsto z \cdot \frac{y - x}{a} \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites56.4%

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

                                      if -7.2000000000000001e34 < z < 1.8999999999999999e39

                                      1. Initial program 68.9%

                                        \[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--.f6425.8

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

                                        \[\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 rewrites45.0%

                                          \[\leadsto x + y \]

                                        if 1.8999999999999999e39 < z

                                        1. Initial program 63.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--.f6489.1

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto z \cdot \frac{y}{a - t} \]
                                        10. Applied rewrites41.6%

                                          \[\leadsto z \cdot \frac{y}{\color{blue}{a - t}} \]
                                      8. Recombined 3 regimes into one program.
                                      9. Final simplification46.4%

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+34}:\\ \;\;\;\;z \cdot \frac{y - x}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+39}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \end{array} \]
                                      10. Add Preprocessing

                                      Alternative 15: 41.8% accurate, 0.9× speedup?

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

                                        1. Initial program 69.5%

                                          \[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.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -7.2000000000000001e34 < z < 1.8999999999999999e39

                                        1. Initial program 68.9%

                                          \[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--.f6425.8

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

                                          \[\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 rewrites45.0%

                                            \[\leadsto x + y \]

                                          if 1.8999999999999999e39 < z

                                          1. Initial program 63.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--.f6489.1

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto z \cdot \frac{y}{a - t} \]
                                          10. Applied rewrites41.6%

                                            \[\leadsto z \cdot \frac{y}{\color{blue}{a - t}} \]
                                        8. Recombined 3 regimes into one program.
                                        9. Final simplification45.0%

                                          \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -7.2 \cdot 10^{+34}:\\ \;\;\;\;\frac{z \cdot \left(y - x\right)}{a}\\ \mathbf{elif}\;z \leq 1.9 \cdot 10^{+39}:\\ \;\;\;\;x + y\\ \mathbf{else}:\\ \;\;\;\;z \cdot \frac{y}{a - t}\\ \end{array} \]
                                        10. Add Preprocessing

                                        Alternative 16: 40.5% accurate, 0.9× speedup?

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

                                          1. Initial program 69.5%

                                            \[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.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -7.2000000000000001e34 < z < 5.9999999999999998e54

                                          1. Initial program 68.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.1

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

                                            \[\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 rewrites45.1%

                                              \[\leadsto x + y \]

                                            if 5.9999999999999998e54 < z

                                            1. Initial program 64.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--.f6488.7

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

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

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{y \cdot z}{a - t} \]
                                              3. lift--.f6436.1

                                                \[\leadsto \frac{y \cdot z}{a - t} \]
                                            10. Applied rewrites36.1%

                                              \[\leadsto \frac{y \cdot z}{\color{blue}{a - t}} \]
                                          8. Recombined 3 regimes into one program.
                                          9. Final simplification43.9%

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

                                          Alternative 17: 39.2% accurate, 2.2× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (if (<= a -1.3e+73) x (if (<= a 4.5e+75) y x)))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if (a <= -1.3e+73) {
                                          		tmp = x;
                                          	} else if (a <= 4.5e+75) {
                                          		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 <= (-1.3d+73)) then
                                                  tmp = x
                                              else if (a <= 4.5d+75) 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 <= -1.3e+73) {
                                          		tmp = x;
                                          	} else if (a <= 4.5e+75) {
                                          		tmp = y;
                                          	} else {
                                          		tmp = x;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a):
                                          	tmp = 0
                                          	if a <= -1.3e+73:
                                          		tmp = x
                                          	elif a <= 4.5e+75:
                                          		tmp = y
                                          	else:
                                          		tmp = x
                                          	return tmp
                                          
                                          function code(x, y, z, t, a)
                                          	tmp = 0.0
                                          	if (a <= -1.3e+73)
                                          		tmp = x;
                                          	elseif (a <= 4.5e+75)
                                          		tmp = y;
                                          	else
                                          		tmp = x;
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t, a)
                                          	tmp = 0.0;
                                          	if (a <= -1.3e+73)
                                          		tmp = x;
                                          	elseif (a <= 4.5e+75)
                                          		tmp = y;
                                          	else
                                          		tmp = x;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := If[LessEqual[a, -1.3e+73], x, If[LessEqual[a, 4.5e+75], y, x]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;a \leq -1.3 \cdot 10^{+73}:\\
                                          \;\;\;\;x\\
                                          
                                          \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\
                                          \;\;\;\;y\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;x\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if a < -1.3e73 or 4.5000000000000004e75 < a

                                            1. Initial program 67.1%

                                              \[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 rewrites46.4%

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

                                              if -1.3e73 < a < 4.5000000000000004e75

                                              1. Initial program 68.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}{y} \]
                                              4. Step-by-step derivation
                                                1. Applied rewrites37.4%

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

                                                \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.3 \cdot 10^{+73}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 4.5 \cdot 10^{+75}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                              7. Add Preprocessing

                                              Alternative 18: 24.8% 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 67.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 rewrites23.5%

                                                  \[\leadsto \color{blue}{x} \]
                                                2. Final simplification23.5%

                                                  \[\leadsto x \]
                                                3. Add Preprocessing

                                                Developer Target 1: 86.4% 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 2025037 
                                                (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))))