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

Percentage Accurate: 68.5% → 93.1%
Time: 5.3s
Alternatives: 20
Speedup: 0.8×

Specification

?
\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
(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]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}

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.5% accurate, 1.0× speedup?

\[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
(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]
x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}

Alternative 1: 93.1% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ t_2 := \frac{1}{y - x}\\ t_3 := \frac{\frac{x}{y - x} + \frac{t}{t - a}}{t\_2} - \frac{\frac{z}{t - a}}{t\_2}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_1 \leq 10^{-299}:\\ \;\;\;\;\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t))))
       (t_2 (/ 1.0 (- y x)))
       (t_3
        (-
         (/ (+ (/ x (- y x)) (/ t (- t a))) t_2)
         (/ (/ z (- t a)) t_2))))
  (if (<= t_1 -1e-230)
    t_3
    (if (<= t_1 1e-299)
      (-
       (+ y (* -1.0 (/ (* z (- y x)) t)))
       (* -1.0 (/ (* a (- y x)) t)))
      t_3))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x + (((y - x) * (z - t)) / (a - t));
	double t_2 = 1.0 / (y - x);
	double t_3 = (((x / (y - x)) + (t / (t - a))) / t_2) - ((z / (t - a)) / t_2);
	double tmp;
	if (t_1 <= -1e-230) {
		tmp = t_3;
	} else if (t_1 <= 1e-299) {
		tmp = (y + (-1.0 * ((z * (y - x)) / t))) - (-1.0 * ((a * (y - x)) / t));
	} else {
		tmp = t_3;
	}
	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) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = x + (((y - x) * (z - t)) / (a - t))
    t_2 = 1.0d0 / (y - x)
    t_3 = (((x / (y - x)) + (t / (t - a))) / t_2) - ((z / (t - a)) / t_2)
    if (t_1 <= (-1d-230)) then
        tmp = t_3
    else if (t_1 <= 1d-299) then
        tmp = (y + ((-1.0d0) * ((z * (y - x)) / t))) - ((-1.0d0) * ((a * (y - x)) / t))
    else
        tmp = t_3
    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) * (z - t)) / (a - t));
	double t_2 = 1.0 / (y - x);
	double t_3 = (((x / (y - x)) + (t / (t - a))) / t_2) - ((z / (t - a)) / t_2);
	double tmp;
	if (t_1 <= -1e-230) {
		tmp = t_3;
	} else if (t_1 <= 1e-299) {
		tmp = (y + (-1.0 * ((z * (y - x)) / t))) - (-1.0 * ((a * (y - x)) / t));
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = x + (((y - x) * (z - t)) / (a - t))
	t_2 = 1.0 / (y - x)
	t_3 = (((x / (y - x)) + (t / (t - a))) / t_2) - ((z / (t - a)) / t_2)
	tmp = 0
	if t_1 <= -1e-230:
		tmp = t_3
	elif t_1 <= 1e-299:
		tmp = (y + (-1.0 * ((z * (y - x)) / t))) - (-1.0 * ((a * (y - x)) / t))
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(x + Float64(Float64(Float64(y - x) * Float64(z - t)) / Float64(a - t)))
	t_2 = Float64(1.0 / Float64(y - x))
	t_3 = Float64(Float64(Float64(Float64(x / Float64(y - x)) + Float64(t / Float64(t - a))) / t_2) - Float64(Float64(z / Float64(t - a)) / t_2))
	tmp = 0.0
	if (t_1 <= -1e-230)
		tmp = t_3;
	elseif (t_1 <= 1e-299)
		tmp = Float64(Float64(y + Float64(-1.0 * Float64(Float64(z * Float64(y - x)) / t))) - Float64(-1.0 * Float64(Float64(a * Float64(y - x)) / t)));
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = x + (((y - x) * (z - t)) / (a - t));
	t_2 = 1.0 / (y - x);
	t_3 = (((x / (y - x)) + (t / (t - a))) / t_2) - ((z / (t - a)) / t_2);
	tmp = 0.0;
	if (t_1 <= -1e-230)
		tmp = t_3;
	elseif (t_1 <= 1e-299)
		tmp = (y + (-1.0 * ((z * (y - x)) / t))) - (-1.0 * ((a * (y - x)) / t));
	else
		tmp = t_3;
	end
	tmp_2 = 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]}, Block[{t$95$2 = N[(1.0 / N[(y - x), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(N[(N[(x / N[(y - x), $MachinePrecision]), $MachinePrecision] + N[(t / N[(t - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision] - N[(N[(z / N[(t - a), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-230], t$95$3, If[LessEqual[t$95$1, 1e-299], N[(N[(y + N[(-1.0 * N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$3]]]]]
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
t_2 := \frac{1}{y - x}\\
t_3 := \frac{\frac{x}{y - x} + \frac{t}{t - a}}{t\_2} - \frac{\frac{z}{t - a}}{t\_2}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\
\;\;\;\;t\_3\\

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

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


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

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{t - a}{x - y}}{z - t}}} \]
      5. div-flip-revN/A

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{a - t}{y - x}}} \]
      14. lower-/.f6480.9%

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{a - t}{y - x}}} \]
    5. Applied rewrites80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{\frac{t - z}{\color{blue}{t - a}}}{\frac{1}{y - x}} \]
      14. lower-/.f6484.9%

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

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

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

        \[\leadsto x + \color{blue}{\frac{\frac{t - z}{t - a}}{\frac{1}{y - x}}} \]
      3. add-to-fractionN/A

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

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

        \[\leadsto \frac{x \cdot \frac{1}{y - x} + \frac{\color{blue}{t - z}}{t - a}}{\frac{1}{y - x}} \]
      6. div-subN/A

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

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

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

        \[\leadsto \color{blue}{\frac{x \cdot \frac{1}{y - x} + \frac{t}{t - a}}{\frac{1}{y - x}} - \frac{\frac{z}{t - a}}{\frac{1}{y - x}}} \]
    9. Applied rewrites88.5%

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

    if -1e-230 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999999e-300

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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}} \]
    3. Step-by-step derivation
      1. 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}} \]
      2. 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} \]
      3. lower-*.f64N/A

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

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

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

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

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

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

        \[\leadsto \left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t} \]
      10. lower--.f6446.0%

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

      \[\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. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 89.4% accurate, 0.2× speedup?

\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-299}:\\ \;\;\;\;\left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - z}{t - a}, y - x, x\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
  (if (<= t_1 -1e-230)
    (fma (/ (- x y) (- t a)) (- z t) x)
    (if (<= t_1 1e-299)
      (-
       (+ y (* -1.0 (/ (* z (- y x)) t)))
       (* -1.0 (/ (* a (- y x)) t)))
      (fma (/ (- t z) (- t a)) (- y x) x)))))
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 <= -1e-230) {
		tmp = fma(((x - y) / (t - a)), (z - t), x);
	} else if (t_1 <= 1e-299) {
		tmp = (y + (-1.0 * ((z * (y - x)) / t))) - (-1.0 * ((a * (y - x)) / t));
	} else {
		tmp = fma(((t - z) / (t - a)), (y - x), x);
	}
	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 <= -1e-230)
		tmp = fma(Float64(Float64(x - y) / Float64(t - a)), Float64(z - t), x);
	elseif (t_1 <= 1e-299)
		tmp = Float64(Float64(y + Float64(-1.0 * Float64(Float64(z * Float64(y - x)) / t))) - Float64(-1.0 * Float64(Float64(a * Float64(y - x)) / t)));
	else
		tmp = fma(Float64(Float64(t - z) / Float64(t - a)), Float64(y - x), x);
	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[LessEqual[t$95$1, -1e-230], N[(N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e-299], N[(N[(y + N[(-1.0 * N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - N[(-1.0 * N[(N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\

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

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


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

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-230 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999999e-300

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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}} \]
    3. Step-by-step derivation
      1. 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}} \]
      2. 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} \]
      3. lower-*.f64N/A

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

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

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

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

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

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

        \[\leadsto \left(y + -1 \cdot \frac{z \cdot \left(y - x\right)}{t}\right) - -1 \cdot \frac{a \cdot \left(y - x\right)}{t} \]
      10. lower--.f6446.0%

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

      \[\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}} \]

    if 9.9999999999999999e-300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.4% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-299}:\\ \;\;\;\;y + -1 \cdot \frac{z \cdot \left(y - x\right) - a \cdot \left(y - x\right)}{t}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - z}{t - a}, y - x, x\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
  (if (<= t_1 -1e-230)
    (fma (/ (- x y) (- t a)) (- z t) x)
    (if (<= t_1 1e-299)
      (+ y (* -1.0 (/ (- (* z (- y x)) (* a (- y x))) t)))
      (fma (/ (- t z) (- t a)) (- y x) x)))))
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 <= -1e-230) {
		tmp = fma(((x - y) / (t - a)), (z - t), x);
	} else if (t_1 <= 1e-299) {
		tmp = y + (-1.0 * (((z * (y - x)) - (a * (y - x))) / t));
	} else {
		tmp = fma(((t - z) / (t - a)), (y - x), x);
	}
	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 <= -1e-230)
		tmp = fma(Float64(Float64(x - y) / Float64(t - a)), Float64(z - t), x);
	elseif (t_1 <= 1e-299)
		tmp = Float64(y + Float64(-1.0 * Float64(Float64(Float64(z * Float64(y - x)) - Float64(a * Float64(y - x))) / t)));
	else
		tmp = fma(Float64(Float64(t - z) / Float64(t - a)), Float64(y - x), x);
	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[LessEqual[t$95$1, -1e-230], N[(N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e-299], N[(y + N[(-1.0 * N[(N[(N[(z * N[(y - x), $MachinePrecision]), $MachinePrecision] - N[(a * N[(y - x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\

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

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


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

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-230 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999999e-300

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.3% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\ \mathbf{elif}\;t\_1 \leq 10^{-299}:\\ \;\;\;\;\frac{y \cdot \left(t - z\right)}{t - a}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - z}{t - a}, y - x, x\right)\\ \end{array} \]
(FPCore (x y z t a)
  :precision binary64
  (let* ((t_1 (+ x (/ (* (- y x) (- z t)) (- a t)))))
  (if (<= t_1 -1e-230)
    (fma (/ (- x y) (- t a)) (- z t) x)
    (if (<= t_1 1e-299)
      (/ (* y (- t z)) (- t a))
      (fma (/ (- t z) (- t a)) (- y x) x)))))
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 <= -1e-230) {
		tmp = fma(((x - y) / (t - a)), (z - t), x);
	} else if (t_1 <= 1e-299) {
		tmp = (y * (t - z)) / (t - a);
	} else {
		tmp = fma(((t - z) / (t - a)), (y - x), x);
	}
	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 <= -1e-230)
		tmp = fma(Float64(Float64(x - y) / Float64(t - a)), Float64(z - t), x);
	elseif (t_1 <= 1e-299)
		tmp = Float64(Float64(y * Float64(t - z)) / Float64(t - a));
	else
		tmp = fma(Float64(Float64(t - z) / Float64(t - a)), Float64(y - x), x);
	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[LessEqual[t$95$1, -1e-230], N[(N[(N[(x - y), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(z - t), $MachinePrecision] + x), $MachinePrecision], If[LessEqual[t$95$1, 1e-299], N[(N[(y * N[(t - z), $MachinePrecision]), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision], N[(N[(N[(t - z), $MachinePrecision] / N[(t - a), $MachinePrecision]), $MachinePrecision] * N[(y - x), $MachinePrecision] + x), $MachinePrecision]]]]
\begin{array}{l}
t_1 := x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-230}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x - y}{t - a}, z - t, x\right)\\

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

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


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

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-230 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999999e-300

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 9.9999999999999999e-300 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t)))

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.5% accurate, 0.3× speedup?

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

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

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


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

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-230 < (+.f64 x (/.f64 (*.f64 (-.f64 y x) (-.f64 z t)) (-.f64 a t))) < 9.9999999999999999e-300

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 85.1% accurate, 0.8× speedup?

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < 3.5000000000000001e146

    1. Initial program 68.5%

      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.5000000000000001e146 < t

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

Alternative 7: 73.1% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.4000000000000002e-90

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{1}{\color{blue}{\frac{\frac{t - a}{x - y}}{z - t}}} \]
      5. div-flip-revN/A

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

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

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

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

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

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

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

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

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{a - t}{y - x}}} \]
      14. lower-/.f6480.9%

        \[\leadsto x + \frac{z - t}{\color{blue}{\frac{a - t}{y - x}}} \]
    5. Applied rewrites80.9%

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

      \[\leadsto x + \frac{z - t}{\frac{a - t}{\color{blue}{y}}} \]
    7. Step-by-step derivation
      1. Applied rewrites64.5%

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

      if -2.4000000000000002e-90 < y < 2.7999999999999999e-56

      1. Initial program 68.5%

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

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

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

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

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

      if 2.7999999999999999e-56 < y

      1. Initial program 68.5%

        \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
      2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 72.5% accurate, 0.8× speedup?

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

        1. Initial program 68.5%

          \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
        2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -2.4000000000000002e-90 < y < 2.7999999999999999e-56

          1. Initial program 68.5%

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

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

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

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

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

        Alternative 9: 71.6% accurate, 0.8× speedup?

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

          1. Initial program 68.5%

            \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
          2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -1.4e-34 < y < 3.0999999999999999e-96

            1. Initial program 68.5%

              \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
            2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 62.8% accurate, 0.8× speedup?

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

            1. Initial program 68.5%

              \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
            2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \mathsf{fma}\left(\frac{t - z}{t}, y - x, x\right) \]
              3. div-subN/A

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

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

                \[\leadsto \mathsf{fma}\left(1 - \color{blue}{\frac{z}{t}}, y - x, x\right) \]
              6. lower-/.f6440.0%

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

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

            if -2.1e10 < t < 1.25e14

            1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

                \[\leadsto x + \frac{y - x}{a} \cdot \color{blue}{z} \]
              6. lower-/.f6448.3%

                \[\leadsto x + \frac{y - x}{a} \cdot z \]
            6. Applied rewrites48.3%

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

          Alternative 11: 62.3% accurate, 0.9× speedup?

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

            1. Initial program 68.5%

              \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
            2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.2e18 < t < 11000

              1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto x + \frac{y - x}{a} \cdot \color{blue}{z} \]
                6. lower-/.f6448.3%

                  \[\leadsto x + \frac{y - x}{a} \cdot z \]
              6. Applied rewrites48.3%

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

            Alternative 12: 61.8% accurate, 0.9× speedup?

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

              1. Initial program 68.5%

                \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
              2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -2.2e18 < t < 11000

                1. Initial program 68.5%

                  \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 13: 54.7% accurate, 0.9× speedup?

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

                1. Initial program 68.5%

                  \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2400 < t < 1.5e-16

                  1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto x + \frac{y - x}{a} \cdot \color{blue}{z} \]
                    6. lower-/.f6448.3%

                      \[\leadsto x + \frac{y - x}{a} \cdot z \]
                  6. Applied rewrites48.3%

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

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

                      \[\leadsto x + \frac{y}{a} \cdot z \]
                  9. Recombined 2 regimes into one program.
                  10. Add Preprocessing

                  Alternative 14: 47.0% accurate, 0.8× speedup?

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

                    1. Initial program 68.5%

                      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                    2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]
                    8. Step-by-step derivation
                      1. Applied rewrites19.8%

                        \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]

                      if -1.4e126 < t < -2.9500000000000002

                      1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                        4. lower--.f6425.4%

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

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

                        \[\leadsto x \cdot \left(1 + -1\right) \]
                      9. Step-by-step derivation
                        1. Applied rewrites2.8%

                          \[\leadsto x \cdot \left(1 + -1\right) \]
                        2. Taylor expanded in t around -inf

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

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

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

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

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

                        if -2.9500000000000002 < t < 3100

                        1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto x + \frac{y - x}{a} \cdot \color{blue}{z} \]
                          6. lower-/.f6448.3%

                            \[\leadsto x + \frac{y - x}{a} \cdot z \]
                        6. Applied rewrites48.3%

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

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

                            \[\leadsto x + \frac{y}{a} \cdot z \]
                        9. Recombined 3 regimes into one program.
                        10. Add Preprocessing

                        Alternative 15: 35.8% accurate, 0.8× speedup?

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

                          1. Initial program 68.5%

                            \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                          2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]
                          8. Step-by-step derivation
                            1. Applied rewrites19.8%

                              \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]

                            if -1.4e126 < t < -2.9500000000000002

                            1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                              4. lower--.f6425.4%

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

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

                              \[\leadsto x \cdot \left(1 + -1\right) \]
                            9. Step-by-step derivation
                              1. Applied rewrites2.8%

                                \[\leadsto x \cdot \left(1 + -1\right) \]
                              2. Taylor expanded in t around -inf

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

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

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

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

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

                              if -2.9500000000000002 < t < 5.8e-5

                              1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                4. lower--.f6425.4%

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

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

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

                                  \[\leadsto x \cdot \left(1 + \frac{t}{a}\right) \]
                              10. Recombined 3 regimes into one program.
                              11. Add Preprocessing

                              Alternative 16: 35.0% accurate, 0.9× speedup?

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

                                1. Initial program 68.5%

                                  \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]
                                8. Step-by-step derivation
                                  1. Applied rewrites19.8%

                                    \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]

                                  if -1.4e126 < t < -2.9500000000000002

                                  1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                    4. lower--.f6425.4%

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

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

                                    \[\leadsto x \cdot \left(1 + -1\right) \]
                                  9. Step-by-step derivation
                                    1. Applied rewrites2.8%

                                      \[\leadsto x \cdot \left(1 + -1\right) \]
                                    2. Taylor expanded in t around -inf

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

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

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

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

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

                                    if -2.9500000000000002 < t < 1e13

                                    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                      4. lower--.f6425.4%

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

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

                                      \[\leadsto x \cdot \left(1 + -1\right) \]
                                    9. Step-by-step derivation
                                      1. Applied rewrites2.8%

                                        \[\leadsto x \cdot \left(1 + -1\right) \]
                                      2. Taylor expanded in t around 0

                                        \[\leadsto x \cdot 1 \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites25.1%

                                          \[\leadsto x \cdot 1 \]
                                      4. Recombined 3 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 17: 34.8% accurate, 0.9× speedup?

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

                                        1. Initial program 68.5%

                                          \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                        2. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]
                                        8. Step-by-step derivation
                                          1. Applied rewrites19.8%

                                            \[\leadsto \mathsf{fma}\left(1, y - x, x\right) \]

                                          if -6.7999999999999994e107 < t < -2.9500000000000002

                                          1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{x \cdot z}{t} \]
                                            2. lower-*.f6416.9%

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

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

                                          if -2.9500000000000002 < t < 1e13

                                          1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                            4. lower--.f6425.4%

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

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

                                            \[\leadsto x \cdot \left(1 + -1\right) \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites2.8%

                                              \[\leadsto x \cdot \left(1 + -1\right) \]
                                            2. Taylor expanded in t around 0

                                              \[\leadsto x \cdot 1 \]
                                            3. Step-by-step derivation
                                              1. Applied rewrites25.1%

                                                \[\leadsto x \cdot 1 \]
                                            4. Recombined 3 regimes into one program.
                                            5. Add Preprocessing

                                            Alternative 18: 34.5% accurate, 1.2× speedup?

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

                                              1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                                4. lower--.f6425.4%

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

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

                                                \[\leadsto x \cdot \left(1 + -1\right) \]
                                              9. Step-by-step derivation
                                                1. Applied rewrites2.8%

                                                  \[\leadsto x \cdot \left(1 + -1\right) \]
                                                2. Taylor expanded in t around 0

                                                  \[\leadsto x \cdot 1 \]
                                                3. Step-by-step derivation
                                                  1. Applied rewrites25.1%

                                                    \[\leadsto x \cdot 1 \]

                                                  if -1.0200000000000001e-52 < a < 2.0000000000000002e-30

                                                  1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

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

                                                      \[\leadsto \frac{x \cdot z}{t} \]
                                                    2. lower-*.f6416.9%

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

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

                                                      \[\leadsto \frac{x \cdot z}{t} \]
                                                    2. lift-*.f64N/A

                                                      \[\leadsto \frac{x \cdot z}{t} \]
                                                    3. associate-/l*N/A

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

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

                                                      \[\leadsto \frac{z}{t} \cdot x \]
                                                    6. lower-/.f6419.2%

                                                      \[\leadsto \frac{z}{t} \cdot x \]
                                                  9. Applied rewrites19.2%

                                                    \[\leadsto \frac{z}{t} \cdot x \]
                                                4. Recombined 2 regimes into one program.
                                                5. Add Preprocessing

                                                Alternative 19: 34.2% accurate, 1.2× speedup?

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

                                                  1. Initial program 68.5%

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

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

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

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

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

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

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

                                                      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \color{blue}{\frac{t}{a - t}}\right)\right)\right) \]
                                                    7. lower-/.f64N/A

                                                      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
                                                    8. lower--.f6447.5%

                                                      \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - \color{blue}{t}}\right)\right)\right) \]
                                                  4. Applied rewrites47.5%

                                                    \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                  5. Taylor expanded in z around 0

                                                    \[\leadsto x \cdot \color{blue}{\left(1 + \frac{t}{a - t}\right)} \]
                                                  6. Step-by-step derivation
                                                    1. lower-*.f64N/A

                                                      \[\leadsto x \cdot \left(1 + \color{blue}{\frac{t}{a - t}}\right) \]
                                                    2. lower-+.f64N/A

                                                      \[\leadsto x \cdot \left(1 + \frac{t}{\color{blue}{a - t}}\right) \]
                                                    3. lower-/.f64N/A

                                                      \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                                    4. lower--.f6425.4%

                                                      \[\leadsto x \cdot \left(1 + \frac{t}{a - t}\right) \]
                                                  7. Applied rewrites25.4%

                                                    \[\leadsto x \cdot \color{blue}{\left(1 + \frac{t}{a - t}\right)} \]
                                                  8. Taylor expanded in t around inf

                                                    \[\leadsto x \cdot \left(1 + -1\right) \]
                                                  9. Step-by-step derivation
                                                    1. Applied rewrites2.8%

                                                      \[\leadsto x \cdot \left(1 + -1\right) \]
                                                    2. Taylor expanded in t around 0

                                                      \[\leadsto x \cdot 1 \]
                                                    3. Step-by-step derivation
                                                      1. Applied rewrites25.1%

                                                        \[\leadsto x \cdot 1 \]

                                                      if -1.0200000000000001e-52 < a < 2.0000000000000002e-30

                                                      1. Initial program 68.5%

                                                        \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                      2. Taylor expanded in x around -inf

                                                        \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                      3. Step-by-step derivation
                                                        1. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                        2. lower-*.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \color{blue}{\left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)}\right) \]
                                                        3. lower--.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \color{blue}{\left(1 + \frac{t}{a - t}\right)}\right)\right) \]
                                                        4. lower-/.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(\color{blue}{1} + \frac{t}{a - t}\right)\right)\right) \]
                                                        5. lower--.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right) \]
                                                        6. lower-+.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \color{blue}{\frac{t}{a - t}}\right)\right)\right) \]
                                                        7. lower-/.f64N/A

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
                                                        8. lower--.f6447.5%

                                                          \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - \color{blue}{t}}\right)\right)\right) \]
                                                      4. Applied rewrites47.5%

                                                        \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                      5. Taylor expanded in a around 0

                                                        \[\leadsto \frac{x \cdot z}{\color{blue}{t}} \]
                                                      6. Step-by-step derivation
                                                        1. lower-/.f64N/A

                                                          \[\leadsto \frac{x \cdot z}{t} \]
                                                        2. lower-*.f6416.9%

                                                          \[\leadsto \frac{x \cdot z}{t} \]
                                                      7. Applied rewrites16.9%

                                                        \[\leadsto \frac{x \cdot z}{\color{blue}{t}} \]
                                                      8. Step-by-step derivation
                                                        1. lift-/.f64N/A

                                                          \[\leadsto \frac{x \cdot z}{t} \]
                                                        2. lift-*.f64N/A

                                                          \[\leadsto \frac{x \cdot z}{t} \]
                                                        3. *-commutativeN/A

                                                          \[\leadsto \frac{z \cdot x}{t} \]
                                                        4. associate-/l*N/A

                                                          \[\leadsto z \cdot \frac{x}{\color{blue}{t}} \]
                                                        5. frac-2neg-revN/A

                                                          \[\leadsto z \cdot \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(t\right)} \]
                                                        6. lift-neg.f64N/A

                                                          \[\leadsto z \cdot \frac{-x}{\mathsf{neg}\left(t\right)} \]
                                                        7. lower-*.f64N/A

                                                          \[\leadsto z \cdot \frac{-x}{\color{blue}{\mathsf{neg}\left(t\right)}} \]
                                                        8. lift-neg.f64N/A

                                                          \[\leadsto z \cdot \frac{\mathsf{neg}\left(x\right)}{\mathsf{neg}\left(t\right)} \]
                                                        9. frac-2neg-revN/A

                                                          \[\leadsto z \cdot \frac{x}{t} \]
                                                        10. lower-/.f6418.1%

                                                          \[\leadsto z \cdot \frac{x}{t} \]
                                                      9. Applied rewrites18.1%

                                                        \[\leadsto z \cdot \frac{x}{\color{blue}{t}} \]
                                                    4. Recombined 2 regimes into one program.
                                                    5. Add Preprocessing

                                                    Alternative 20: 25.1% accurate, 4.5× speedup?

                                                    \[x \cdot 1 \]
                                                    (FPCore (x y z t a)
                                                      :precision binary64
                                                      (* x 1.0))
                                                    double code(double x, double y, double z, double t, double a) {
                                                    	return x * 1.0;
                                                    }
                                                    
                                                    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 * 1.0d0
                                                    end function
                                                    
                                                    public static double code(double x, double y, double z, double t, double a) {
                                                    	return x * 1.0;
                                                    }
                                                    
                                                    def code(x, y, z, t, a):
                                                    	return x * 1.0
                                                    
                                                    function code(x, y, z, t, a)
                                                    	return Float64(x * 1.0)
                                                    end
                                                    
                                                    function tmp = code(x, y, z, t, a)
                                                    	tmp = x * 1.0;
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_] := N[(x * 1.0), $MachinePrecision]
                                                    
                                                    x \cdot 1
                                                    
                                                    Derivation
                                                    1. Initial program 68.5%

                                                      \[x + \frac{\left(y - x\right) \cdot \left(z - t\right)}{a - t} \]
                                                    2. Taylor expanded in x around -inf

                                                      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                    3. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto -1 \cdot \color{blue}{\left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                      2. lower-*.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \color{blue}{\left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)}\right) \]
                                                      3. lower--.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \color{blue}{\left(1 + \frac{t}{a - t}\right)}\right)\right) \]
                                                      4. lower-/.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(\color{blue}{1} + \frac{t}{a - t}\right)\right)\right) \]
                                                      5. lower--.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right) \]
                                                      6. lower-+.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \color{blue}{\frac{t}{a - t}}\right)\right)\right) \]
                                                      7. lower-/.f64N/A

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{\color{blue}{a - t}}\right)\right)\right) \]
                                                      8. lower--.f6447.5%

                                                        \[\leadsto -1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - \color{blue}{t}}\right)\right)\right) \]
                                                    4. Applied rewrites47.5%

                                                      \[\leadsto \color{blue}{-1 \cdot \left(x \cdot \left(\frac{z}{a - t} - \left(1 + \frac{t}{a - t}\right)\right)\right)} \]
                                                    5. Taylor expanded in z around 0

                                                      \[\leadsto x \cdot \color{blue}{\left(1 + \frac{t}{a - t}\right)} \]
                                                    6. Step-by-step derivation
                                                      1. lower-*.f64N/A

                                                        \[\leadsto x \cdot \left(1 + \color{blue}{\frac{t}{a - t}}\right) \]
                                                      2. lower-+.f64N/A

                                                        \[\leadsto x \cdot \left(1 + \frac{t}{\color{blue}{a - t}}\right) \]
                                                      3. lower-/.f64N/A

                                                        \[\leadsto x \cdot \left(1 + \frac{t}{a - \color{blue}{t}}\right) \]
                                                      4. lower--.f6425.4%

                                                        \[\leadsto x \cdot \left(1 + \frac{t}{a - t}\right) \]
                                                    7. Applied rewrites25.4%

                                                      \[\leadsto x \cdot \color{blue}{\left(1 + \frac{t}{a - t}\right)} \]
                                                    8. Taylor expanded in t around inf

                                                      \[\leadsto x \cdot \left(1 + -1\right) \]
                                                    9. Step-by-step derivation
                                                      1. Applied rewrites2.8%

                                                        \[\leadsto x \cdot \left(1 + -1\right) \]
                                                      2. Taylor expanded in t around 0

                                                        \[\leadsto x \cdot 1 \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites25.1%

                                                          \[\leadsto x \cdot 1 \]
                                                        2. Add Preprocessing

                                                        Reproduce

                                                        ?
                                                        herbie shell --seed 2025212 
                                                        (FPCore (x y z t a)
                                                          :name "Graphics.Rendering.Chart.Axis.Types:linMap from Chart-1.5.3"
                                                          :precision binary64
                                                          (+ x (/ (* (- y x) (- z t)) (- a t))))