Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.6% → 90.9%
Time: 10.7s
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: 80.6% 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: 90.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-290}:\\
\;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\

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


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

    1. Initial program 96.8%

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

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

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

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

    if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290

    1. Initial program 8.4%

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

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

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

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

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

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

        if 2.0000000000000001e-290 < (+.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. 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.f6489.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--.f6489.4

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

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

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

      Alternative 2: 90.9% accurate, 0.3× speedup?

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

        1. Initial program 96.8%

          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
        2. Add Preprocessing

        if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290

        1. Initial program 8.4%

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

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

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

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

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

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

            if 2.0000000000000001e-290 < (+.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. 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.f6489.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--.f6489.4

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

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

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

          Alternative 3: 90.9% accurate, 0.3× speedup?

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

            1. Initial program 93.1%

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

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

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

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

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

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

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

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

            if -5.0000000000000001e-180 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2.0000000000000001e-290

            1. Initial program 8.4%

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

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

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

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

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

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

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

              Alternative 4: 78.3% accurate, 0.7× speedup?

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

                1. Initial program 64.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                4. Applied rewrites82.0%

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

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

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

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

                    if -1.17999999999999997e52 < z < 1.69999999999999989e32

                    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

                    if 1.69999999999999989e32 < z < 3.1000000000000002e146

                    1. Initial program 87.8%

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

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

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

                    if 3.1000000000000002e146 < z

                    1. Initial program 51.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                    4. Applied rewrites86.9%

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

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

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

                      \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.18 \cdot 10^{+52}:\\ \;\;\;\;\mathsf{fma}\left(y - a, \frac{x - t}{z}, t\right)\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+32}:\\ \;\;\;\;\frac{y}{a - z} \cdot \left(t - x\right) + x\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+146}:\\ \;\;\;\;\frac{t}{a - z} \cdot \left(y - z\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(x - t, \frac{y - a}{z}, t\right)\\ \end{array} \]
                    9. Add Preprocessing

                    Alternative 5: 73.4% accurate, 0.7× speedup?

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

                      1. Initial program 69.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                      4. Applied rewrites78.6%

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

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

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

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

                          if -1.00000000000000004e-25 < z < 1.15e32

                          1. Initial program 94.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--.f6479.1

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

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

                          if 1.15e32 < z < 3.1000000000000002e146

                          1. Initial program 87.8%

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

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

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

                          if 3.1000000000000002e146 < z

                          1. Initial program 51.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                          4. Applied rewrites86.9%

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

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

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

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

                          Alternative 6: 71.7% accurate, 0.7× speedup?

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

                            1. Initial program 70.4%

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

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

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

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

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

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

                                if -1.5e-32 < z < 1.0600000000000001e32

                                1. Initial program 94.3%

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

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

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

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

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

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

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

                                  if 1.0600000000000001e32 < z < 3.1000000000000002e146

                                  1. Initial program 87.8%

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

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

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

                                  if 3.1000000000000002e146 < z

                                  1. Initial program 51.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                  4. Applied rewrites86.9%

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

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

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

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

                                  Alternative 7: 71.9% accurate, 0.7× speedup?

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

                                    1. Initial program 64.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                    4. Applied rewrites80.9%

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

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

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

                                      if -1.3999999999999999e-32 < z < 1.0600000000000001e32

                                      1. Initial program 94.3%

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

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

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

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

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

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

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

                                        if 1.0600000000000001e32 < z < 3.1000000000000002e146

                                        1. Initial program 87.8%

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

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

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

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

                                      Alternative 8: 68.9% accurate, 0.7× speedup?

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

                                        1. Initial program 70.4%

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

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

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

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

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

                                          if -1e-31 < z < 1.0600000000000001e32

                                          1. Initial program 94.3%

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

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

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

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

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

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

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

                                            if 1.0600000000000001e32 < z < 5.5000000000000004e146

                                            1. Initial program 87.8%

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

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

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

                                            if 5.5000000000000004e146 < z

                                            1. Initial program 51.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                            4. Applied rewrites86.9%

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

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

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

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

                                                  \[\leadsto \mathsf{fma}\left(x - t, \frac{y}{z}, t\right) \]
                                              4. Recombined 4 regimes into one program.
                                              5. Final simplification76.0%

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

                                              Alternative 9: 41.9% accurate, 0.8× 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^{-12}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4.3 \cdot 10^{-35}:\\ \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\ \mathbf{elif}\;z \leq 1.1 \cdot 10^{-40}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \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-12)
                                                   t_1
                                                   (if (<= z -4.3e-35)
                                                     (/ (* (- y a) x) z)
                                                     (if (<= z 1.1e-40) (* (/ y (- a z)) t) 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-12) {
                                              		tmp = t_1;
                                              	} else if (z <= -4.3e-35) {
                                              		tmp = ((y - a) * x) / z;
                                              	} else if (z <= 1.1e-40) {
                                              		tmp = (y / (a - z)) * t;
                                              	} 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-12)
                                              		tmp = t_1;
                                              	elseif (z <= -4.3e-35)
                                              		tmp = Float64(Float64(Float64(y - a) * x) / z);
                                              	elseif (z <= 1.1e-40)
                                              		tmp = Float64(Float64(y / Float64(a - z)) * t);
                                              	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-12], t$95$1, If[LessEqual[z, -4.3e-35], N[(N[(N[(y - a), $MachinePrecision] * x), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 1.1e-40], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $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^{-12}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              \mathbf{elif}\;z \leq -4.3 \cdot 10^{-35}:\\
                                              \;\;\;\;\frac{\left(y - a\right) \cdot x}{z}\\
                                              
                                              \mathbf{elif}\;z \leq 1.1 \cdot 10^{-40}:\\
                                              \;\;\;\;\frac{y}{a - z} \cdot t\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;t\_1\\
                                              
                                              
                                              \end{array}
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 3 regimes
                                              2. if z < -3.99999999999999992e-12 or 1.10000000000000004e-40 < z

                                                1. Initial program 70.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                4. Applied rewrites73.2%

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

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

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

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

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

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

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

                                                      if -3.99999999999999992e-12 < z < -4.3000000000000002e-35

                                                      1. Initial program 75.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                      4. Applied rewrites62.9%

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

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

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

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

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

                                                          if -4.3000000000000002e-35 < z < 1.10000000000000004e-40

                                                          1. Initial program 94.3%

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

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

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

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

                                                              \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                          8. Recombined 3 regimes into one program.
                                                          9. Final simplification51.9%

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

                                                          Alternative 10: 30.7% accurate, 0.8× speedup?

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

                                                            1. Initial program 86.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--.f6477.1

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

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

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

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

                                                              if -6.60000000000000049e147 < y < -2.49999999999999988e73

                                                              1. Initial program 80.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                              4. Applied rewrites47.3%

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

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

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

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

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

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

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

                                                                    if -2.49999999999999988e73 < y < 6.9e16

                                                                    1. Initial program 76.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--.f6437.1

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

                                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                  4. Recombined 3 regimes into one program.
                                                                  5. Final simplification43.0%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.6 \cdot 10^{+147}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{+73}:\\ \;\;\;\;\frac{y - a}{z} \cdot x\\ \mathbf{elif}\;y \leq 6.9 \cdot 10^{+16}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - z} \cdot t\\ \end{array} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 11: 69.6% accurate, 0.9× speedup?

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

                                                                    1. Initial program 70.4%

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

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

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

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

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

                                                                      if -1e-31 < z < 1.15e32

                                                                      1. Initial program 94.3%

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

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

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

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

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

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

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

                                                                        if 1.15e32 < z

                                                                        1. Initial program 65.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                        4. Applied rewrites76.8%

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

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

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

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

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

                                                                          Alternative 12: 55.4% accurate, 0.9× speedup?

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

                                                                            1. Initial program 70.4%

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

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

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

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

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

                                                                              if -1.3499999999999999e-32 < z < 5.6999999999999999e-117

                                                                              1. Initial program 95.6%

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

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

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

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

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

                                                                                if 5.6999999999999999e-117 < 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 \color{blue}{\left(t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                4. Applied rewrites65.6%

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

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

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

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

                                                                                      \[\leadsto \mathsf{fma}\left(x - t, \frac{y}{z}, t\right) \]
                                                                                  4. Recombined 3 regimes into one program.
                                                                                  5. Final simplification64.0%

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

                                                                                  Alternative 13: 55.6% accurate, 0.9× speedup?

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

                                                                                    1. Initial program 72.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                    4. Applied rewrites71.2%

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

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

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

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

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

                                                                                        if -1.3499999999999999e-32 < z < 5.6999999999999999e-117

                                                                                        1. Initial program 95.6%

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

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

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

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

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

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

                                                                                        Alternative 14: 45.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 -6.4 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.8 \cdot 10^{-34}:\\ \;\;\;\;\frac{y}{a} \cdot \left(t - 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 -6.4e-9) t_1 (if (<= z 5.8e-34) (* (/ 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 <= -6.4e-9) {
                                                                                        		tmp = t_1;
                                                                                        	} else if (z <= 5.8e-34) {
                                                                                        		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 <= -6.4e-9)
                                                                                        		tmp = t_1;
                                                                                        	elseif (z <= 5.8e-34)
                                                                                        		tmp = Float64(Float64(y / a) * Float64(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, -6.4e-9], t$95$1, If[LessEqual[z, 5.8e-34], N[(N[(y / a), $MachinePrecision] * N[(t - x), $MachinePrecision]), $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 -6.4 \cdot 10^{-9}:\\
                                                                                        \;\;\;\;t\_1\\
                                                                                        
                                                                                        \mathbf{elif}\;z \leq 5.8 \cdot 10^{-34}:\\
                                                                                        \;\;\;\;\frac{y}{a} \cdot \left(t - x\right)\\
                                                                                        
                                                                                        \mathbf{else}:\\
                                                                                        \;\;\;\;t\_1\\
                                                                                        
                                                                                        
                                                                                        \end{array}
                                                                                        \end{array}
                                                                                        
                                                                                        Derivation
                                                                                        1. Split input into 2 regimes
                                                                                        2. if z < -6.40000000000000023e-9 or 5.8000000000000004e-34 < z

                                                                                          1. Initial program 70.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                          4. Applied rewrites73.5%

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

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

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

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

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

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

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

                                                                                                if -6.40000000000000023e-9 < z < 5.8000000000000004e-34

                                                                                                1. Initial program 93.1%

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

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

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

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

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

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

                                                                                                Alternative 15: 44.0% 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 -5.6 \cdot 10^{-9}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.2 \cdot 10^{-35}:\\ \;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\ \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 -5.6e-9) t_1 (if (<= z 7.2e-35) (/ (* (- t x) y) a) 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 <= -5.6e-9) {
                                                                                                		tmp = t_1;
                                                                                                	} else if (z <= 7.2e-35) {
                                                                                                		tmp = ((t - x) * y) / a;
                                                                                                	} 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 <= -5.6e-9)
                                                                                                		tmp = t_1;
                                                                                                	elseif (z <= 7.2e-35)
                                                                                                		tmp = Float64(Float64(Float64(t - x) * y) / a);
                                                                                                	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, -5.6e-9], t$95$1, If[LessEqual[z, 7.2e-35], N[(N[(N[(t - x), $MachinePrecision] * y), $MachinePrecision] / a), $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 -5.6 \cdot 10^{-9}:\\
                                                                                                \;\;\;\;t\_1\\
                                                                                                
                                                                                                \mathbf{elif}\;z \leq 7.2 \cdot 10^{-35}:\\
                                                                                                \;\;\;\;\frac{\left(t - x\right) \cdot y}{a}\\
                                                                                                
                                                                                                \mathbf{else}:\\
                                                                                                \;\;\;\;t\_1\\
                                                                                                
                                                                                                
                                                                                                \end{array}
                                                                                                \end{array}
                                                                                                
                                                                                                Derivation
                                                                                                1. Split input into 2 regimes
                                                                                                2. if z < -5.59999999999999969e-9 or 7.20000000000000038e-35 < z

                                                                                                  1. Initial program 70.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 + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} + \frac{a \cdot \left(-1 \cdot \left(y \cdot \left(t - x\right)\right) - -1 \cdot \left(a \cdot \left(t - x\right)\right)\right)}{{z}^{2}}\right)\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                  4. Applied rewrites73.5%

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

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

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

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

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

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

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

                                                                                                        if -5.59999999999999969e-9 < z < 7.20000000000000038e-35

                                                                                                        1. Initial program 93.1%

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

                                                                                                          \[\leadsto \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--.f6479.3

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

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

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

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

                                                                                                        Alternative 16: 41.0% 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 -7.8 \cdot 10^{-26}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.4 \cdot 10^{-10}:\\ \;\;\;\;\frac{y - z}{a} \cdot t\\ \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 -7.8e-26) t_1 (if (<= z 3.4e-10) (* (/ (- y z) a) t) 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 <= -7.8e-26) {
                                                                                                        		tmp = t_1;
                                                                                                        	} else if (z <= 3.4e-10) {
                                                                                                        		tmp = ((y - z) / a) * t;
                                                                                                        	} 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 <= -7.8e-26)
                                                                                                        		tmp = t_1;
                                                                                                        	elseif (z <= 3.4e-10)
                                                                                                        		tmp = Float64(Float64(Float64(y - z) / a) * t);
                                                                                                        	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, -7.8e-26], t$95$1, If[LessEqual[z, 3.4e-10], N[(N[(N[(y - z), $MachinePrecision] / a), $MachinePrecision] * t), $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 -7.8 \cdot 10^{-26}:\\
                                                                                                        \;\;\;\;t\_1\\
                                                                                                        
                                                                                                        \mathbf{elif}\;z \leq 3.4 \cdot 10^{-10}:\\
                                                                                                        \;\;\;\;\frac{y - z}{a} \cdot t\\
                                                                                                        
                                                                                                        \mathbf{else}:\\
                                                                                                        \;\;\;\;t\_1\\
                                                                                                        
                                                                                                        
                                                                                                        \end{array}
                                                                                                        \end{array}
                                                                                                        
                                                                                                        Derivation
                                                                                                        1. Split input into 2 regimes
                                                                                                        2. if z < -7.79999999999999973e-26 or 3.40000000000000015e-10 < z

                                                                                                          1. Initial program 70.0%

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

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

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

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

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

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

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

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

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

                                                                                                                if -7.79999999999999973e-26 < z < 3.40000000000000015e-10

                                                                                                                1. Initial program 93.8%

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

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

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

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

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

                                                                                                                Alternative 17: 32.5% accurate, 0.9× speedup?

                                                                                                                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) + x\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+45}:\\ \;\;\;\;\frac{y}{a - z} \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 -1.4e+52) t_1 (if (<= z 7e+45) (* (/ y (- a z)) 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 <= -1.4e+52) {
                                                                                                                		tmp = t_1;
                                                                                                                	} else if (z <= 7e+45) {
                                                                                                                		tmp = (y / (a - z)) * 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 <= (-1.4d+52)) then
                                                                                                                        tmp = t_1
                                                                                                                    else if (z <= 7d+45) then
                                                                                                                        tmp = (y / (a - z)) * 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 <= -1.4e+52) {
                                                                                                                		tmp = t_1;
                                                                                                                	} else if (z <= 7e+45) {
                                                                                                                		tmp = (y / (a - z)) * t;
                                                                                                                	} else {
                                                                                                                		tmp = t_1;
                                                                                                                	}
                                                                                                                	return tmp;
                                                                                                                }
                                                                                                                
                                                                                                                def code(x, y, z, t, a):
                                                                                                                	t_1 = (t - x) + x
                                                                                                                	tmp = 0
                                                                                                                	if z <= -1.4e+52:
                                                                                                                		tmp = t_1
                                                                                                                	elif z <= 7e+45:
                                                                                                                		tmp = (y / (a - z)) * 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 <= -1.4e+52)
                                                                                                                		tmp = t_1;
                                                                                                                	elseif (z <= 7e+45)
                                                                                                                		tmp = Float64(Float64(y / Float64(a - z)) * 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 <= -1.4e+52)
                                                                                                                		tmp = t_1;
                                                                                                                	elseif (z <= 7e+45)
                                                                                                                		tmp = (y / (a - z)) * 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, -1.4e+52], t$95$1, If[LessEqual[z, 7e+45], N[(N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision] * t), $MachinePrecision], t$95$1]]]
                                                                                                                
                                                                                                                \begin{array}{l}
                                                                                                                
                                                                                                                \\
                                                                                                                \begin{array}{l}
                                                                                                                t_1 := \left(t - x\right) + x\\
                                                                                                                \mathbf{if}\;z \leq -1.4 \cdot 10^{+52}:\\
                                                                                                                \;\;\;\;t\_1\\
                                                                                                                
                                                                                                                \mathbf{elif}\;z \leq 7 \cdot 10^{+45}:\\
                                                                                                                \;\;\;\;\frac{y}{a - z} \cdot t\\
                                                                                                                
                                                                                                                \mathbf{else}:\\
                                                                                                                \;\;\;\;t\_1\\
                                                                                                                
                                                                                                                
                                                                                                                \end{array}
                                                                                                                \end{array}
                                                                                                                
                                                                                                                Derivation
                                                                                                                1. Split input into 2 regimes
                                                                                                                2. if z < -1.4e52 or 7.00000000000000046e45 < z

                                                                                                                  1. Initial program 65.0%

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

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

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

                                                                                                                  if -1.4e52 < z < 7.00000000000000046e45

                                                                                                                  1. Initial program 93.7%

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

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

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

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

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

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

                                                                                                                  Alternative 18: 19.7% accurate, 1.2× speedup?

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

                                                                                                                    1. Initial program 78.9%

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

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

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

                                                                                                                    if 3.6000000000000002e111 < a

                                                                                                                    1. Initial program 87.6%

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

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

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

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

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

                                                                                                                        \[\leadsto -1 \cdot \frac{t \cdot z}{\color{blue}{a}} \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites18.6%

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

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq 3.6 \cdot 10^{+111}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{-z}{a} \cdot t\\ \end{array} \]
                                                                                                                      6. Add Preprocessing

                                                                                                                      Alternative 19: 19.4% 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 80.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--.f6425.2

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

                                                                                                                        \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                      6. Final simplification25.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 80.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--.f6425.2

                                                                                                                          \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                      5. Applied rewrites25.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.8%

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

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

                                                                                                                        Reproduce

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