Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.8% → 95.0%
Time: 10.3s
Alternatives: 18
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 18 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.8% 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: 95.0% accurate, 0.3× speedup?

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

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

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

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


\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)))) < -9.99999999999999909e-308

    1. Initial program 86.3%

      \[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.2

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

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

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

    1. Initial program 2.9%

      \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

    1. Initial program 89.3%

      \[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-/.f6496.5

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 95.0% accurate, 0.3× speedup?

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

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

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


\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.99999999999999909e-308 or 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 87.8%

      \[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.99999999999999909e-308 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 0.0

    1. Initial program 2.9%

      \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

Alternative 3: 90.6% accurate, 0.3× speedup?

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

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

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


\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)))) < -3.9999999999999999e-200 or 2e-282 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 91.8%

      \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{0 - \color{blue}{\left(\left(\mathsf{neg}\left(x\right)\right) + t\right)}}{\mathsf{neg}\left(\left(a - z\right)\right)}, y - z, x\right) \]
      13. associate--r+N/A

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

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{x - t}{0 - \color{blue}{\left(a + \left(\mathsf{neg}\left(z\right)\right)\right)}}, y - z, x\right) \]
      20. +-commutativeN/A

        \[\leadsto \mathsf{fma}\left(\frac{x - t}{0 - \color{blue}{\left(\left(\mathsf{neg}\left(z\right)\right) + a\right)}}, y - z, x\right) \]
      21. associate--r+N/A

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

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

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

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

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

    if -3.9999999999999999e-200 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e-282

    1. Initial program 10.8%

      \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

