Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 81.1% → 94.9%
Time: 9.8s
Alternatives: 19
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 19 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: 81.1% accurate, 1.0× speedup?

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

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

Alternative 1: 94.9% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-275}:\\
\;\;\;\;\mathsf{fma}\left(\frac{x}{z}, y - a, 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)))) < -3.9999999999999999e-302 or 1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999999e-302 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999987e-275

    1. Initial program 3.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 2: 89.5% 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 -1 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-275}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, 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 -1e-110)
             t_1
             (if (<= t_2 2e-275) (fma (/ (- x t) z) (- y a) 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 <= -1e-110) {
        		tmp = t_1;
        	} else if (t_2 <= 2e-275) {
        		tmp = fma(((x - t) / z), (y - a), 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 <= -1e-110)
        		tmp = t_1;
        	elseif (t_2 <= 2e-275)
        		tmp = fma(Float64(Float64(x - t) / z), Float64(y - a), 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, -1e-110], t$95$1, If[LessEqual[t$95$2, 2e-275], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * N[(y - a), $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 -1 \cdot 10^{-110}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-275}:\\
        \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, 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)))) < -1.0000000000000001e-110 or 1.99999999999999987e-275 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z))))

          1. Initial program 89.5%

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

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

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

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

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

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

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

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

          if -1.0000000000000001e-110 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 1.99999999999999987e-275

          1. Initial program 14.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \leq -1 \cdot 10^{-110}:\\ \;\;\;\;\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^{-275}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z}, y - a, t\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{x - t}{z - a}, y - z, x\right)\\ \end{array} \]
            5. Add Preprocessing

            Alternative 3: 20.2% accurate, 0.6× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \leq 10^{+286}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{t}{z} \cdot a\\ \end{array} \end{array} \]
            (FPCore (x y z t a)
             :precision binary64
             (if (<= (+ (* (/ (- t x) (- a z)) (- y z)) x) 1e+286)
               (+ (- t x) x)
               (* (/ t z) a)))
            double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286) {
            		tmp = (t - x) + x;
            	} else {
            		tmp = (t / z) * a;
            	}
            	return tmp;
            }
            
            real(8) function code(x, y, z, t, a)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                real(8), intent (in) :: z
                real(8), intent (in) :: t
                real(8), intent (in) :: a
                real(8) :: tmp
                if (((((t - x) / (a - z)) * (y - z)) + x) <= 1d+286) then
                    tmp = (t - x) + x
                else
                    tmp = (t / z) * a
                end if
                code = tmp
            end function
            
            public static double code(double x, double y, double z, double t, double a) {
            	double tmp;
            	if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286) {
            		tmp = (t - x) + x;
            	} else {
            		tmp = (t / z) * a;
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a):
            	tmp = 0
            	if ((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286:
            		tmp = (t - x) + x
            	else:
            		tmp = (t / z) * a
            	return tmp
            
            function code(x, y, z, t, a)
            	tmp = 0.0
            	if (Float64(Float64(Float64(Float64(t - x) / Float64(a - z)) * Float64(y - z)) + x) <= 1e+286)
            		tmp = Float64(Float64(t - x) + x);
            	else
            		tmp = Float64(Float64(t / z) * a);
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a)
            	tmp = 0.0;
            	if (((((t - x) / (a - z)) * (y - z)) + x) <= 1e+286)
            		tmp = (t - x) + x;
            	else
            		tmp = (t / z) * a;
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_] := If[LessEqual[N[(N[(N[(N[(t - x), $MachinePrecision] / N[(a - z), $MachinePrecision]), $MachinePrecision] * N[(y - z), $MachinePrecision]), $MachinePrecision] + x), $MachinePrecision], 1e+286], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], N[(N[(t / z), $MachinePrecision] * a), $MachinePrecision]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;\frac{t - x}{a - z} \cdot \left(y - z\right) + x \leq 10^{+286}:\\
            \;\;\;\;\left(t - x\right) + x\\
            
            \mathbf{else}:\\
            \;\;\;\;\frac{t}{z} \cdot a\\
            
            
            \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)))) < 1.00000000000000003e286

              1. Initial program 78.3%

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

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

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

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

              1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{a \cdot t}{z} \]
                  3. Step-by-step derivation
                    1. Applied rewrites20.4%

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

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

                  Alternative 4: 76.0% accurate, 0.8× speedup?

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

                    1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if -7.50000000000000006e-29 < z < 1.20000000000000011e-41

                      1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    Alternative 5: 74.4% accurate, 0.8× speedup?

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

                      1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if -7.19999999999999948e-29 < z < 1.20000000000000011e-41

                        1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      Alternative 6: 73.9% accurate, 0.8× speedup?

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

                        1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            if -8.79999999999999961e-29 < z < 1.2499999999999999e-41

                            1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          Alternative 7: 74.6% accurate, 0.8× speedup?

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

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

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

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

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

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

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

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

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

                            if -2.55e-42 < a < 2.4499999999999999e-32

                            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 + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                            4. Step-by-step derivation
                              1. associate--l+N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 8: 70.1% accurate, 0.9× speedup?

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

                                1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if -0.34999999999999998 < z < 5.5e-18

                                    1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 5.5e-18 < z

                                    1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        Alternative 9: 69.2% accurate, 0.9× speedup?

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

                                          1. Initial program 74.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              if -0.34999999999999998 < z < 5.5e-18

                                              1. Initial program 88.5%

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

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

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

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

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

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

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

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

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

                                              if 5.5e-18 < z

                                              1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  Alternative 10: 61.6% accurate, 0.9× speedup?

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

                                                    1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        if -1.10000000000000009e-53 < z < 1.0199999999999999e-44

                                                        1. Initial program 91.3%

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

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

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

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

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

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

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

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

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

                                                          if 1.0199999999999999e-44 < z

                                                          1. Initial program 66.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                              Alternative 11: 60.8% accurate, 0.9× speedup?

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

                                                                1. Initial program 69.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      if -8.79999999999999961e-29 < z < 1.0199999999999999e-44

                                                                      1. Initial program 90.0%

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

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

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

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

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

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

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

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

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

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

                                                                      Alternative 12: 61.6% accurate, 0.9× speedup?

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

                                                                        1. Initial program 72.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          if -0.116000000000000006 < z < 1.8500000000000001e-91

                                                                          1. Initial program 87.5%

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 13: 45.6% accurate, 0.9× speedup?

                                                                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(t - x\right) + x\\ \mathbf{if}\;z \leq -1.18 \cdot 10^{+110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.9 \cdot 10^{+66}:\\ \;\;\;\;\frac{t \cdot y}{a} + x\\ \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.18e+110) t_1 (if (<= z 2.9e+66) (+ (/ (* t y) a) x) t_1))))
                                                                          double code(double x, double y, double z, double t, double a) {
                                                                          	double t_1 = (t - x) + x;
                                                                          	double tmp;
                                                                          	if (z <= -1.18e+110) {
                                                                          		tmp = t_1;
                                                                          	} else if (z <= 2.9e+66) {
                                                                          		tmp = ((t * y) / a) + 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 = (t - x) + x
                                                                              if (z <= (-1.18d+110)) then
                                                                                  tmp = t_1
                                                                              else if (z <= 2.9d+66) then
                                                                                  tmp = ((t * y) / a) + 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 = (t - x) + x;
                                                                          	double tmp;
                                                                          	if (z <= -1.18e+110) {
                                                                          		tmp = t_1;
                                                                          	} else if (z <= 2.9e+66) {
                                                                          		tmp = ((t * y) / a) + x;
                                                                          	} else {
                                                                          		tmp = t_1;
                                                                          	}
                                                                          	return tmp;
                                                                          }
                                                                          
                                                                          def code(x, y, z, t, a):
                                                                          	t_1 = (t - x) + x
                                                                          	tmp = 0
                                                                          	if z <= -1.18e+110:
                                                                          		tmp = t_1
                                                                          	elif z <= 2.9e+66:
                                                                          		tmp = ((t * y) / a) + x
                                                                          	else:
                                                                          		tmp = t_1
                                                                          	return tmp
                                                                          
                                                                          function code(x, y, z, t, a)
                                                                          	t_1 = Float64(Float64(t - x) + x)
                                                                          	tmp = 0.0
                                                                          	if (z <= -1.18e+110)
                                                                          		tmp = t_1;
                                                                          	elseif (z <= 2.9e+66)
                                                                          		tmp = Float64(Float64(Float64(t * y) / a) + x);
                                                                          	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.18e+110)
                                                                          		tmp = t_1;
                                                                          	elseif (z <= 2.9e+66)
                                                                          		tmp = ((t * y) / a) + x;
                                                                          	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.18e+110], t$95$1, If[LessEqual[z, 2.9e+66], N[(N[(N[(t * y), $MachinePrecision] / a), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                                                                          
                                                                          \begin{array}{l}
                                                                          
                                                                          \\
                                                                          \begin{array}{l}
                                                                          t_1 := \left(t - x\right) + x\\
                                                                          \mathbf{if}\;z \leq -1.18 \cdot 10^{+110}:\\
                                                                          \;\;\;\;t\_1\\
                                                                          
                                                                          \mathbf{elif}\;z \leq 2.9 \cdot 10^{+66}:\\
                                                                          \;\;\;\;\frac{t \cdot y}{a} + x\\
                                                                          
                                                                          \mathbf{else}:\\
                                                                          \;\;\;\;t\_1\\
                                                                          
                                                                          
                                                                          \end{array}
                                                                          \end{array}
                                                                          
                                                                          Derivation
                                                                          1. Split input into 2 regimes
                                                                          2. if z < -1.1799999999999999e110 or 2.89999999999999986e66 < z

                                                                            1. Initial program 64.8%

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

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

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

                                                                            if -1.1799999999999999e110 < z < 2.89999999999999986e66

                                                                            1. Initial program 86.9%

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

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

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

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

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

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

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

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

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

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

                                                                            Alternative 14: 33.1% accurate, 0.9× speedup?

                                                                            \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - t}{z} \cdot y\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+123}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-23}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                                                            (FPCore (x y z t a)
                                                                             :precision binary64
                                                                             (let* ((t_1 (* (/ (- x t) z) y)))
                                                                               (if (<= y -1.3e+123) t_1 (if (<= y 1.95e-23) (+ (- t x) x) t_1))))
                                                                            double code(double x, double y, double z, double t, double a) {
                                                                            	double t_1 = ((x - t) / z) * y;
                                                                            	double tmp;
                                                                            	if (y <= -1.3e+123) {
                                                                            		tmp = t_1;
                                                                            	} else if (y <= 1.95e-23) {
                                                                            		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 = ((x - t) / z) * y
                                                                                if (y <= (-1.3d+123)) then
                                                                                    tmp = t_1
                                                                                else if (y <= 1.95d-23) 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 = ((x - t) / z) * y;
                                                                            	double tmp;
                                                                            	if (y <= -1.3e+123) {
                                                                            		tmp = t_1;
                                                                            	} else if (y <= 1.95e-23) {
                                                                            		tmp = (t - x) + x;
                                                                            	} else {
                                                                            		tmp = t_1;
                                                                            	}
                                                                            	return tmp;
                                                                            }
                                                                            
                                                                            def code(x, y, z, t, a):
                                                                            	t_1 = ((x - t) / z) * y
                                                                            	tmp = 0
                                                                            	if y <= -1.3e+123:
                                                                            		tmp = t_1
                                                                            	elif y <= 1.95e-23:
                                                                            		tmp = (t - x) + x
                                                                            	else:
                                                                            		tmp = t_1
                                                                            	return tmp
                                                                            
                                                                            function code(x, y, z, t, a)
                                                                            	t_1 = Float64(Float64(Float64(x - t) / z) * y)
                                                                            	tmp = 0.0
                                                                            	if (y <= -1.3e+123)
                                                                            		tmp = t_1;
                                                                            	elseif (y <= 1.95e-23)
                                                                            		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 = ((x - t) / z) * y;
                                                                            	tmp = 0.0;
                                                                            	if (y <= -1.3e+123)
                                                                            		tmp = t_1;
                                                                            	elseif (y <= 1.95e-23)
                                                                            		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[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -1.3e+123], t$95$1, If[LessEqual[y, 1.95e-23], N[(N[(t - x), $MachinePrecision] + x), $MachinePrecision], t$95$1]]]
                                                                            
                                                                            \begin{array}{l}
                                                                            
                                                                            \\
                                                                            \begin{array}{l}
                                                                            t_1 := \frac{x - t}{z} \cdot y\\
                                                                            \mathbf{if}\;y \leq -1.3 \cdot 10^{+123}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            \mathbf{elif}\;y \leq 1.95 \cdot 10^{-23}:\\
                                                                            \;\;\;\;\left(t - x\right) + x\\
                                                                            
                                                                            \mathbf{else}:\\
                                                                            \;\;\;\;t\_1\\
                                                                            
                                                                            
                                                                            \end{array}
                                                                            \end{array}
                                                                            
                                                                            Derivation
                                                                            1. Split input into 2 regimes
                                                                            2. if y < -1.29999999999999993e123 or 1.95e-23 < y

                                                                              1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if -1.29999999999999993e123 < y < 1.95e-23

                                                                                1. Initial program 69.4%

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

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

                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                              8. Recombined 2 regimes into one program.
                                                                              9. Final simplification37.5%

                                                                                \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+123}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;y \leq 1.95 \cdot 10^{-23}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \end{array} \]
                                                                              10. Add Preprocessing

                                                                              Alternative 15: 27.0% accurate, 1.0× speedup?

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

                                                                                1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                      if -5.2000000000000001e124 < y < 1.7999999999999999e-23

                                                                                      1. Initial program 69.4%

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

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

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

                                                                                      if 1.7999999999999999e-23 < y

                                                                                      1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                            \[\leadsto \frac{x \cdot y}{z} \]
                                                                                          3. Step-by-step derivation
                                                                                            1. Applied rewrites27.0%

                                                                                              \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                                                                          4. Recombined 3 regimes into one program.
                                                                                          5. Final simplification31.2%

                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.2 \cdot 10^{+124}:\\ \;\;\;\;\frac{y}{-z} \cdot t\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
                                                                                          6. Add Preprocessing

                                                                                          Alternative 16: 26.9% accurate, 1.0× speedup?

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

                                                                                            1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                  \[\leadsto \frac{x}{z} \cdot y \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites33.3%

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

                                                                                                  if -2.8000000000000001e131 < y < 1.7999999999999999e-23

                                                                                                  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 x + \color{blue}{\left(t - x\right)} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. lower--.f6431.5

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

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

                                                                                                  if 1.7999999999999999e-23 < y

                                                                                                  1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                        \[\leadsto \frac{x \cdot y}{z} \]
                                                                                                      3. Step-by-step derivation
                                                                                                        1. Applied rewrites27.0%

                                                                                                          \[\leadsto x \cdot \frac{y}{\color{blue}{z}} \]
                                                                                                      4. Recombined 3 regimes into one program.
                                                                                                      5. Final simplification30.4%

                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+131}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
                                                                                                      6. Add Preprocessing

                                                                                                      Alternative 17: 27.2% accurate, 1.0× speedup?

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

                                                                                                        1. Initial program 89.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                                              \[\leadsto \frac{x \cdot y}{z} \]
                                                                                                            3. Step-by-step derivation
                                                                                                              1. Applied rewrites29.2%

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

                                                                                                              if -2.8000000000000001e131 < y < 1.7999999999999999e-23

                                                                                                              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 x + \color{blue}{\left(t - x\right)} \]
                                                                                                              4. Step-by-step derivation
                                                                                                                1. lower--.f6431.5

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

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

                                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.8 \cdot 10^{+131}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \mathbf{elif}\;y \leq 1.8 \cdot 10^{-23}:\\ \;\;\;\;\left(t - x\right) + x\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{z} \cdot x\\ \end{array} \]
                                                                                                            6. Add Preprocessing

                                                                                                            Alternative 18: 19.9% accurate, 4.1× speedup?

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

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

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

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

                                                                                                            Alternative 19: 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 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--.f6421.7

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

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

                                                                                                              \[\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 2024295 
                                                                                                              (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)))))