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

Percentage Accurate: 69.0% → 86.9%
Time: 6.1s
Alternatives: 20
Speedup: 0.8×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

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

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

Alternative 1: 86.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.6 \cdot 10^{+180}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\ \mathbf{elif}\;z \leq -8.8 \cdot 10^{-197}:\\ \;\;\;\;\mathsf{fma}\left(\frac{z - y}{z - a}, t - x, x\right)\\ \mathbf{elif}\;z \leq 1.18 \cdot 10^{+51}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, a - y, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -6.6e+180)
   (fma (- x t) (/ (- y a) z) t)
   (if (<= z -8.8e-197)
     (fma (/ (- z y) (- z a)) (- t x) x)
     (if (<= z 1.18e+51)
       (fma (/ (- x t) (- z a)) (- y z) x)
       (fma (/ (- t x) z) (- a y) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -6.6e+180) {
		tmp = fma((x - t), ((y - a) / z), t);
	} else if (z <= -8.8e-197) {
		tmp = fma(((z - y) / (z - a)), (t - x), x);
	} else if (z <= 1.18e+51) {
		tmp = fma(((x - t) / (z - a)), (y - z), x);
	} else {
		tmp = fma(((t - x) / z), (a - y), t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -6.6e+180)
		tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t);
	elseif (z <= -8.8e-197)
		tmp = fma(Float64(Float64(z - y) / Float64(z - a)), Float64(t - x), x);
	elseif (z <= 1.18e+51)
		tmp = fma(Float64(Float64(x - t) / Float64(z - a)), Float64(y - z), x);
	else
		tmp = fma(Float64(Float64(t - x) / z), Float64(a - y), t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -6.6e+180], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -8.8e-197], N[(N[(N[(z - y), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(t - x), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[z, 1.18e+51], N[(N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision] + x), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6445.7

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

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

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

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

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

        \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
    6. Applied rewrites52.9%

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

    if -6.59999999999999978e180 < z < -8.8000000000000001e-197

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
      10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

    if -8.8000000000000001e-197 < z < 1.18e51

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.18e51 < z

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6445.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.4% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6445.7

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

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

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

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

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

        \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
    6. Applied rewrites52.9%

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

    if -3.89999999999999985e164 < z < 1.18e51

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.18e51 < z

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6445.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 77.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+180}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\ \mathbf{elif}\;z \leq -2.25 \cdot 10^{-116}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y - z}{a - z}, t, x\right)\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{-31}:\\ \;\;\;\;x + \frac{y \cdot \left(t - x\right)}{a - z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{z}, a - y, t\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.8e+180)
   (fma (- x t) (/ (- y a) z) t)
   (if (<= z -2.25e-116)
     (fma (/ (- y z) (- a z)) t x)
     (if (<= z 1.55e-31)
       (+ x (/ (* y (- t x)) (- a z)))
       (fma (/ (- t x) z) (- a y) t)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.8e+180) {
		tmp = fma((x - t), ((y - a) / z), t);
	} else if (z <= -2.25e-116) {
		tmp = fma(((y - z) / (a - z)), t, x);
	} else if (z <= 1.55e-31) {
		tmp = x + ((y * (t - x)) / (a - z));
	} else {
		tmp = fma(((t - x) / z), (a - y), t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.8e+180)
		tmp = fma(Float64(x - t), Float64(Float64(y - a) / z), t);
	elseif (z <= -2.25e-116)
		tmp = fma(Float64(Float64(y - z) / Float64(a - z)), t, x);
	elseif (z <= 1.55e-31)
		tmp = Float64(x + Float64(Float64(y * Float64(t - x)) / Float64(a - z)));
	else
		tmp = fma(Float64(Float64(t - x) / z), Float64(a - y), t);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+180], N[(N[(x - t), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, -2.25e-116], N[(N[(N[(y - z), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * t + x), $MachinePrecision], If[LessEqual[z, 1.55e-31], N[(x + N[(N[(y * N[(t - x), $MachinePrecision]), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] * N[(a - y), $MachinePrecision] + t), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


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

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

        \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
      8. lower--.f6445.7

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

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

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

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

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

        \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
    6. Applied rewrites52.9%

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

    if -5.80000000000000015e180 < z < -2.25000000000000006e-116

    1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

          \[\leadsto t \cdot \frac{\color{blue}{y - z}}{a - z} + x \]
        8. sub-negate-revN/A

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

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

          \[\leadsto t \cdot \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\color{blue}{a - z}} + x \]
        11. sub-negate-revN/A

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

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

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

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

          \[\leadsto \color{blue}{\frac{z - y}{z - a} \cdot t} + x \]
        16. lower-fma.f6467.7

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

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

      if -2.25000000000000006e-116 < z < 1.55e-31

      1. Initial program 69.0%

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

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

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

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

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

      if 1.55e-31 < z

      1. Initial program 69.0%

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

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

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

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

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

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

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

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

          \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
        8. lower--.f6445.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 76.6% accurate, 0.8× speedup?

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

      1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

            \[\leadsto t \cdot \frac{\color{blue}{y - z}}{a - z} + x \]
          8. sub-negate-revN/A

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

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

            \[\leadsto t \cdot \frac{\mathsf{neg}\left(\left(z - y\right)\right)}{\color{blue}{a - z}} + x \]
          11. sub-negate-revN/A

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

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

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

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

            \[\leadsto \color{blue}{\frac{z - y}{z - a} \cdot t} + x \]
          16. lower-fma.f6467.7

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

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

        if -2.0000000000000001e-18 < a < 4.4999999999999999e70

        1. Initial program 69.0%

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

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

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

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

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

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

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

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

            \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
          8. lower--.f6445.7

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

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

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

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

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

            \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
        6. Applied rewrites52.9%

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

        if 4.4999999999999999e70 < a

        1. Initial program 69.0%

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

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

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

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

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

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

        Alternative 5: 76.1% accurate, 0.8× speedup?

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

          1. Initial program 69.0%

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

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

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

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

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

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

            if -2.0000000000000001e-18 < a < 4.4999999999999999e70

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

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

                \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
            6. Applied rewrites52.9%

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

          Alternative 6: 74.8% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

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

                \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
            6. Applied rewrites52.9%

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

            if -5.20000000000000021e-61 < z < 1.49999999999999991e-31

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.49999999999999991e-31 < z

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 7: 74.6% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

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

                \[\leadsto -1 \cdot \left(\mathsf{neg}\left(-1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}\right)\right) + t \]
            6. Applied rewrites52.9%

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

            if -5.20000000000000021e-61 < z < 1.49999999999999991e-31

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 61.2% accurate, 0.7× speedup?

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

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

                \[\leadsto t + \frac{a \cdot \left(t - x\right)}{z} \]
              3. lower--.f6428.6

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

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

            if -6.49999999999999996e86 < z < 9.19999999999999993e-14

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.19999999999999993e-14 < z < 1.4500000000000001e238

            1. Initial program 69.0%

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

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

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

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

                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
              4. lower--.f6439.6

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

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

          Alternative 9: 59.9% accurate, 0.9× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -6.3999999999999997e88 < z < 9.19999999999999993e-14

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 9.19999999999999993e-14 < z

            1. Initial program 69.0%

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

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

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

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

                \[\leadsto \frac{t \cdot \left(y - z\right)}{a - z} \]
              4. lower--.f6439.6

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

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

          Alternative 10: 56.9% accurate, 0.9× speedup?

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

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.25000000000000008e-67 < a < 2.05e7

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{t - x}{a - z} \cdot y \]
              8. sub-negate-revN/A

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

                \[\leadsto \frac{\mathsf{neg}\left(\left(x - t\right)\right)}{a - z} \cdot y \]
              10. sub-negate-revN/A

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

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

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

                \[\leadsto \frac{x - t}{z - a} \cdot y \]
              14. lower--.f6441.6

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

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

          Alternative 11: 56.1% accurate, 0.9× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -6.3999999999999997e88 < z < 4.19999999999999991e42

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

                \[\leadsto \color{blue}{\mathsf{fma}\left(\left(y - z\right) \cdot \frac{1}{a - z}, t - x, x\right)} \]
              10. mult-flip-revN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 36.7% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -2.90000000000000017e78 < z < -3.20000000000000013e-155

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{t - x}{\color{blue}{a - z}} \]
              5. sub-negate-revN/A

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

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

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

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

                \[\leadsto y \cdot \frac{x - t}{\color{blue}{z - a}} \]
              10. div-flipN/A

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

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

                \[\leadsto y \cdot \frac{1}{\frac{z - a}{\color{blue}{x - t}}} \]
              13. lower--.f6441.4

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

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

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

                \[\leadsto y \cdot \frac{x - t}{z} \]
              2. lower--.f6425.7

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

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

            if -3.20000000000000013e-155 < z < 2.15e-19

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{t - x}{a} \]
              2. lower--.f6425.2

                \[\leadsto y \cdot \frac{t - x}{a} \]
            7. Applied rewrites25.2%

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

          Alternative 13: 36.7% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -2.7499999999999999e78 < z < -1.9500000000000001e-156

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot \left(t \cdot \left(a - z\right) - \left(a - z\right) \cdot x\right)}{\left(z - a\right) \cdot \left(\mathsf{neg}\left(\left(a - z\right)\right)\right)} \]
              12. sub-negate-revN/A

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

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

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

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

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

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

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

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

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

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

            if -1.9500000000000001e-156 < z < 2.15e-19

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{t - x}{a} \]
              2. lower--.f6425.2

                \[\leadsto y \cdot \frac{t - x}{a} \]
            7. Applied rewrites25.2%

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

          Alternative 14: 31.2% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -8.3999999999999998e-79 < t < 2.7000000000000001e-184

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot \left(t \cdot \left(a - z\right) - \left(a - z\right) \cdot x\right)}{\left(z - a\right) \cdot \left(\mathsf{neg}\left(\left(a - z\right)\right)\right)} \]
              12. sub-negate-revN/A

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot y}{z - a} \]
              3. lower--.f6421.3

                \[\leadsto \frac{x \cdot y}{z - a} \]
            9. Applied rewrites21.3%

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

            if 2.7000000000000001e-184 < t < 1.14999999999999997e83

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

                \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
              3. lower--.f6419.5

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

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

            if 1.14999999999999997e83 < t

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{t}{a - \color{blue}{z}} \]
              2. lower--.f6422.9

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

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

          Alternative 15: 29.4% accurate, 0.8× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -8.3999999999999998e-79 < t < 2.7000000000000001e-184

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot \left(t \cdot \left(a - z\right) - \left(a - z\right) \cdot x\right)}{\left(z - a\right) \cdot \left(\mathsf{neg}\left(\left(a - z\right)\right)\right)} \]
              12. sub-negate-revN/A

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot y}{z - a} \]
              3. lower--.f6421.3

                \[\leadsto \frac{x \cdot y}{z - a} \]
            9. Applied rewrites21.3%

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

            if 2.7000000000000001e-184 < t < 1.1600000000000001e83

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

                \[\leadsto t + -1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
              8. lower--.f6445.7

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

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

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

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

                \[\leadsto \frac{x \cdot \left(y - a\right)}{z} \]
              3. lower--.f6419.5

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

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

            if 1.1600000000000001e83 < t

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{t \cdot y}{a - z} \]
              3. lower--.f6421.2

                \[\leadsto \frac{t \cdot y}{a - z} \]
            7. Applied rewrites21.2%

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

          Alternative 16: 29.3% accurate, 1.0× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -1.4999999999999999e77 < z < 8.99999999999999994e36

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{y \cdot \left(t \cdot \left(a - z\right) - \left(a - z\right) \cdot x\right)}{\left(z - a\right) \cdot \left(\mathsf{neg}\left(\left(a - z\right)\right)\right)} \]
              12. sub-negate-revN/A

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot y}{z - a} \]
              3. lower--.f6421.3

                \[\leadsto \frac{x \cdot y}{z - a} \]
            9. Applied rewrites21.3%

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

          Alternative 17: 28.5% accurate, 1.0× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -8.4999999999999999e37 < z < 1.9000000000000001e-39

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{t \cdot y}{a - z} \]
              3. lower--.f6421.2

                \[\leadsto \frac{t \cdot y}{a - z} \]
            7. Applied rewrites21.2%

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

          Alternative 18: 28.3% accurate, 1.2× speedup?

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

            1. Initial program 69.0%

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

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

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

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

            if -3.8999999999999998e-29 < z < 1.26e-39

            1. Initial program 69.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto y \cdot \left(\frac{t}{a} - \frac{x}{a - z}\right) \]
            6. Step-by-step derivation
              1. Applied rewrites30.4%

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{t - x}{a} \cdot y \]
                  7. lift--.f64N/A

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

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

                    \[\leadsto \frac{\left(t - x\right) \cdot y}{a} \]
                  10. lower-/.f6423.6

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

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

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

                    \[\leadsto \frac{t \cdot y}{a} \]
                6. Recombined 2 regimes into one program.
                7. Add Preprocessing

                Alternative 19: 19.4% accurate, 2.8× speedup?

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

                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                2. Taylor expanded in z around inf

                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                3. Step-by-step derivation
                  1. lower--.f6419.4

                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                4. Applied rewrites19.4%

                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                5. Add Preprocessing

                Alternative 20: 2.8% accurate, 3.8× speedup?

                \[\begin{array}{l} \\ \left(-x\right) + x \end{array} \]
                (FPCore (x y z t a) :precision binary64 (+ (- x) x))
                double code(double x, double y, double z, double t, double a) {
                	return -x + x;
                }
                
                module fmin_fmax_functions
                    implicit none
                    private
                    public fmax
                    public fmin
                
                    interface fmax
                        module procedure fmax88
                        module procedure fmax44
                        module procedure fmax84
                        module procedure fmax48
                    end interface
                    interface fmin
                        module procedure fmin88
                        module procedure fmin44
                        module procedure fmin84
                        module procedure fmin48
                    end interface
                contains
                    real(8) function fmax88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmax44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmax84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmax48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                    end function
                    real(8) function fmin88(x, y) result (res)
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(4) function fmin44(x, y) result (res)
                        real(4), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                    end function
                    real(8) function fmin84(x, y) result(res)
                        real(8), intent (in) :: x
                        real(4), intent (in) :: y
                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                    end function
                    real(8) function fmin48(x, y) result(res)
                        real(4), intent (in) :: x
                        real(8), intent (in) :: y
                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                    end function
                end module
                
                real(8) function code(x, y, z, t, a)
                use fmin_fmax_functions
                    real(8), intent (in) :: x
                    real(8), intent (in) :: y
                    real(8), intent (in) :: z
                    real(8), intent (in) :: t
                    real(8), intent (in) :: a
                    code = -x + x
                end function
                
                public static double code(double x, double y, double z, double t, double a) {
                	return -x + x;
                }
                
                def code(x, y, z, t, a):
                	return -x + x
                
                function code(x, y, z, t, a)
                	return Float64(Float64(-x) + x)
                end
                
                function tmp = code(x, y, z, t, a)
                	tmp = -x + x;
                end
                
                code[x_, y_, z_, t_, a_] := N[((-x) + x), $MachinePrecision]
                
                \begin{array}{l}
                
                \\
                \left(-x\right) + x
                \end{array}
                
                Derivation
                1. Initial program 69.0%

                  \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
                2. Taylor expanded in z around inf

                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                3. Step-by-step derivation
                  1. lower--.f6419.4

                    \[\leadsto x + \left(t - \color{blue}{x}\right) \]
                4. Applied rewrites19.4%

                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                5. Taylor expanded in x around inf

                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                6. Step-by-step derivation
                  1. lower-*.f642.8

                    \[\leadsto x + -1 \cdot x \]
                7. Applied rewrites2.8%

                  \[\leadsto x + -1 \cdot \color{blue}{x} \]
                8. Step-by-step derivation
                  1. lift-+.f64N/A

                    \[\leadsto \color{blue}{x + -1 \cdot x} \]
                  2. +-commutativeN/A

                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                  3. lower-+.f642.8

                    \[\leadsto \color{blue}{-1 \cdot x + x} \]
                  4. lift-*.f64N/A

                    \[\leadsto -1 \cdot x + x \]
                  5. mul-1-negN/A

                    \[\leadsto \left(\mathsf{neg}\left(x\right)\right) + x \]
                  6. lower-neg.f642.8

                    \[\leadsto \left(-x\right) + x \]
                9. Applied rewrites2.8%

                  \[\leadsto \color{blue}{\left(-x\right) + x} \]
                10. Add Preprocessing

                Reproduce

                ?
                herbie shell --seed 2025154 
                (FPCore (x y z t a)
                  :name "Graphics.Rendering.Chart.Axis.Types:invLinMap from Chart-1.5.3"
                  :precision binary64
                  (+ x (/ (* (- y z) (- t x)) (- a z))))