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

Percentage Accurate: 67.9% → 89.6%
Time: 4.5s
Alternatives: 17
Speedup: 0.9×

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 17 alternatives:

AlternativeAccuracySpeedup
The accuracy (vertical axis) and speed (horizontal axis) of each alternatives. Up and to the right is better. The red square shows the initial program, and each blue circle shows an alternative.The line shows the best available speed-accuracy tradeoffs.

Initial Program: 67.9% 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: 89.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-168}:\\
\;\;\;\;t\_2\\

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

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

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


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

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -1e-168 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.0000000000000001e299

    1. Initial program 97.1%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing

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

    1. Initial program 27.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.1% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-203}:\\
\;\;\;\;t\_2\\

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

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

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


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

    1. Initial program 38.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < -5.0000000000000002e-203 or 0.0 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 2.0000000000000001e299

    1. Initial program 97.2%

      \[x + \frac{\left(y - z\right) \cdot \left(t - x\right)}{a - z} \]
    2. Add Preprocessing

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

    1. Initial program 20.6%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 85.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-168 < (+.f64 x (/.f64 (*.f64 (-.f64 y z) (-.f64 t x)) (-.f64 a z))) < 5.00000000000000024e-223

    1. Initial program 34.2%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 61.3% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if x < -7.2e-71 or 6.49999999999999966e115 < x

    1. Initial program 58.2%

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

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

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

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

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

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

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

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

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

    if -7.2e-71 < x < 6.8000000000000003e-10

    1. Initial program 78.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.8000000000000003e-10 < x < 6.49999999999999966e115

      1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
        9. lift--.f6444.0

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

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

    Alternative 5: 59.3% accurate, 0.7× speedup?

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

      1. Initial program 59.7%

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

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

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

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

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

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

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

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

      if -3.7999999999999997e-43 < x < 6.8000000000000003e-10

      1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 6.8000000000000003e-10 < x < 7.79999999999999967e121

        1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if 7.79999999999999967e121 < x

        1. Initial program 53.2%

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

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

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

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

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

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

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

      Alternative 6: 60.2% accurate, 0.7× speedup?

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

        1. Initial program 57.3%

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

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

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

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

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

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

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

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

        if -3.7999999999999997e-43 < x < 6.8000000000000003e-10

        1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 6.8000000000000003e-10 < x < 4.69999999999999993e120

          1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
            9. lift--.f6444.0

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

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

        Alternative 7: 58.7% accurate, 0.7× speedup?

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

          1. Initial program 68.9%

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

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

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

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

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

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

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

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

          if -5500 < a < -3.55e-252

          1. Initial program 66.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -3.55e-252 < a < 3.99999999999999969e-24

          1. Initial program 66.2%

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

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

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

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

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

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

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

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

          if 3.99999999999999969e-24 < a

          1. Initial program 69.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 8: 70.5% accurate, 0.8× speedup?

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

              1. Initial program 70.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.59999999999999982e80 < y < 9.00000000000000034e63

              1. Initial program 67.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 9.00000000000000034e63 < y

                1. Initial program 68.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 36.7% accurate, 0.8× speedup?

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

                1. Initial program 69.8%

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

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

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

                  if -1.34999999999999996e-83 < a < 3.39999999999999987e-65

                  1. Initial program 65.0%

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

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

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

                    if 3.39999999999999987e-65 < a < 1.89999999999999988e111

                    1. Initial program 69.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{t \cdot y}{a} \]
                    11. Applied rewrites20.2%

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

                  Alternative 10: 58.4% accurate, 0.8× speedup?

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

                    1. Initial program 68.9%

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

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

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

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

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

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

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

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

                    if -4800 < a < 5.60000000000000001e-71

                    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

                    if 5.60000000000000001e-71 < a

                    1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 11: 59.5% accurate, 0.8× speedup?

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

                        1. Initial program 68.9%

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

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

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

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

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

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

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

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

                        if -5500 < a < 5.60000000000000001e-71

                        1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
                          9. lift--.f6455.0

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

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

                        if 5.60000000000000001e-71 < a

                        1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 12: 59.6% accurate, 0.9× speedup?

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

                            1. Initial program 30.6%

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

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

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

                              if -3.6e137 < z < 8.4999999999999993e152

                              1. Initial program 81.0%

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

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

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

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

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

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

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

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

                            Alternative 13: 81.8% accurate, 0.9× speedup?

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

                              1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if 7.9999999999999999e203 < z

                              1. Initial program 24.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 14: 52.3% accurate, 1.0× speedup?

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

                                1. Initial program 31.7%

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

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

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

                                  if -3.6e137 < z < 9.2000000000000006e132

                                  1. Initial program 81.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 15: 36.1% accurate, 1.0× speedup?

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

                                        1. Initial program 38.3%

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

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

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

                                          if -4.6e136 < z < 7.9999999999999998e-223

                                          1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto t \cdot \frac{y}{a} \]
                                          10. Step-by-step derivation
                                            1. lower-/.f6426.5

                                              \[\leadsto t \cdot \frac{y}{a} \]
                                          11. Applied rewrites26.5%

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

                                          if 7.9999999999999998e-223 < z < 5.2000000000000003e36

                                          1. Initial program 86.5%

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

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

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

                                          Alternative 16: 38.5% accurate, 2.2× speedup?

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

                                            1. Initial program 46.6%

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

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

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

                                              if -1.02000000000000002e-22 < z < 5.2000000000000003e36

                                              1. Initial program 88.6%

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

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

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

                                              Alternative 17: 25.1% accurate, 29.0× speedup?

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

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

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

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

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

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

                                                Reproduce

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