Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.7% → 94.8%
Time: 14.0s
Alternatives: 17
Speedup: 0.3×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 79.7% accurate, 1.0× speedup?

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

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

Alternative 1: 94.8% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 93.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
      10. flip--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
      11. clear-numN/A

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

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
      13. flip--N/A

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

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

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

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

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

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

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 45.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_3 := x + \frac{y \cdot t}{a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-283}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-301}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+298}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ (- t x) a)))
        (t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
        (t_3 (+ x (/ (* y t) a))))
   (if (<= t_2 (- INFINITY))
     t_1
     (if (<= t_2 -1e-283)
       t_3
       (if (<= t_2 1e-301)
         (/ (* x (- y a)) z)
         (if (<= t_2 5e+298) t_3 t_1))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double t_3 = x + ((y * t) / a);
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = t_1;
	} else if (t_2 <= -1e-283) {
		tmp = t_3;
	} else if (t_2 <= 1e-301) {
		tmp = (x * (y - a)) / z;
	} else if (t_2 <= 5e+298) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * ((t - x) / a);
	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
	double t_3 = x + ((y * t) / a);
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else if (t_2 <= -1e-283) {
		tmp = t_3;
	} else if (t_2 <= 1e-301) {
		tmp = (x * (y - a)) / z;
	} else if (t_2 <= 5e+298) {
		tmp = t_3;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * ((t - x) / a)
	t_2 = x + ((y - z) * ((t - x) / (a - z)))
	t_3 = x + ((y * t) / a)
	tmp = 0
	if t_2 <= -math.inf:
		tmp = t_1
	elif t_2 <= -1e-283:
		tmp = t_3
	elif t_2 <= 1e-301:
		tmp = (x * (y - a)) / z
	elif t_2 <= 5e+298:
		tmp = t_3
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(Float64(t - x) / a))
	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
	t_3 = Float64(x + Float64(Float64(y * t) / a))
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = t_1;
	elseif (t_2 <= -1e-283)
		tmp = t_3;
	elseif (t_2 <= 1e-301)
		tmp = Float64(Float64(x * Float64(y - a)) / z);
	elseif (t_2 <= 5e+298)
		tmp = t_3;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * ((t - x) / a);
	t_2 = x + ((y - z) * ((t - x) / (a - z)));
	t_3 = x + ((y * t) / a);
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = t_1;
	elseif (t_2 <= -1e-283)
		tmp = t_3;
	elseif (t_2 <= 1e-301)
		tmp = (x * (y - a)) / z;
	elseif (t_2 <= 5e+298)
		tmp = t_3;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * t), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -1e-283], t$95$3, If[LessEqual[t$95$2, 1e-301], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 5e+298], t$95$3, t$95$1]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
      10. flip--N/A

        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
      11. clear-numN/A

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

        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
      13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot \left(t - x\right)}{\color{blue}{a}} \]
    9. Step-by-step derivation
      1. Applied rewrites76.9%

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

      if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -9.99999999999999947e-284 or 1.00000000000000007e-301 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000003e298

      1. Initial program 95.1%

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

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

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

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

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

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

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

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

        if -9.99999999999999947e-284 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-301

        1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
          10. flip--N/A

            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
          11. clear-numN/A

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

            \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
          13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{x \cdot \left(y - a\right)}{\color{blue}{z}} \]
        10. Recombined 3 regimes into one program.
        11. Final simplification53.2%

          \[\leadsto \begin{array}{l} \mathbf{if}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -\infty:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq -1 \cdot 10^{-283}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 10^{-301}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;x + \left(y - z\right) \cdot \frac{t - x}{a - z} \leq 5 \cdot 10^{+298}:\\ \;\;\;\;x + \frac{y \cdot t}{a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t - x}{a}\\ \end{array} \]
        12. Add Preprocessing

        Alternative 3: 43.2% accurate, 0.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{t - x}{a}\\ t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\ t_3 := x - x \cdot \frac{y}{a}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-285}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 10^{-301}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+298}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
        (FPCore (x y z t a)
         :precision binary64
         (let* ((t_1 (* y (/ (- t x) a)))
                (t_2 (+ x (* (- y z) (/ (- t x) (- a z)))))
                (t_3 (- x (* x (/ y a)))))
           (if (<= t_2 (- INFINITY))
             t_1
             (if (<= t_2 -2e-285)
               t_3
               (if (<= t_2 1e-301)
                 (/ (* x (- y a)) z)
                 (if (<= t_2 5e+298) t_3 t_1))))))
        double code(double x, double y, double z, double t, double a) {
        	double t_1 = y * ((t - x) / a);
        	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
        	double t_3 = x - (x * (y / a));
        	double tmp;
        	if (t_2 <= -((double) INFINITY)) {
        		tmp = t_1;
        	} else if (t_2 <= -2e-285) {
        		tmp = t_3;
        	} else if (t_2 <= 1e-301) {
        		tmp = (x * (y - a)) / z;
        	} else if (t_2 <= 5e+298) {
        		tmp = t_3;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        public static double code(double x, double y, double z, double t, double a) {
        	double t_1 = y * ((t - x) / a);
        	double t_2 = x + ((y - z) * ((t - x) / (a - z)));
        	double t_3 = x - (x * (y / a));
        	double tmp;
        	if (t_2 <= -Double.POSITIVE_INFINITY) {
        		tmp = t_1;
        	} else if (t_2 <= -2e-285) {
        		tmp = t_3;
        	} else if (t_2 <= 1e-301) {
        		tmp = (x * (y - a)) / z;
        	} else if (t_2 <= 5e+298) {
        		tmp = t_3;
        	} else {
        		tmp = t_1;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a):
        	t_1 = y * ((t - x) / a)
        	t_2 = x + ((y - z) * ((t - x) / (a - z)))
        	t_3 = x - (x * (y / a))
        	tmp = 0
        	if t_2 <= -math.inf:
        		tmp = t_1
        	elif t_2 <= -2e-285:
        		tmp = t_3
        	elif t_2 <= 1e-301:
        		tmp = (x * (y - a)) / z
        	elif t_2 <= 5e+298:
        		tmp = t_3
        	else:
        		tmp = t_1
        	return tmp
        
        function code(x, y, z, t, a)
        	t_1 = Float64(y * Float64(Float64(t - x) / a))
        	t_2 = Float64(x + Float64(Float64(y - z) * Float64(Float64(t - x) / Float64(a - z))))
        	t_3 = Float64(x - Float64(x * Float64(y / a)))
        	tmp = 0.0
        	if (t_2 <= Float64(-Inf))
        		tmp = t_1;
        	elseif (t_2 <= -2e-285)
        		tmp = t_3;
        	elseif (t_2 <= 1e-301)
        		tmp = Float64(Float64(x * Float64(y - a)) / z);
        	elseif (t_2 <= 5e+298)
        		tmp = t_3;
        	else
        		tmp = t_1;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a)
        	t_1 = y * ((t - x) / a);
        	t_2 = x + ((y - z) * ((t - x) / (a - z)));
        	t_3 = x - (x * (y / a));
        	tmp = 0.0;
        	if (t_2 <= -Inf)
        		tmp = t_1;
        	elseif (t_2 <= -2e-285)
        		tmp = t_3;
        	elseif (t_2 <= 1e-301)
        		tmp = (x * (y - a)) / z;
        	elseif (t_2 <= 5e+298)
        		tmp = t_3;
        	else
        		tmp = t_1;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y - z), $MachinePrecision] * N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], t$95$1, If[LessEqual[t$95$2, -2e-285], t$95$3, If[LessEqual[t$95$2, 1e-301], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 5e+298], t$95$3, t$95$1]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := y \cdot \frac{t - x}{a}\\
        t_2 := x + \left(y - z\right) \cdot \frac{t - x}{a - z}\\
        t_3 := x - x \cdot \frac{y}{a}\\
        \mathbf{if}\;t\_2 \leq -\infty:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-285}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;t\_2 \leq 10^{-301}:\\
        \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
        
        \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+298}:\\
        \;\;\;\;t\_3\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -inf.0 or 5.0000000000000003e298 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

          1. Initial program 89.0%

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
            10. flip--N/A

              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
            11. clear-numN/A

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

              \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
            13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{y \cdot \left(t - x\right)}{\color{blue}{a}} \]
          9. Step-by-step derivation
            1. Applied rewrites76.9%

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

            if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -2.00000000000000015e-285 or 1.00000000000000007e-301 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 5.0000000000000003e298

            1. Initial program 94.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
            7. Step-by-step derivation
              1. Applied rewrites44.6%

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

              if -2.00000000000000015e-285 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.00000000000000007e-301

              1. Initial program 3.5%

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

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

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

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

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

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

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

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

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

                  \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                10. flip--N/A

                  \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                11. clear-numN/A

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

                  \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{x \cdot \left(y - a\right)}{\color{blue}{z}} \]
              9. Step-by-step derivation
                1. Applied rewrites47.9%

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

              Alternative 4: 63.2% accurate, 0.6× speedup?

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

                1. Initial program 50.5%

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                  10. flip--N/A

                    \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                  11. clear-numN/A

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

                    \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                  13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.15e102 < z < 1.5199999999999999e40

                  1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                    10. flip--N/A

                      \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                    11. clear-numN/A

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

                      \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                    13. flip--N/A

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

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

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

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

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

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

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

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

                  if 1.5199999999999999e40 < z < 4.80000000000000004e147

                  1. Initial program 93.8%

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

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

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

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

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

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

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

                  if 4.80000000000000004e147 < z < 5.09999999999999982e191

                  1. Initial program 48.6%

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

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

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

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

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

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

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

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

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

                      \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                    10. flip--N/A

                      \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                    11. clear-numN/A

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

                      \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                    13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      \[\leadsto -y \cdot \frac{t - x}{z} \]
                  10. Recombined 4 regimes into one program.
                  11. Final simplification70.7%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.15 \cdot 10^{+102}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \mathbf{elif}\;z \leq 1.52 \cdot 10^{+40}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{a}, t - x, x\right)\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{+147}:\\ \;\;\;\;\frac{\left(y - z\right) \cdot t}{a - z}\\ \mathbf{elif}\;z \leq 5.1 \cdot 10^{+191}:\\ \;\;\;\;y \cdot \frac{x - t}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \end{array} \]
                  12. Add Preprocessing

                  Alternative 5: 77.9% accurate, 0.7× speedup?

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

                    1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -6.2000000000000001e99 < z < 4.3999999999999999e48

                    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                      10. flip--N/A

                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                      11. clear-numN/A

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

                        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                      13. flip--N/A

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

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

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

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

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

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

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

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

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

                    if 4.3999999999999999e48 < z < 1.41999999999999998e135

                    1. Initial program 93.1%

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

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

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

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

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

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

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

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

                      \[\leadsto x + \frac{t \cdot \left(y - z\right)}{a} \]
                    7. Step-by-step derivation
                      1. Applied rewrites61.7%

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

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

                          \[\leadsto x + t \cdot \color{blue}{\frac{y - z}{a}} \]
                      4. Recombined 3 regimes into one program.
                      5. Final simplification82.0%

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

                      Alternative 6: 62.8% accurate, 0.7× speedup?

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

                        1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

                            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                          10. flip--N/A

                            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                          11. clear-numN/A

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

                            \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                          13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                        9. Step-by-step derivation
                          1. Applied rewrites62.6%

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

                          if -2.15e102 < z < 3e59

                          1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                            10. flip--N/A

                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                            11. clear-numN/A

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

                              \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                            13. flip--N/A

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

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

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

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

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

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

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

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

                          if 3e59 < z < 2.00000000000000012e140

                          1. Initial program 92.6%

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

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

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

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

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

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

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

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

                            \[\leadsto x + \frac{t \cdot \left(y - z\right)}{a} \]
                          7. Step-by-step derivation
                            1. Applied rewrites59.0%

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

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

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

                            Alternative 7: 68.8% accurate, 0.7× speedup?

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

                              1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

                                  \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                10. flip--N/A

                                  \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                11. clear-numN/A

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

                                  \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -6.2000000000000001e99 < z < -1.55000000000000009e-116

                                1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -1.55000000000000009e-116 < z < 9.99999999999999958e27

                                    1. Initial program 95.5%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                      10. flip--N/A

                                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                      11. clear-numN/A

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

                                        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                      13. flip--N/A

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

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

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

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

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

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

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

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

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

                                  Alternative 8: 76.4% accurate, 0.8× speedup?

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

                                    1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                      10. flip--N/A

                                        \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                      11. clear-numN/A

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

                                        \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                      13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                      if -2.15e102 < z < 2.9000000000000001e28

                                      1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                        10. flip--N/A

                                          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                        11. clear-numN/A

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

                                          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                        13. flip--N/A

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

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

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

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

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

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

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

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

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

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

                                    Alternative 9: 69.0% accurate, 0.8× speedup?

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

                                      1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                        10. flip--N/A

                                          \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                        11. clear-numN/A

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

                                          \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                        13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        if -6.39999999999999999e99 < z < 1.41999999999999998e135

                                        1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

                                      Alternative 10: 68.9% accurate, 0.9× speedup?

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

                                        1. Initial program 58.4%

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

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

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

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

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

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

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

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

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

                                            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                          10. flip--N/A

                                            \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                          11. clear-numN/A

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

                                            \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                          13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -6.2000000000000001e99 < z < 9.99999999999999958e27

                                          1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                            10. flip--N/A

                                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                            11. clear-numN/A

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

                                              \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                            13. flip--N/A

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

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

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

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

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

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

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

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

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

                                        Alternative 11: 63.3% accurate, 0.9× speedup?

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

                                          1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                            10. flip--N/A

                                              \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                            11. clear-numN/A

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

                                              \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                            13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                          9. Step-by-step derivation
                                            1. Applied rewrites62.6%

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

                                            if -2.15e102 < z < 1.88e140

                                            1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                              10. flip--N/A

                                                \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                              11. clear-numN/A

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

                                                \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                              13. flip--N/A

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

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

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

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

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

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

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

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

                                          Alternative 12: 62.1% accurate, 0.9× speedup?

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

                                            1. Initial program 50.7%

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

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

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

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

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

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

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

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

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

                                                \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                              10. flip--N/A

                                                \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                              11. clear-numN/A

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

                                                \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                              13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                            9. Step-by-step derivation
                                              1. Applied rewrites62.6%

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

                                              if -2.15e102 < z < 1.88e140

                                              1. Initial program 91.7%

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

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

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

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

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

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

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

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

                                            Alternative 13: 41.4% accurate, 0.9× speedup?

                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+115}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{elif}\;z \leq 3.7 \cdot 10^{+145}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\ \end{array} \end{array} \]
                                            (FPCore (x y z t a)
                                             :precision binary64
                                             (if (<= z -1.85e+115)
                                               (+ x (- t x))
                                               (if (<= z 3.7e+145) (- x (* x (/ y a))) (/ (* x (- y a)) z))))
                                            double code(double x, double y, double z, double t, double a) {
                                            	double tmp;
                                            	if (z <= -1.85e+115) {
                                            		tmp = x + (t - x);
                                            	} else if (z <= 3.7e+145) {
                                            		tmp = x - (x * (y / a));
                                            	} else {
                                            		tmp = (x * (y - a)) / z;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            real(8) function code(x, y, z, t, a)
                                                real(8), intent (in) :: x
                                                real(8), intent (in) :: y
                                                real(8), intent (in) :: z
                                                real(8), intent (in) :: t
                                                real(8), intent (in) :: a
                                                real(8) :: tmp
                                                if (z <= (-1.85d+115)) then
                                                    tmp = x + (t - x)
                                                else if (z <= 3.7d+145) then
                                                    tmp = x - (x * (y / a))
                                                else
                                                    tmp = (x * (y - a)) / z
                                                end if
                                                code = tmp
                                            end function
                                            
                                            public static double code(double x, double y, double z, double t, double a) {
                                            	double tmp;
                                            	if (z <= -1.85e+115) {
                                            		tmp = x + (t - x);
                                            	} else if (z <= 3.7e+145) {
                                            		tmp = x - (x * (y / a));
                                            	} else {
                                            		tmp = (x * (y - a)) / z;
                                            	}
                                            	return tmp;
                                            }
                                            
                                            def code(x, y, z, t, a):
                                            	tmp = 0
                                            	if z <= -1.85e+115:
                                            		tmp = x + (t - x)
                                            	elif z <= 3.7e+145:
                                            		tmp = x - (x * (y / a))
                                            	else:
                                            		tmp = (x * (y - a)) / z
                                            	return tmp
                                            
                                            function code(x, y, z, t, a)
                                            	tmp = 0.0
                                            	if (z <= -1.85e+115)
                                            		tmp = Float64(x + Float64(t - x));
                                            	elseif (z <= 3.7e+145)
                                            		tmp = Float64(x - Float64(x * Float64(y / a)));
                                            	else
                                            		tmp = Float64(Float64(x * Float64(y - a)) / z);
                                            	end
                                            	return tmp
                                            end
                                            
                                            function tmp_2 = code(x, y, z, t, a)
                                            	tmp = 0.0;
                                            	if (z <= -1.85e+115)
                                            		tmp = x + (t - x);
                                            	elseif (z <= 3.7e+145)
                                            		tmp = x - (x * (y / a));
                                            	else
                                            		tmp = (x * (y - a)) / z;
                                            	end
                                            	tmp_2 = tmp;
                                            end
                                            
                                            code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+115], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 3.7e+145], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x * N[(y - a), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]]
                                            
                                            \begin{array}{l}
                                            
                                            \\
                                            \begin{array}{l}
                                            \mathbf{if}\;z \leq -1.85 \cdot 10^{+115}:\\
                                            \;\;\;\;x + \left(t - x\right)\\
                                            
                                            \mathbf{elif}\;z \leq 3.7 \cdot 10^{+145}:\\
                                            \;\;\;\;x - x \cdot \frac{y}{a}\\
                                            
                                            \mathbf{else}:\\
                                            \;\;\;\;\frac{x \cdot \left(y - a\right)}{z}\\
                                            
                                            
                                            \end{array}
                                            \end{array}
                                            
                                            Derivation
                                            1. Split input into 3 regimes
                                            2. if z < -1.85000000000000003e115

                                              1. Initial program 60.2%

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

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

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

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

                                              if -1.85000000000000003e115 < z < 3.69999999999999993e145

                                              1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                if 3.69999999999999993e145 < z

                                                1. Initial program 41.0%

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{t - x}}} + x \]
                                                  10. flip--N/A

                                                    \[\leadsto \frac{y - z}{a - z} \cdot \frac{1}{\frac{1}{\color{blue}{\frac{t \cdot t - x \cdot x}{t + x}}}} + x \]
                                                  11. clear-numN/A

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

                                                    \[\leadsto \frac{y - z}{a - z} \cdot \color{blue}{\frac{t \cdot t - x \cdot x}{t + x}} + x \]
                                                  13. flip--N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \frac{x \cdot \left(y - a\right)}{\color{blue}{z}} \]
                                                9. Step-by-step derivation
                                                  1. Applied rewrites29.6%

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

                                                Alternative 14: 51.2% accurate, 1.1× speedup?

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

                                                  1. Initial program 60.2%

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

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

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

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

                                                  if -2.1499999999999998e115 < z

                                                  1. Initial program 82.5%

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

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

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

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

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

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

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

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

                                                Alternative 15: 40.4% accurate, 1.1× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.85 \cdot 10^{+115}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;x - x \cdot \frac{y}{a}\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (if (<= z -1.85e+115) (+ x (- t x)) (- x (* x (/ y a)))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if (z <= -1.85e+115) {
                                                		tmp = x + (t - x);
                                                	} else {
                                                		tmp = x - (x * (y / a));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                real(8) function code(x, y, z, t, a)
                                                    real(8), intent (in) :: x
                                                    real(8), intent (in) :: y
                                                    real(8), intent (in) :: z
                                                    real(8), intent (in) :: t
                                                    real(8), intent (in) :: a
                                                    real(8) :: tmp
                                                    if (z <= (-1.85d+115)) then
                                                        tmp = x + (t - x)
                                                    else
                                                        tmp = x - (x * (y / a))
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a) {
                                                	double tmp;
                                                	if (z <= -1.85e+115) {
                                                		tmp = x + (t - x);
                                                	} else {
                                                		tmp = x - (x * (y / a));
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a):
                                                	tmp = 0
                                                	if z <= -1.85e+115:
                                                		tmp = x + (t - x)
                                                	else:
                                                		tmp = x - (x * (y / a))
                                                	return tmp
                                                
                                                function code(x, y, z, t, a)
                                                	tmp = 0.0
                                                	if (z <= -1.85e+115)
                                                		tmp = Float64(x + Float64(t - x));
                                                	else
                                                		tmp = Float64(x - Float64(x * Float64(y / a)));
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a)
                                                	tmp = 0.0;
                                                	if (z <= -1.85e+115)
                                                		tmp = x + (t - x);
                                                	else
                                                		tmp = x - (x * (y / a));
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.85e+115], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(x - N[(x * N[(y / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                \mathbf{if}\;z \leq -1.85 \cdot 10^{+115}:\\
                                                \;\;\;\;x + \left(t - x\right)\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;x - x \cdot \frac{y}{a}\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if z < -1.85000000000000003e115

                                                  1. Initial program 60.2%

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

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

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

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

                                                  if -1.85000000000000003e115 < z

                                                  1. Initial program 82.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto x + \color{blue}{-1 \cdot \frac{x \cdot y}{a}} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites45.1%

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

                                                  Alternative 16: 19.3% accurate, 4.1× speedup?

                                                  \[\begin{array}{l} \\ x + \left(t - x\right) \end{array} \]
                                                  (FPCore (x y z t a) :precision binary64 (+ x (- t x)))
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	return x + (t - x);
                                                  }
                                                  
                                                  real(8) function code(x, y, z, t, a)
                                                      real(8), intent (in) :: x
                                                      real(8), intent (in) :: y
                                                      real(8), intent (in) :: z
                                                      real(8), intent (in) :: t
                                                      real(8), intent (in) :: a
                                                      code = x + (t - x)
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a) {
                                                  	return x + (t - x);
                                                  }
                                                  
                                                  def code(x, y, z, t, a):
                                                  	return x + (t - x)
                                                  
                                                  function code(x, y, z, t, a)
                                                  	return Float64(x + Float64(t - x))
                                                  end
                                                  
                                                  function tmp = code(x, y, z, t, a)
                                                  	tmp = x + (t - x);
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  x + \left(t - x\right)
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 79.1%

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

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

                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                  5. Applied rewrites15.2%

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

                                                  Alternative 17: 2.8% accurate, 29.0× speedup?

                                                  \[\begin{array}{l} \\ 0 \end{array} \]
                                                  (FPCore (x y z t a) :precision binary64 0.0)
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	return 0.0;
                                                  }
                                                  
                                                  real(8) function code(x, y, z, t, a)
                                                      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 = 0.0d0
                                                  end function
                                                  
                                                  public static double code(double x, double y, double z, double t, double a) {
                                                  	return 0.0;
                                                  }
                                                  
                                                  def code(x, y, z, t, a):
                                                  	return 0.0
                                                  
                                                  function code(x, y, z, t, a)
                                                  	return 0.0
                                                  end
                                                  
                                                  function tmp = code(x, y, z, t, a)
                                                  	tmp = 0.0;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := 0.0
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  0
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                    \[\leadsto x + \color{blue}{-1 \cdot x} \]
                                                  7. Step-by-step derivation
                                                    1. Applied rewrites2.8%

                                                      \[\leadsto 0 \]
                                                    2. Add Preprocessing

                                                    Reproduce

                                                    ?
                                                    herbie shell --seed 2024233 
                                                    (FPCore (x y z t a)
                                                      :name "Numeric.Signal:interpolate   from hsignal-0.2.7.1"
                                                      :precision binary64
                                                      (+ x (* (- y z) (/ (- t x) (- a z)))))