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

Percentage Accurate: 68.3% → 87.3%
Time: 19.3s
Alternatives: 20
Speedup: 0.8×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 68.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 87.3% accurate, 0.3× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.80000000000000037e-15 or 9.5000000000000001e-97 < y

    1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.80000000000000037e-15 < y < 9.5000000000000001e-97

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.2× speedup?

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

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

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


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

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 5.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{\left(y - x\right) \cdot z}{t}, -1, y\right) - \left(-\frac{\left(y - x\right) \cdot a}{t}\right) \]
      16. lift--.f6499.8

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

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

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

Alternative 3: 90.7% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 5.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 5.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 54.7% accurate, 0.6× speedup?

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

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

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

\mathbf{elif}\;a \leq -4.8 \cdot 10^{-219}:\\
\;\;\;\;y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -6.99999999999999964e-54 or 1.30000000000000007e-114 < a

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.99999999999999964e-54 < a < -1.34999999999999996e-130

    1. Initial program 58.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999996e-130 < a < -4.80000000000000028e-219

    1. Initial program 46.0%

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

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

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

      if -4.80000000000000028e-219 < a < 1.30000000000000007e-114

      1. Initial program 63.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\left(y - x\right) \cdot z}{-t} \]
    5. Recombined 4 regimes into one program.
    6. Final simplification62.5%

      \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-130}:\\ \;\;\;\;\left(-z\right) \cdot \frac{y - x}{t}\\ \mathbf{elif}\;a \leq -4.8 \cdot 10^{-219}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-114}:\\ \;\;\;\;\frac{\left(y - x\right) \cdot z}{-t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \end{array} \]
    7. Add Preprocessing

    Alternative 6: 54.9% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(-z\right) \cdot \frac{y - x}{t}\\ t_2 := \mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{if}\;a \leq -7 \cdot 10^{-54}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-130}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-219}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-109}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (* (- z) (/ (- y x) t))) (t_2 (fma (- y x) (/ z a) x)))
       (if (<= a -7e-54)
         t_2
         (if (<= a -1.35e-130)
           t_1
           (if (<= a -1.45e-219) y (if (<= a 1.04e-109) t_1 t_2))))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = -z * ((y - x) / t);
    	double t_2 = fma((y - x), (z / a), x);
    	double tmp;
    	if (a <= -7e-54) {
    		tmp = t_2;
    	} else if (a <= -1.35e-130) {
    		tmp = t_1;
    	} else if (a <= -1.45e-219) {
    		tmp = y;
    	} else if (a <= 1.04e-109) {
    		tmp = t_1;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(-z) * Float64(Float64(y - x) / t))
    	t_2 = fma(Float64(y - x), Float64(z / a), x)
    	tmp = 0.0
    	if (a <= -7e-54)
    		tmp = t_2;
    	elseif (a <= -1.35e-130)
    		tmp = t_1;
    	elseif (a <= -1.45e-219)
    		tmp = y;
    	elseif (a <= 1.04e-109)
    		tmp = t_1;
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[((-z) * N[(N[(y - x), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - x), $MachinePrecision] * N[(z / a), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[a, -7e-54], t$95$2, If[LessEqual[a, -1.35e-130], t$95$1, If[LessEqual[a, -1.45e-219], y, If[LessEqual[a, 1.04e-109], t$95$1, t$95$2]]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(-z\right) \cdot \frac{y - x}{t}\\
    t_2 := \mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\
    \mathbf{if}\;a \leq -7 \cdot 10^{-54}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;a \leq -1.35 \cdot 10^{-130}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;a \leq -1.45 \cdot 10^{-219}:\\
    \;\;\;\;y\\
    
    \mathbf{elif}\;a \leq 1.04 \cdot 10^{-109}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -6.99999999999999964e-54 or 1.03999999999999996e-109 < a

      1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -6.99999999999999964e-54 < a < -1.34999999999999996e-130 or -1.44999999999999992e-219 < a < 1.03999999999999996e-109

      1. Initial program 62.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.34999999999999996e-130 < a < -1.44999999999999992e-219

      1. Initial program 46.0%

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

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

          \[\leadsto \color{blue}{y} \]
      5. Recombined 3 regimes into one program.
      6. Final simplification61.8%

        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -7 \cdot 10^{-54}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-130}:\\ \;\;\;\;\left(-z\right) \cdot \frac{y - x}{t}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-219}:\\ \;\;\;\;y\\ \mathbf{elif}\;a \leq 1.04 \cdot 10^{-109}:\\ \;\;\;\;\left(-z\right) \cdot \frac{y - x}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(y - x, \frac{z}{a}, x\right)\\ \end{array} \]
      7. Add Preprocessing

      Alternative 7: 73.6% accurate, 0.8× speedup?

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

        1. Initial program 65.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -8.0000000000000001e177 < z < 1.50000000000000012e107

        1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 8: 68.4% accurate, 0.8× speedup?

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

          1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

          if -8.9999999999999996e-28 < a < 6.8000000000000004e-19

          1. Initial program 60.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 46.7% accurate, 0.8× speedup?

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

          1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

            if -1.01999999999999998e-25 < a < -6.80000000000000026e-129

            1. Initial program 60.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{z - a}{t} \cdot x \]
              5. lift--.f6453.5

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

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

            if -6.80000000000000026e-129 < a < 2.4000000000000002e-65

            1. Initial program 61.0%

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.02 \cdot 10^{-25}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\ \mathbf{elif}\;a \leq -6.8 \cdot 10^{-129}:\\ \;\;\;\;\frac{z - a}{t} \cdot x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{-65}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(z, \frac{y}{a}, x\right)\\ \end{array} \]
            7. Add Preprocessing

            Alternative 10: 59.9% accurate, 0.8× speedup?

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

              1. Initial program 68.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -1.3e110 < z < 7.9999999999999998e-19

              1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto y \cdot \frac{z - t}{a - \color{blue}{t}} \]
              10. Applied rewrites61.0%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+110} \lor \neg \left(z \leq 8 \cdot 10^{-19}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z - t}{a - t}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 11: 55.3% accurate, 0.8× speedup?

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

              1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -4.29999999999999976e-25 < z < 3.5000000000000003e-79

              1. Initial program 65.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{-1 \cdot t}{\color{blue}{a} - t} \]
              12. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto y \cdot \frac{\mathsf{neg}\left(t\right)}{a - t} \]
                2. lower-neg.f6456.1

                  \[\leadsto y \cdot \frac{-t}{a - t} \]
              13. Applied rewrites56.1%

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.3 \cdot 10^{-25} \lor \neg \left(z \leq 3.5 \cdot 10^{-79}\right):\\ \;\;\;\;\left(y - x\right) \cdot \frac{z}{a - t}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{-t}{a - t}\\ \end{array} \]
            5. Add Preprocessing

            Alternative 12: 60.7% accurate, 0.9× speedup?

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

              1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.2499999999999999e-29 < a < 6.5000000000000002e-74

              1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{z - t}{-1 \cdot \color{blue}{t}} \]
              12. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto y \cdot \frac{z - t}{\mathsf{neg}\left(t\right)} \]
                2. lower-neg.f6458.8

                  \[\leadsto y \cdot \frac{z - t}{-t} \]
              13. Applied rewrites58.8%

                \[\leadsto y \cdot \frac{z - t}{-t} \]
            3. Recombined 2 regimes into one program.
            4. Final simplification64.5%

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

            Alternative 13: 63.2% accurate, 0.9× speedup?

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

              1. Initial program 39.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto y \cdot \frac{-1 \cdot t}{\color{blue}{a} - t} \]
              12. Step-by-step derivation
                1. mul-1-negN/A

                  \[\leadsto y \cdot \frac{\mathsf{neg}\left(t\right)}{a - t} \]
                2. lower-neg.f6455.1

                  \[\leadsto y \cdot \frac{-t}{a - t} \]
              13. Applied rewrites55.1%

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

              if -4.40000000000000028e117 < t < 4.49999999999999998e55

              1. Initial program 84.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 14: 50.4% accurate, 0.9× speedup?

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

              1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

                if -2.54999999999999984e-12 < a < 2.6999999999999999e-65

                1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 15: 62.5% accurate, 0.9× speedup?

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

                1. Initial program 24.8%

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

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

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

                  if -1.1e136 < t < 3.60000000000000016e120

                  1. Initial program 81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 3.60000000000000016e120 < t

                  1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 16: 61.2% accurate, 0.9× speedup?

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

                  1. Initial program 24.8%

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

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

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

                    if -1.1e136 < t < 2.8000000000000001e120

                    1. Initial program 81.1%

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

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

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

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

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

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

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

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

                    if 2.8000000000000001e120 < t

                    1. Initial program 37.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 17: 53.2% accurate, 1.0× speedup?

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

                    1. Initial program 40.6%

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

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

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

                      if -1.7999999999999999e67 < t < 4.7000000000000001e55

                      1. Initial program 86.1%

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

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

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

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

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

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

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

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

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

                          \[\leadsto \mathsf{fma}\left(z, \frac{y}{a}, x\right) \]
                      8. Recombined 2 regimes into one program.
                      9. Final simplification48.0%

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

                      Alternative 18: 39.7% accurate, 1.5× speedup?

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

                        1. Initial program 68.0%

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

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

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

                          if -4.9999999999999998e98 < a < -1.7e6

                          1. Initial program 91.9%

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

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

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

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

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

                              \[\leadsto x + y \]

                            if -1.7e6 < a < 8.0000000000000005e-9

                            1. Initial program 61.6%

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

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

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

                              \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -5 \cdot 10^{+98}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1700000:\\ \;\;\;\;x + y\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-9}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                            7. Add Preprocessing

                            Alternative 19: 39.1% accurate, 2.2× speedup?

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

                              1. Initial program 72.7%

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

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

                                  \[\leadsto \color{blue}{x} \]

                                if -2.4e7 < a < 8.0000000000000005e-9

                                1. Initial program 61.6%

                                  \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                2. Add Preprocessing
                                3. Taylor expanded in t around inf

                                  \[\leadsto \color{blue}{y} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites35.6%

                                    \[\leadsto \color{blue}{y} \]
                                5. Recombined 2 regimes into one program.
                                6. Final simplification38.7%

                                  \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -24000000:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 8 \cdot 10^{-9}:\\ \;\;\;\;y\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
                                7. Add Preprocessing

                                Alternative 20: 25.6% accurate, 29.0× speedup?

                                \[\begin{array}{l} \\ x \end{array} \]
                                (FPCore (x y z t a) :precision binary64 x)
                                double code(double x, double y, double z, double t, double a) {
                                	return x;
                                }
                                
                                module fmin_fmax_functions
                                    implicit none
                                    private
                                    public fmax
                                    public fmin
                                
                                    interface fmax
                                        module procedure fmax88
                                        module procedure fmax44
                                        module procedure fmax84
                                        module procedure fmax48
                                    end interface
                                    interface fmin
                                        module procedure fmin88
                                        module procedure fmin44
                                        module procedure fmin84
                                        module procedure fmin48
                                    end interface
                                contains
                                    real(8) function fmax88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmax44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmax84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmax48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin88(x, y) result (res)
                                        real(8), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(4) function fmin44(x, y) result (res)
                                        real(4), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                    end function
                                    real(8) function fmin84(x, y) result(res)
                                        real(8), intent (in) :: x
                                        real(4), intent (in) :: y
                                        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                    end function
                                    real(8) function fmin48(x, y) result(res)
                                        real(4), intent (in) :: x
                                        real(8), intent (in) :: y
                                        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                    end function
                                end module
                                
                                real(8) function code(x, y, z, t, a)
                                use fmin_fmax_functions
                                    real(8), intent (in) :: x
                                    real(8), intent (in) :: y
                                    real(8), intent (in) :: z
                                    real(8), intent (in) :: t
                                    real(8), intent (in) :: a
                                    code = x
                                end function
                                
                                public static double code(double x, double y, double z, double t, double a) {
                                	return x;
                                }
                                
                                def code(x, y, z, t, a):
                                	return x
                                
                                function code(x, y, z, t, a)
                                	return x
                                end
                                
                                function tmp = code(x, y, z, t, a)
                                	tmp = x;
                                end
                                
                                code[x_, y_, z_, t_, a_] := x
                                
                                \begin{array}{l}
                                
                                \\
                                x
                                \end{array}
                                
                                Derivation
                                1. Initial program 66.9%

                                  \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                2. Add Preprocessing
                                3. Taylor expanded in a around inf

                                  \[\leadsto \color{blue}{x} \]
                                4. Step-by-step derivation
                                  1. Applied rewrites22.5%

                                    \[\leadsto \color{blue}{x} \]
                                  2. Final simplification22.5%

                                    \[\leadsto x \]
                                  3. Add Preprocessing

                                  Developer Target 1: 87.0% accurate, 0.6× speedup?

                                  \[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\ \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\ \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                  (FPCore (x y z t a)
                                   :precision binary64
                                   (let* ((t_1 (+ x (* (/ (- y x) 1.0) (/ (- z t) (- a t))))))
                                     (if (< a -1.6153062845442575e-142)
                                       t_1
                                       (if (< a 3.774403170083174e-182) (- y (* (/ z t) (- y x))) t_1))))
                                  double code(double x, double y, double z, double t, double a) {
                                  	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                  	double tmp;
                                  	if (a < -1.6153062845442575e-142) {
                                  		tmp = t_1;
                                  	} else if (a < 3.774403170083174e-182) {
                                  		tmp = y - ((z / t) * (y - x));
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  module fmin_fmax_functions
                                      implicit none
                                      private
                                      public fmax
                                      public fmin
                                  
                                      interface fmax
                                          module procedure fmax88
                                          module procedure fmax44
                                          module procedure fmax84
                                          module procedure fmax48
                                      end interface
                                      interface fmin
                                          module procedure fmin88
                                          module procedure fmin44
                                          module procedure fmin84
                                          module procedure fmin48
                                      end interface
                                  contains
                                      real(8) function fmax88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmax44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmax84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmax48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin88(x, y) result (res)
                                          real(8), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(4) function fmin44(x, y) result (res)
                                          real(4), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                                      end function
                                      real(8) function fmin84(x, y) result(res)
                                          real(8), intent (in) :: x
                                          real(4), intent (in) :: y
                                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                                      end function
                                      real(8) function fmin48(x, y) result(res)
                                          real(4), intent (in) :: x
                                          real(8), intent (in) :: y
                                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                                      end function
                                  end module
                                  
                                  real(8) function code(x, y, z, t, a)
                                  use fmin_fmax_functions
                                      real(8), intent (in) :: x
                                      real(8), intent (in) :: y
                                      real(8), intent (in) :: z
                                      real(8), intent (in) :: t
                                      real(8), intent (in) :: a
                                      real(8) :: t_1
                                      real(8) :: tmp
                                      t_1 = x + (((y - x) / 1.0d0) * ((z - t) / (a - t)))
                                      if (a < (-1.6153062845442575d-142)) then
                                          tmp = t_1
                                      else if (a < 3.774403170083174d-182) then
                                          tmp = y - ((z / t) * (y - x))
                                      else
                                          tmp = t_1
                                      end if
                                      code = tmp
                                  end function
                                  
                                  public static double code(double x, double y, double z, double t, double a) {
                                  	double t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                  	double tmp;
                                  	if (a < -1.6153062845442575e-142) {
                                  		tmp = t_1;
                                  	} else if (a < 3.774403170083174e-182) {
                                  		tmp = y - ((z / t) * (y - x));
                                  	} else {
                                  		tmp = t_1;
                                  	}
                                  	return tmp;
                                  }
                                  
                                  def code(x, y, z, t, a):
                                  	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)))
                                  	tmp = 0
                                  	if a < -1.6153062845442575e-142:
                                  		tmp = t_1
                                  	elif a < 3.774403170083174e-182:
                                  		tmp = y - ((z / t) * (y - x))
                                  	else:
                                  		tmp = t_1
                                  	return tmp
                                  
                                  function code(x, y, z, t, a)
                                  	t_1 = Float64(x + Float64(Float64(Float64(y - x) / 1.0) * Float64(Float64(z - t) / Float64(a - t))))
                                  	tmp = 0.0
                                  	if (a < -1.6153062845442575e-142)
                                  		tmp = t_1;
                                  	elseif (a < 3.774403170083174e-182)
                                  		tmp = Float64(y - Float64(Float64(z / t) * Float64(y - x)));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	return tmp
                                  end
                                  
                                  function tmp_2 = code(x, y, z, t, a)
                                  	t_1 = x + (((y - x) / 1.0) * ((z - t) / (a - t)));
                                  	tmp = 0.0;
                                  	if (a < -1.6153062845442575e-142)
                                  		tmp = t_1;
                                  	elseif (a < 3.774403170083174e-182)
                                  		tmp = y - ((z / t) * (y - x));
                                  	else
                                  		tmp = t_1;
                                  	end
                                  	tmp_2 = tmp;
                                  end
                                  
                                  code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x + N[(N[(N[(y - x), $MachinePrecision] / 1.0), $MachinePrecision] * N[(N[(z - t), $MachinePrecision] / N[(a - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[a, -1.6153062845442575e-142], t$95$1, If[Less[a, 3.774403170083174e-182], N[(y - N[(N[(z / t), $MachinePrecision] * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
                                  
                                  \begin{array}{l}
                                  
                                  \\
                                  \begin{array}{l}
                                  t_1 := x + \frac{y - x}{1} \cdot \frac{z - t}{a - t}\\
                                  \mathbf{if}\;a < -1.6153062845442575 \cdot 10^{-142}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  \mathbf{elif}\;a < 3.774403170083174 \cdot 10^{-182}:\\
                                  \;\;\;\;y - \frac{z}{t} \cdot \left(y - x\right)\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;t\_1\\
                                  
                                  
                                  \end{array}
                                  \end{array}
                                  

                                  Reproduce

                                  ?
                                  herbie shell --seed 2025043 
                                  (FPCore (x y z t a)
                                    :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                    :precision binary64
                                  
                                    :alt
                                    (! :herbie-platform default (if (< a -646122513817703/4000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))) (if (< a 1887201585041587/50000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- y (* (/ z t) (- y x))) (+ x (* (/ (- y x) 1) (/ (- z t) (- a t)))))))
                                  
                                    (+ x (/ (* (- y x) (- z t)) (- a t))))