Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 79.4% → 92.2%
Time: 11.4s
Alternatives: 20
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 20 alternatives:

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

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

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

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

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

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+46}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_3 \leq 10^{+296}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 99.6%

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

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

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

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

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

        \[\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--.f6499.6

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

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

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

    1. Initial program 3.2%

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

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

    if 0.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e46 or 9.99999999999999981e295 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e46 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999981e295

    1. Initial program 99.0%

      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
    2. Add Preprocessing
  3. Recombined 4 regimes into one program.
  4. Final simplification98.3%

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

Alternative 2: 78.5% accurate, 0.2× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+296}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < -4.99999999999999961e-227 or 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999981e295

    1. Initial program 94.4%

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

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

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

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

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

    if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309

    1. Initial program 3.2%

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

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

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

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

      \[\leadsto x + -1 \cdot \color{blue}{x} \]
    7. Step-by-step derivation
      1. Applied rewrites3.2%

        \[\leadsto x + \left(-x\right) \]
      2. 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}} \]
      3. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 91.8% accurate, 0.2× speedup?

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

      1. Initial program 99.6%

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

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

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

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

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

          \[\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--.f6499.6

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

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

      if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309

      1. Initial program 3.2%

        \[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.1%

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

      if 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 9.99999999999999961e-81

      1. Initial program 52.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 95.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 x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
        2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{y - z}{\frac{z - a}{\color{blue}{x} - t}} \]
        23. lower--.f6496.6

          \[\leadsto x + \frac{y - z}{\frac{z - a}{\color{blue}{x - t}}} \]
      4. Applied rewrites96.6%

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

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

    Alternative 4: 92.0% accurate, 0.2× speedup?

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

      1. Initial program 99.6%

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

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

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

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

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

          \[\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--.f6499.6

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

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

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

      1. Initial program 3.2%

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

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

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

      1. Initial program 50.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 x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
        2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 95.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 x + \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} \]
        2. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto x + \frac{y - z}{\frac{z - a}{\color{blue}{x} - t}} \]
        23. lower--.f6496.6

          \[\leadsto x + \frac{y - z}{\frac{z - a}{\color{blue}{x - t}}} \]
      4. Applied rewrites96.6%

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

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

    Alternative 5: 90.5% accurate, 0.3× speedup?

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

      1. Initial program 99.6%

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

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

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

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

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

          \[\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--.f6499.6

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

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

      if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309

      1. Initial program 3.2%

        \[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.1%

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

      if 1.9999999999999988e-309 < (+.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. Recombined 3 regimes into one program.
    4. Final simplification93.8%

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

    Alternative 6: 90.6% accurate, 0.3× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - t}{z - a}\\ t_2 := \mathsf{fma}\left(t\_1, y - z, x\right)\\ t_3 := x - \left(z - y\right) \cdot t\_1\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{-227}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-309}:\\ \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
    (FPCore (x y z t a)
     :precision binary64
     (let* ((t_1 (/ (- x t) (- z a)))
            (t_2 (fma t_1 (- y z) x))
            (t_3 (- x (* (- z y) t_1))))
       (if (<= t_3 -5e-227)
         t_2
         (if (<= t_3 2e-309) (fma (fma t -1.0 x) (/ (- y a) z) t) t_2))))
    double code(double x, double y, double z, double t, double a) {
    	double t_1 = (x - t) / (z - a);
    	double t_2 = fma(t_1, (y - z), x);
    	double t_3 = x - ((z - y) * t_1);
    	double tmp;
    	if (t_3 <= -5e-227) {
    		tmp = t_2;
    	} else if (t_3 <= 2e-309) {
    		tmp = fma(fma(t, -1.0, x), ((y - a) / z), t);
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a)
    	t_1 = Float64(Float64(x - t) / Float64(z - a))
    	t_2 = fma(t_1, Float64(y - z), x)
    	t_3 = Float64(x - Float64(Float64(z - y) * t_1))
    	tmp = 0.0
    	if (t_3 <= -5e-227)
    		tmp = t_2;
    	elseif (t_3 <= 2e-309)
    		tmp = fma(fma(t, -1.0, x), Float64(Float64(y - a) / z), t);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] / N[(z - a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[(y - z), $MachinePrecision] + x), $MachinePrecision]}, Block[{t$95$3 = N[(x - N[(N[(z - y), $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e-227], t$95$2, If[LessEqual[t$95$3, 2e-309], N[(N[(t * -1.0 + x), $MachinePrecision] * N[(N[(y - a), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], t$95$2]]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{x - t}{z - a}\\
    t_2 := \mathsf{fma}\left(t\_1, y - z, x\right)\\
    t_3 := x - \left(z - y\right) \cdot t\_1\\
    \mathbf{if}\;t\_3 \leq -5 \cdot 10^{-227}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{-309}:\\
    \;\;\;\;\mathsf{fma}\left(\mathsf{fma}\left(t, -1, x\right), \frac{y - a}{z}, t\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \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)))) < -4.99999999999999961e-227 or 1.9999999999999988e-309 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

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

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

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

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

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

      if -4.99999999999999961e-227 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.9999999999999988e-309

      1. Initial program 3.2%

        \[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.1%

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

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

    Alternative 7: 77.4% accurate, 0.6× speedup?

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

      1. Initial program 60.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 rewrites92.0%

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

      if -1.12000000000000005e120 < z < -4.59999999999999989e-178 or 8.0000000000000003e-135 < z < 9.30000000000000017e80

      1. Initial program 92.4%

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

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

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

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

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

      if -4.59999999999999989e-178 < z < 8.0000000000000003e-135

      1. Initial program 95.4%

        \[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. associate-/l*N/A

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

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

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

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

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

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

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

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

    Alternative 8: 72.3% accurate, 0.6× speedup?

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

      1. Initial program 87.9%

        \[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. associate-/l*N/A

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

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

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

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

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

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

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

      if -1.35e50 < a < -6.0999999999999998e-173

      1. Initial program 75.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--.f6422.6

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

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

        \[\leadsto x + -1 \cdot \color{blue}{x} \]
      7. Step-by-step derivation
        1. Applied rewrites2.5%

          \[\leadsto x + \left(-x\right) \]
        2. 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}} \]
        3. 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. associate-*r/N/A

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

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

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

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

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

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

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

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

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

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

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

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

        if -6.0999999999999998e-173 < a < 2.25000000000000008e-107

        1. Initial program 79.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 rewrites91.1%

          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites93.6%

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

          if 2.25000000000000008e-107 < a < 7.4999999999999998e28

          1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 71.6% accurate, 0.7× speedup?

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

          1. Initial program 88.5%

            \[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. associate-/l*N/A

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

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

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

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

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

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

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

          if -5.29999999999999961e78 < a < 2.25000000000000008e-107

          1. Initial program 77.5%

            \[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 rewrites85.1%

            \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites80.9%

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

            if 2.25000000000000008e-107 < a < 7.4999999999999998e28

            1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
          8. Recombined 3 regimes into one program.
          9. Final simplification78.5%

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

          Alternative 10: 68.2% accurate, 0.7× speedup?

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

            1. Initial program 88.5%

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

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

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

                \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
              3. *-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--.f6471.8

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

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

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

              if -5.29999999999999961e78 < a < 2.25000000000000008e-107

              1. Initial program 77.5%

                \[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 rewrites85.1%

                \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites80.9%

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

                if 2.25000000000000008e-107 < a < 7.4999999999999998e28

                1. Initial program 78.2%

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t}{a - z}} \]
              8. Recombined 3 regimes into one program.
              9. Final simplification75.4%

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

              Alternative 11: 68.2% accurate, 0.9× speedup?

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

                1. Initial program 88.8%

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

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

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

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

                  if -5.29999999999999961e78 < a < 1.42e10

                  1. Initial program 77.2%

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

                    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites73.7%

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

                  Alternative 12: 63.9% accurate, 0.9× speedup?

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

                    1. Initial program 88.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--.f6472.1

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

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

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

                        \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]
                      2. Taylor expanded in x around inf

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

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

                        if -5.29999999999999961e78 < a < 8.2000000000000003e40

                        1. Initial program 77.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 rewrites77.8%

                          \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites73.0%

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

                          if 8.2000000000000003e40 < a

                          1. Initial program 89.6%

                            \[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. associate-/l*N/A

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

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

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

                              \[\leadsto x + \color{blue}{\frac{t - x}{a}} \cdot y \]
                            5. lower--.f6471.1

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

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

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

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

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

                          Alternative 13: 54.4% accurate, 0.9× speedup?

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

                            1. Initial program 60.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 rewrites92.8%

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

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

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

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

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

                                if -4.00000000000000023e136 < z < 3.04999999999999988e80

                                1. Initial program 92.9%

                                  \[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. associate-/l*N/A

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

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

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

                                    \[\leadsto x + \color{blue}{\frac{t - x}{a}} \cdot y \]
                                  5. lower--.f6464.8

                                    \[\leadsto x + \frac{\color{blue}{t - x}}{a} \cdot y \]
                                5. Applied rewrites64.8%

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

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

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

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

                                Alternative 14: 53.6% accurate, 0.9× speedup?

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

                                  1. Initial program 60.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 rewrites92.8%

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

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

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

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

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

                                      if -4.00000000000000023e136 < z < 3.04999999999999988e80

                                      1. Initial program 92.9%

                                        \[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--.f6464.8

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

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

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

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

                                      Alternative 15: 48.3% accurate, 0.9× speedup?

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

                                        1. Initial program 85.5%

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

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

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

                                            \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                          3. *-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--.f6463.3

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

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

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

                                            \[\leadsto \frac{y \cdot t}{\color{blue}{a}} \]
                                          2. Taylor expanded in x around inf

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

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

                                            if -1.1000000000000001e-6 < a < 6.80000000000000004e-108

                                            1. Initial program 78.1%

                                              \[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 rewrites87.9%

                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(t, -1, 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 rewrites50.7%

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

                                              if 6.80000000000000004e-108 < a

                                              1. Initial program 83.7%

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

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

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

                                                  \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                                3. *-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--.f6460.1

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(\frac{t}{a}, y, x\right) \]
                                              8. Recombined 3 regimes into one program.
                                              9. Add Preprocessing

                                              Alternative 16: 46.9% accurate, 1.0× speedup?

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

                                                1. Initial program 60.6%

                                                  \[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--.f6444.6

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

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

                                                if -7.60000000000000029e136 < z < 3.89999999999999976e82

                                                1. Initial program 92.9%

                                                  \[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--.f6464.8

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

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

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

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

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

                                                Alternative 17: 28.9% accurate, 1.0× speedup?

                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) + x\\ \mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.000185:\\ \;\;\;\;\frac{y}{a} \cdot t\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                (FPCore (x y z t a)
                                                 :precision binary64
                                                 (let* ((t_1 (+ (- t x) x)))
                                                   (if (<= z -8e-101) t_1 (if (<= z 0.000185) (* (/ y a) t) t_1))))
                                                double code(double x, double y, double z, double t, double a) {
                                                	double t_1 = (t - x) + x;
                                                	double tmp;
                                                	if (z <= -8e-101) {
                                                		tmp = t_1;
                                                	} else if (z <= 0.000185) {
                                                		tmp = (y / a) * t;
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	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) :: t_1
                                                    real(8) :: tmp
                                                    t_1 = (t - x) + x
                                                    if (z <= (-8d-101)) then
                                                        tmp = t_1
                                                    else if (z <= 0.000185d0) then
                                                        tmp = (y / a) * t
                                                    else
                                                        tmp = t_1
                                                    end if
                                                    code = tmp
                                                end function
                                                
                                                public static double code(double x, double y, double z, double t, double a) {
                                                	double t_1 = (t - x) + x;
                                                	double tmp;
                                                	if (z <= -8e-101) {
                                                		tmp = t_1;
                                                	} else if (z <= 0.000185) {
                                                		tmp = (y / a) * t;
                                                	} else {
                                                		tmp = t_1;
                                                	}
                                                	return tmp;
                                                }
                                                
                                                def code(x, y, z, t, a):
                                                	t_1 = (t - x) + x
                                                	tmp = 0
                                                	if z <= -8e-101:
                                                		tmp = t_1
                                                	elif z <= 0.000185:
                                                		tmp = (y / a) * t
                                                	else:
                                                		tmp = t_1
                                                	return tmp
                                                
                                                function code(x, y, z, t, a)
                                                	t_1 = Float64(Float64(t - x) + x)
                                                	tmp = 0.0
                                                	if (z <= -8e-101)
                                                		tmp = t_1;
                                                	elseif (z <= 0.000185)
                                                		tmp = Float64(Float64(y / a) * t);
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	return tmp
                                                end
                                                
                                                function tmp_2 = code(x, y, z, t, a)
                                                	t_1 = (t - x) + x;
                                                	tmp = 0.0;
                                                	if (z <= -8e-101)
                                                		tmp = t_1;
                                                	elseif (z <= 0.000185)
                                                		tmp = (y / a) * t;
                                                	else
                                                		tmp = t_1;
                                                	end
                                                	tmp_2 = tmp;
                                                end
                                                
                                                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8e-101], t$95$1, If[LessEqual[z, 0.000185], N[(N[(y / a), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
                                                
                                                \begin{array}{l}
                                                
                                                \\
                                                \begin{array}{l}
                                                t_1 := \left(t - x\right) + x\\
                                                \mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                \mathbf{elif}\;z \leq 0.000185:\\
                                                \;\;\;\;\frac{y}{a} \cdot t\\
                                                
                                                \mathbf{else}:\\
                                                \;\;\;\;t\_1\\
                                                
                                                
                                                \end{array}
                                                \end{array}
                                                
                                                Derivation
                                                1. Split input into 2 regimes
                                                2. if z < -8.00000000000000041e-101 or 1.85e-4 < z

                                                  1. Initial program 73.7%

                                                    \[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--.f6433.1

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

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

                                                  if -8.00000000000000041e-101 < z < 1.85e-4

                                                  1. Initial program 95.2%

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

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

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

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

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

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

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

                                                    Alternative 18: 28.4% accurate, 1.0× speedup?

                                                    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) + x\\ \mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.000185:\\ \;\;\;\;\frac{t}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                    (FPCore (x y z t a)
                                                     :precision binary64
                                                     (let* ((t_1 (+ (- t x) x)))
                                                       (if (<= z -8e-101) t_1 (if (<= z 0.000185) (* (/ t a) y) t_1))))
                                                    double code(double x, double y, double z, double t, double a) {
                                                    	double t_1 = (t - x) + x;
                                                    	double tmp;
                                                    	if (z <= -8e-101) {
                                                    		tmp = t_1;
                                                    	} else if (z <= 0.000185) {
                                                    		tmp = (t / a) * y;
                                                    	} else {
                                                    		tmp = t_1;
                                                    	}
                                                    	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) :: t_1
                                                        real(8) :: tmp
                                                        t_1 = (t - x) + x
                                                        if (z <= (-8d-101)) then
                                                            tmp = t_1
                                                        else if (z <= 0.000185d0) then
                                                            tmp = (t / a) * y
                                                        else
                                                            tmp = t_1
                                                        end if
                                                        code = tmp
                                                    end function
                                                    
                                                    public static double code(double x, double y, double z, double t, double a) {
                                                    	double t_1 = (t - x) + x;
                                                    	double tmp;
                                                    	if (z <= -8e-101) {
                                                    		tmp = t_1;
                                                    	} else if (z <= 0.000185) {
                                                    		tmp = (t / a) * y;
                                                    	} else {
                                                    		tmp = t_1;
                                                    	}
                                                    	return tmp;
                                                    }
                                                    
                                                    def code(x, y, z, t, a):
                                                    	t_1 = (t - x) + x
                                                    	tmp = 0
                                                    	if z <= -8e-101:
                                                    		tmp = t_1
                                                    	elif z <= 0.000185:
                                                    		tmp = (t / a) * y
                                                    	else:
                                                    		tmp = t_1
                                                    	return tmp
                                                    
                                                    function code(x, y, z, t, a)
                                                    	t_1 = Float64(Float64(t - x) + x)
                                                    	tmp = 0.0
                                                    	if (z <= -8e-101)
                                                    		tmp = t_1;
                                                    	elseif (z <= 0.000185)
                                                    		tmp = Float64(Float64(t / a) * y);
                                                    	else
                                                    		tmp = t_1;
                                                    	end
                                                    	return tmp
                                                    end
                                                    
                                                    function tmp_2 = code(x, y, z, t, a)
                                                    	t_1 = (t - x) + x;
                                                    	tmp = 0.0;
                                                    	if (z <= -8e-101)
                                                    		tmp = t_1;
                                                    	elseif (z <= 0.000185)
                                                    		tmp = (t / a) * y;
                                                    	else
                                                    		tmp = t_1;
                                                    	end
                                                    	tmp_2 = tmp;
                                                    end
                                                    
                                                    code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision]}, If[LessEqual[z, -8e-101], t$95$1, If[LessEqual[z, 0.000185], N[(N[(t / a), $MachinePrecision] * y), $MachinePrecision], t$95$1]]]
                                                    
                                                    \begin{array}{l}
                                                    
                                                    \\
                                                    \begin{array}{l}
                                                    t_1 := \left(t - x\right) + x\\
                                                    \mathbf{if}\;z \leq -8 \cdot 10^{-101}:\\
                                                    \;\;\;\;t\_1\\
                                                    
                                                    \mathbf{elif}\;z \leq 0.000185:\\
                                                    \;\;\;\;\frac{t}{a} \cdot y\\
                                                    
                                                    \mathbf{else}:\\
                                                    \;\;\;\;t\_1\\
                                                    
                                                    
                                                    \end{array}
                                                    \end{array}
                                                    
                                                    Derivation
                                                    1. Split input into 2 regimes
                                                    2. if z < -8.00000000000000041e-101 or 1.85e-4 < z

                                                      1. Initial program 73.7%

                                                        \[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--.f6433.1

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

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

                                                      if -8.00000000000000041e-101 < z < 1.85e-4

                                                      1. Initial program 95.2%

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

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

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

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

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

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

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

                                                        Alternative 19: 18.9% accurate, 4.1× speedup?

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

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

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

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

                                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                        6. Final simplification22.2%

                                                          \[\leadsto \left(t - x\right) + x \]
                                                        7. Add Preprocessing

                                                        Alternative 20: 2.8% accurate, 4.8× speedup?

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

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

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

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

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

                                                          \[\leadsto x + -1 \cdot \color{blue}{x} \]
                                                        7. Step-by-step derivation
                                                          1. Applied rewrites2.7%

                                                            \[\leadsto x + \left(-x\right) \]
                                                          2. Final simplification2.7%

                                                            \[\leadsto \left(-x\right) + x \]
                                                          3. Add Preprocessing

                                                          Reproduce

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