Alternative 4: 76.4% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.32 \cdot 10^{+39} \lor \neg \left(z \leq 7.8 \cdot 10^{+28}\right):\\
\;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(-1, t, x\right), \frac{y - a}{z}, t\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.32e39 or 7.7999999999999997e28 < z

    1. Initial program 61.0%

      \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

    if -1.32e39 < z < 7.7999999999999997e28

    1. Initial program 90.3%

      \[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 a around inf

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

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

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

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

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

Alternative 5: 52.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := t - \frac{y \cdot t}{z}\\
\mathbf{if}\;z \leq -1.85 \cdot 10^{+92}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{+42}:\\
\;\;\;\;\frac{x - t}{z} \cdot y\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.84999999999999999e92 or 6.4e19 < z

    1. Initial program 60.6%

      \[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. *-commutativeN/A

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

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

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

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

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

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

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

      \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot \left(y - z\right)}{z}} \]
    7. Step-by-step derivation
      1. Applied rewrites59.4%

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

        \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
      3. Step-by-step derivation
        1. Applied rewrites56.4%

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

        if -1.84999999999999999e92 < z < -7.2000000000000002e42

        1. Initial program 67.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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

          if -7.2000000000000002e42 < z < 6.4e19

          1. Initial program 90.3%

            \[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 \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
          6. 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--.f6475.3

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

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

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

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

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

          Alternative 6: 72.3% accurate, 0.8× speedup?

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

            1. Initial program 61.0%

              \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

              if -5.29999999999999979e39 < z < 1.1500000000000001e29

              1. Initial program 90.3%

                \[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 a around inf

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

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

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

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

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

            Alternative 7: 70.9% accurate, 0.8× speedup?

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

              1. Initial program 61.0%

                \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                if -5.2e39 < z < 7.7999999999999997e28

                1. Initial program 90.3%

                  \[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--.f6480.0

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

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

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

              Alternative 8: 70.5% accurate, 0.9× speedup?

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

                1. Initial program 63.6%

                  \[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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                  if -1.9000000000000001e-5 < z < 7.6e17

                  1. Initial program 89.8%

                    \[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.4

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

                    \[\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-/.f6479.9

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

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

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

                Alternative 9: 69.1% accurate, 0.9× speedup?

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

                  1. Initial program 61.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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                    if -4.8000000000000002e39 < z < 7.6e17

                    1. Initial program 90.3%

                      \[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. *-commutativeN/A

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

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

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

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

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

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

                  Alternative 10: 62.2% accurate, 0.9× speedup?

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

                    1. Initial program 61.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. 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. +-commutativeN/A

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

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

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

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

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

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

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

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

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

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

                      if -4.60000000000000024e39 < z < 5.4e17

                      1. Initial program 90.3%

                        \[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 \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                      6. 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--.f6475.3

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

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

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

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

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

                      Alternative 11: 53.3% accurate, 0.9× speedup?

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

                        1. Initial program 89.2%

                          \[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.0

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

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

                          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                        6. 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.3

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

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

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

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

                          if -7.5e31 < a < 2.95e7

                          1. Initial program 67.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                              \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
                            3. Step-by-step derivation
                              1. Applied rewrites56.5%

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

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

                            Alternative 12: 52.3% accurate, 0.9× speedup?

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

                              1. Initial program 86.9%

                                \[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-/.f6490.3

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

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

                                \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                              6. 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--.f6466.4

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

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

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

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

                                if -7.5e31 < a < 2.95e7

                                1. Initial program 67.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                    \[\leadsto t + -1 \cdot \color{blue}{\frac{t \cdot y}{z}} \]
                                  3. Step-by-step derivation
                                    1. Applied rewrites56.5%

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

                                    if 2.95e7 < a

                                    1. Initial program 91.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. *-commutativeN/A

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

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

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

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

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

                                        \[\leadsto x + \frac{t \cdot y}{a} \]
                                    8. Recombined 3 regimes into one program.
                                    9. Final simplification59.8%

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

                                    Alternative 13: 51.7% accurate, 1.0× speedup?

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

                                      1. Initial program 59.0%

                                        \[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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

                                          \[\leadsto \left(-t\right) \cdot -1 \]
                                        3. Step-by-step derivation
                                          1. Applied rewrites52.7%

                                            \[\leadsto \left(-t\right) \cdot -1 \]

                                          if -1.35e116 < z < 1.22e20

                                          1. Initial program 88.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-/.f6493.2

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

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

                                            \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                          6. 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--.f6470.8

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

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

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

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

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

                                          Alternative 14: 34.9% accurate, 1.0× speedup?

                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+90} \lor \neg \left(z \leq 1.3 \cdot 10^{+19}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \end{array} \end{array} \]
                                          (FPCore (x y z t a)
                                           :precision binary64
                                           (if (or (<= z -3.2e+90) (not (<= z 1.3e+19))) (* (- t) -1.0) (* (/ y a) t)))
                                          double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if ((z <= -3.2e+90) || !(z <= 1.3e+19)) {
                                          		tmp = -t * -1.0;
                                          	} else {
                                          		tmp = (y / a) * t;
                                          	}
                                          	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 <= (-3.2d+90)) .or. (.not. (z <= 1.3d+19))) then
                                                  tmp = -t * (-1.0d0)
                                              else
                                                  tmp = (y / a) * t
                                              end if
                                              code = tmp
                                          end function
                                          
                                          public static double code(double x, double y, double z, double t, double a) {
                                          	double tmp;
                                          	if ((z <= -3.2e+90) || !(z <= 1.3e+19)) {
                                          		tmp = -t * -1.0;
                                          	} else {
                                          		tmp = (y / a) * t;
                                          	}
                                          	return tmp;
                                          }
                                          
                                          def code(x, y, z, t, a):
                                          	tmp = 0
                                          	if (z <= -3.2e+90) or not (z <= 1.3e+19):
                                          		tmp = -t * -1.0
                                          	else:
                                          		tmp = (y / a) * t
                                          	return tmp
                                          
                                          function code(x, y, z, t, a)
                                          	tmp = 0.0
                                          	if ((z <= -3.2e+90) || !(z <= 1.3e+19))
                                          		tmp = Float64(Float64(-t) * -1.0);
                                          	else
                                          		tmp = Float64(Float64(y / a) * t);
                                          	end
                                          	return tmp
                                          end
                                          
                                          function tmp_2 = code(x, y, z, t, a)
                                          	tmp = 0.0;
                                          	if ((z <= -3.2e+90) || ~((z <= 1.3e+19)))
                                          		tmp = -t * -1.0;
                                          	else
                                          		tmp = (y / a) * t;
                                          	end
                                          	tmp_2 = tmp;
                                          end
                                          
                                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+90], N[Not[LessEqual[z, 1.3e+19]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision]]
                                          
                                          \begin{array}{l}
                                          
                                          \\
                                          \begin{array}{l}
                                          \mathbf{if}\;z \leq -3.2 \cdot 10^{+90} \lor \neg \left(z \leq 1.3 \cdot 10^{+19}\right):\\
                                          \;\;\;\;\left(-t\right) \cdot -1\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;\frac{y}{a} \cdot t\\
                                          
                                          
                                          \end{array}
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if z < -3.19999999999999998e90 or 1.3e19 < z

                                            1. Initial program 60.6%

                                              \[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. *-commutativeN/A

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

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

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

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

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

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

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

                                              \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot \left(y - z\right)}{z}} \]
                                            7. Step-by-step derivation
                                              1. Applied rewrites59.4%

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

                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites51.8%

                                                  \[\leadsto \left(-t\right) \cdot -1 \]

                                                if -3.19999999999999998e90 < z < 1.3e19

                                                1. Initial program 88.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-/.f6493.5

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

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

                                                  \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                6. 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--.f6471.5

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

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

                                                  \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                9. Step-by-step derivation
                                                  1. Applied rewrites31.0%

                                                    \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                  2. Step-by-step derivation
                                                    1. Applied rewrites34.3%

                                                      \[\leadsto \frac{y}{a} \cdot t \]
                                                  3. Recombined 2 regimes into one program.
                                                  4. Final simplification41.0%

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

                                                  Alternative 15: 33.8% accurate, 1.0× speedup?

                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+90} \lor \neg \left(z \leq 1.3 \cdot 10^{+19}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{t}{a}\\ \end{array} \end{array} \]
                                                  (FPCore (x y z t a)
                                                   :precision binary64
                                                   (if (or (<= z -3.2e+90) (not (<= z 1.3e+19))) (* (- t) -1.0) (* y (/ t a))))
                                                  double code(double x, double y, double z, double t, double a) {
                                                  	double tmp;
                                                  	if ((z <= -3.2e+90) || !(z <= 1.3e+19)) {
                                                  		tmp = -t * -1.0;
                                                  	} else {
                                                  		tmp = y * (t / 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 <= (-3.2d+90)) .or. (.not. (z <= 1.3d+19))) then
                                                          tmp = -t * (-1.0d0)
                                                      else
                                                          tmp = y * (t / 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 <= -3.2e+90) || !(z <= 1.3e+19)) {
                                                  		tmp = -t * -1.0;
                                                  	} else {
                                                  		tmp = y * (t / a);
                                                  	}
                                                  	return tmp;
                                                  }
                                                  
                                                  def code(x, y, z, t, a):
                                                  	tmp = 0
                                                  	if (z <= -3.2e+90) or not (z <= 1.3e+19):
                                                  		tmp = -t * -1.0
                                                  	else:
                                                  		tmp = y * (t / a)
                                                  	return tmp
                                                  
                                                  function code(x, y, z, t, a)
                                                  	tmp = 0.0
                                                  	if ((z <= -3.2e+90) || !(z <= 1.3e+19))
                                                  		tmp = Float64(Float64(-t) * -1.0);
                                                  	else
                                                  		tmp = Float64(y * Float64(t / a));
                                                  	end
                                                  	return tmp
                                                  end
                                                  
                                                  function tmp_2 = code(x, y, z, t, a)
                                                  	tmp = 0.0;
                                                  	if ((z <= -3.2e+90) || ~((z <= 1.3e+19)))
                                                  		tmp = -t * -1.0;
                                                  	else
                                                  		tmp = y * (t / a);
                                                  	end
                                                  	tmp_2 = tmp;
                                                  end
                                                  
                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -3.2e+90], N[Not[LessEqual[z, 1.3e+19]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(y * N[(t / a), $MachinePrecision]), $MachinePrecision]]
                                                  
                                                  \begin{array}{l}
                                                  
                                                  \\
                                                  \begin{array}{l}
                                                  \mathbf{if}\;z \leq -3.2 \cdot 10^{+90} \lor \neg \left(z \leq 1.3 \cdot 10^{+19}\right):\\
                                                  \;\;\;\;\left(-t\right) \cdot -1\\
                                                  
                                                  \mathbf{else}:\\
                                                  \;\;\;\;y \cdot \frac{t}{a}\\
                                                  
                                                  
                                                  \end{array}
                                                  \end{array}
                                                  
                                                  Derivation
                                                  1. Split input into 2 regimes
                                                  2. if z < -3.19999999999999998e90 or 1.3e19 < z

                                                    1. Initial program 60.6%

                                                      \[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. *-commutativeN/A

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

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

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

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

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

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

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

                                                      \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot \left(y - z\right)}{z}} \]
                                                    7. Step-by-step derivation
                                                      1. Applied rewrites59.4%

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

                                                        \[\leadsto \left(-t\right) \cdot -1 \]
                                                      3. Step-by-step derivation
                                                        1. Applied rewrites51.8%

                                                          \[\leadsto \left(-t\right) \cdot -1 \]

                                                        if -3.19999999999999998e90 < z < 1.3e19

                                                        1. Initial program 88.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-/.f6493.5

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

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

                                                          \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                        6. 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--.f6471.5

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

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

                                                          \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                        9. Step-by-step derivation
                                                          1. Applied rewrites31.0%

                                                            \[\leadsto \frac{t \cdot y}{\color{blue}{a}} \]
                                                          2. Step-by-step derivation
                                                            1. Applied rewrites33.4%

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

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

                                                          Alternative 16: 39.2% accurate, 1.4× speedup?

                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4 \lor \neg \left(z \leq 6.8 \cdot 10^{+19}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                                                          (FPCore (x y z t a)
                                                           :precision binary64
                                                           (if (or (<= z -4.0) (not (<= z 6.8e+19))) (* (- t) -1.0) (* 1.0 x)))
                                                          double code(double x, double y, double z, double t, double a) {
                                                          	double tmp;
                                                          	if ((z <= -4.0) || !(z <= 6.8e+19)) {
                                                          		tmp = -t * -1.0;
                                                          	} else {
                                                          		tmp = 1.0 * x;
                                                          	}
                                                          	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 <= (-4.0d0)) .or. (.not. (z <= 6.8d+19))) then
                                                                  tmp = -t * (-1.0d0)
                                                              else
                                                                  tmp = 1.0d0 * x
                                                              end if
                                                              code = tmp
                                                          end function
                                                          
                                                          public static double code(double x, double y, double z, double t, double a) {
                                                          	double tmp;
                                                          	if ((z <= -4.0) || !(z <= 6.8e+19)) {
                                                          		tmp = -t * -1.0;
                                                          	} else {
                                                          		tmp = 1.0 * x;
                                                          	}
                                                          	return tmp;
                                                          }
                                                          
                                                          def code(x, y, z, t, a):
                                                          	tmp = 0
                                                          	if (z <= -4.0) or not (z <= 6.8e+19):
                                                          		tmp = -t * -1.0
                                                          	else:
                                                          		tmp = 1.0 * x
                                                          	return tmp
                                                          
                                                          function code(x, y, z, t, a)
                                                          	tmp = 0.0
                                                          	if ((z <= -4.0) || !(z <= 6.8e+19))
                                                          		tmp = Float64(Float64(-t) * -1.0);
                                                          	else
                                                          		tmp = Float64(1.0 * x);
                                                          	end
                                                          	return tmp
                                                          end
                                                          
                                                          function tmp_2 = code(x, y, z, t, a)
                                                          	tmp = 0.0;
                                                          	if ((z <= -4.0) || ~((z <= 6.8e+19)))
                                                          		tmp = -t * -1.0;
                                                          	else
                                                          		tmp = 1.0 * x;
                                                          	end
                                                          	tmp_2 = tmp;
                                                          end
                                                          
                                                          code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -4.0], N[Not[LessEqual[z, 6.8e+19]], $MachinePrecision]], N[((-t) * -1.0), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]
                                                          
                                                          \begin{array}{l}
                                                          
                                                          \\
                                                          \begin{array}{l}
                                                          \mathbf{if}\;z \leq -4 \lor \neg \left(z \leq 6.8 \cdot 10^{+19}\right):\\
                                                          \;\;\;\;\left(-t\right) \cdot -1\\
                                                          
                                                          \mathbf{else}:\\
                                                          \;\;\;\;1 \cdot x\\
                                                          
                                                          
                                                          \end{array}
                                                          \end{array}
                                                          
                                                          Derivation
                                                          1. Split input into 2 regimes
                                                          2. if z < -4 or 6.8e19 < z

                                                            1. Initial program 63.3%

                                                              \[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. *-commutativeN/A

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

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

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

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

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

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

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

                                                              \[\leadsto -1 \cdot \color{blue}{\frac{t \cdot \left(y - z\right)}{z}} \]
                                                            7. Step-by-step derivation
                                                              1. Applied rewrites56.6%

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

                                                                \[\leadsto \left(-t\right) \cdot -1 \]
                                                              3. Step-by-step derivation
                                                                1. Applied rewrites45.3%

                                                                  \[\leadsto \left(-t\right) \cdot -1 \]

                                                                if -4 < z < 6.8e19

                                                                1. Initial program 89.9%

                                                                  \[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.5

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

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

                                                                  \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                                6. 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--.f6476.2

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

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

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

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

                                                                    \[\leadsto 1 \cdot x \]
                                                                  3. Step-by-step derivation
                                                                    1. Applied rewrites33.0%

                                                                      \[\leadsto 1 \cdot x \]
                                                                  4. Recombined 2 regimes into one program.
                                                                  5. Final simplification38.6%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4 \lor \neg \left(z \leq 6.8 \cdot 10^{+19}\right):\\ \;\;\;\;\left(-t\right) \cdot -1\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 17: 33.3% accurate, 1.5× speedup?

                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+180} \lor \neg \left(z \leq 1.22 \cdot 10^{+20}\right):\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \end{array} \]
                                                                  (FPCore (x y z t a)
                                                                   :precision binary64
                                                                   (if (or (<= z -2.5e+180) (not (<= z 1.22e+20))) (+ x (- t x)) (* 1.0 x)))
                                                                  double code(double x, double y, double z, double t, double a) {
                                                                  	double tmp;
                                                                  	if ((z <= -2.5e+180) || !(z <= 1.22e+20)) {
                                                                  		tmp = x + (t - x);
                                                                  	} else {
                                                                  		tmp = 1.0 * x;
                                                                  	}
                                                                  	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 <= (-2.5d+180)) .or. (.not. (z <= 1.22d+20))) then
                                                                          tmp = x + (t - x)
                                                                      else
                                                                          tmp = 1.0d0 * x
                                                                      end if
                                                                      code = tmp
                                                                  end function
                                                                  
                                                                  public static double code(double x, double y, double z, double t, double a) {
                                                                  	double tmp;
                                                                  	if ((z <= -2.5e+180) || !(z <= 1.22e+20)) {
                                                                  		tmp = x + (t - x);
                                                                  	} else {
                                                                  		tmp = 1.0 * x;
                                                                  	}
                                                                  	return tmp;
                                                                  }
                                                                  
                                                                  def code(x, y, z, t, a):
                                                                  	tmp = 0
                                                                  	if (z <= -2.5e+180) or not (z <= 1.22e+20):
                                                                  		tmp = x + (t - x)
                                                                  	else:
                                                                  		tmp = 1.0 * x
                                                                  	return tmp
                                                                  
                                                                  function code(x, y, z, t, a)
                                                                  	tmp = 0.0
                                                                  	if ((z <= -2.5e+180) || !(z <= 1.22e+20))
                                                                  		tmp = Float64(x + Float64(t - x));
                                                                  	else
                                                                  		tmp = Float64(1.0 * x);
                                                                  	end
                                                                  	return tmp
                                                                  end
                                                                  
                                                                  function tmp_2 = code(x, y, z, t, a)
                                                                  	tmp = 0.0;
                                                                  	if ((z <= -2.5e+180) || ~((z <= 1.22e+20)))
                                                                  		tmp = x + (t - x);
                                                                  	else
                                                                  		tmp = 1.0 * x;
                                                                  	end
                                                                  	tmp_2 = tmp;
                                                                  end
                                                                  
                                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -2.5e+180], N[Not[LessEqual[z, 1.22e+20]], $MachinePrecision]], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(1.0 * x), $MachinePrecision]]
                                                                  
                                                                  \begin{array}{l}
                                                                  
                                                                  \\
                                                                  \begin{array}{l}
                                                                  \mathbf{if}\;z \leq -2.5 \cdot 10^{+180} \lor \neg \left(z \leq 1.22 \cdot 10^{+20}\right):\\
                                                                  \;\;\;\;x + \left(t - x\right)\\
                                                                  
                                                                  \mathbf{else}:\\
                                                                  \;\;\;\;1 \cdot x\\
                                                                  
                                                                  
                                                                  \end{array}
                                                                  \end{array}
                                                                  
                                                                  Derivation
                                                                  1. Split input into 2 regimes
                                                                  2. if z < -2.4999999999999998e180 or 1.22e20 < z

                                                                    1. Initial program 58.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--.f6439.4

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

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

                                                                    if -2.4999999999999998e180 < z < 1.22e20

                                                                    1. Initial program 87.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-/.f6491.7

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

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

                                                                      \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                                    6. 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--.f6468.2

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

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

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

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

                                                                        \[\leadsto 1 \cdot x \]
                                                                      3. Step-by-step derivation
                                                                        1. Applied rewrites30.4%

                                                                          \[\leadsto 1 \cdot x \]
                                                                      4. Recombined 2 regimes into one program.
                                                                      5. Final simplification33.2%

                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.5 \cdot 10^{+180} \lor \neg \left(z \leq 1.22 \cdot 10^{+20}\right):\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;1 \cdot x\\ \end{array} \]
                                                                      6. Add Preprocessing

                                                                      Alternative 18: 25.0% accurate, 4.8× speedup?

                                                                      \[\begin{array}{l} \\ 1 \cdot x \end{array} \]
                                                                      (FPCore (x y z t a) :precision binary64 (* 1.0 x))
                                                                      double code(double x, double y, double z, double t, double a) {
                                                                      	return 1.0 * 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 = 1.0d0 * x
                                                                      end function
                                                                      
                                                                      public static double code(double x, double y, double z, double t, double a) {
                                                                      	return 1.0 * x;
                                                                      }
                                                                      
                                                                      def code(x, y, z, t, a):
                                                                      	return 1.0 * x
                                                                      
                                                                      function code(x, y, z, t, a)
                                                                      	return Float64(1.0 * x)
                                                                      end
                                                                      
                                                                      function tmp = code(x, y, z, t, a)
                                                                      	tmp = 1.0 * x;
                                                                      end
                                                                      
                                                                      code[x_, y_, z_, t_, a_] := N[(1.0 * x), $MachinePrecision]
                                                                      
                                                                      \begin{array}{l}
                                                                      
                                                                      \\
                                                                      1 \cdot x
                                                                      \end{array}
                                                                      
                                                                      Derivation
                                                                      1. Initial program 77.8%

                                                                        \[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-/.f6485.0

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

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

                                                                        \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                                      6. 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--.f6450.2

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

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

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

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

                                                                          \[\leadsto 1 \cdot x \]
                                                                        3. Step-by-step derivation
                                                                          1. Applied rewrites23.5%

                                                                            \[\leadsto 1 \cdot x \]
                                                                          2. Final simplification23.5%

                                                                            \[\leadsto 1 \cdot x \]
                                                                          3. Add Preprocessing

                                                                          Reproduce

                                                                          ?
                                                                          herbie shell --seed 2024318 
                                                                          (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)))))