Numeric.Signal:interpolate from hsignal-0.2.7.1

Percentage Accurate: 80.0% → 95.2%
Time: 9.3s
Alternatives: 21
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 21 alternatives:

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

Initial Program: 80.0% accurate, 1.0× speedup?

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

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

Alternative 1: 95.2% accurate, 0.3× speedup?

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

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

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


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

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

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

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

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

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

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

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

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

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

    1. Initial program 3.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 2: 29.9% accurate, 0.3× speedup?

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

      1. Initial program 85.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -inf.0 < (+.f64 x (*.f64 (-.f64 y z) (/.f64 (-.f64 t x) (-.f64 a z)))) < 2e292

          1. Initial program 82.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 3: 41.4% accurate, 0.7× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - t\right) \cdot \frac{y}{z}\\ t_2 := \frac{t - x}{a} \cdot y\\ \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+109}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                (FPCore (x y z t a)
                 :precision binary64
                 (let* ((t_1 (* (- x t) (/ y z))) (t_2 (* (/ (- t x) a) y)))
                   (if (<= y -4.15e+207)
                     t_2
                     (if (<= y -1.55e+109)
                       t_1
                       (if (<= y 2.2e+121)
                         (fma a (/ (- x) z) t)
                         (if (<= y 2.8e+247) t_2 t_1))))))
                double code(double x, double y, double z, double t, double a) {
                	double t_1 = (x - t) * (y / z);
                	double t_2 = ((t - x) / a) * y;
                	double tmp;
                	if (y <= -4.15e+207) {
                		tmp = t_2;
                	} else if (y <= -1.55e+109) {
                		tmp = t_1;
                	} else if (y <= 2.2e+121) {
                		tmp = fma(a, (-x / z), t);
                	} else if (y <= 2.8e+247) {
                		tmp = t_2;
                	} else {
                		tmp = t_1;
                	}
                	return tmp;
                }
                
                function code(x, y, z, t, a)
                	t_1 = Float64(Float64(x - t) * Float64(y / z))
                	t_2 = Float64(Float64(Float64(t - x) / a) * y)
                	tmp = 0.0
                	if (y <= -4.15e+207)
                		tmp = t_2;
                	elseif (y <= -1.55e+109)
                		tmp = t_1;
                	elseif (y <= 2.2e+121)
                		tmp = fma(a, Float64(Float64(-x) / z), t);
                	elseif (y <= 2.8e+247)
                		tmp = t_2;
                	else
                		tmp = t_1;
                	end
                	return tmp
                end
                
                code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$2, If[LessEqual[y, -1.55e+109], t$95$1, If[LessEqual[y, 2.2e+121], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$2, t$95$1]]]]]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                t_1 := \left(x - t\right) \cdot \frac{y}{z}\\
                t_2 := \frac{t - x}{a} \cdot y\\
                \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
                \;\;\;\;t\_2\\
                
                \mathbf{elif}\;y \leq -1.55 \cdot 10^{+109}:\\
                \;\;\;\;t\_1\\
                
                \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
                \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
                
                \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
                \;\;\;\;t\_2\\
                
                \mathbf{else}:\\
                \;\;\;\;t\_1\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 3 regimes
                2. if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247

                  1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -4.1499999999999999e207 < y < -1.54999999999999996e109 or 2.7999999999999998e247 < y

                    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                      2. Step-by-step derivation
                        1. Applied rewrites75.9%

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

                        if -1.54999999999999996e109 < y < 2.20000000000000001e121

                        1. Initial program 78.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{elif}\;y \leq -1.55 \cdot 10^{+109}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \end{array} \]
                          6. Add Preprocessing

                          Alternative 4: 36.9% accurate, 0.7× speedup?

                          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{t - x}{a} \cdot y\\ \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \end{array} \end{array} \]
                          (FPCore (x y z t a)
                           :precision binary64
                           (let* ((t_1 (* (/ (- t x) a) y)))
                             (if (<= y -4.15e+207)
                               t_1
                               (if (<= y -1.35e+111)
                                 (* (/ (- x t) z) y)
                                 (if (<= y 2.2e+121)
                                   (fma a (/ t z) t)
                                   (if (<= y 2.8e+247) t_1 (* (- x t) (/ y z))))))))
                          double code(double x, double y, double z, double t, double a) {
                          	double t_1 = ((t - x) / a) * y;
                          	double tmp;
                          	if (y <= -4.15e+207) {
                          		tmp = t_1;
                          	} else if (y <= -1.35e+111) {
                          		tmp = ((x - t) / z) * y;
                          	} else if (y <= 2.2e+121) {
                          		tmp = fma(a, (t / z), t);
                          	} else if (y <= 2.8e+247) {
                          		tmp = t_1;
                          	} else {
                          		tmp = (x - t) * (y / z);
                          	}
                          	return tmp;
                          }
                          
                          function code(x, y, z, t, a)
                          	t_1 = Float64(Float64(Float64(t - x) / a) * y)
                          	tmp = 0.0
                          	if (y <= -4.15e+207)
                          		tmp = t_1;
                          	elseif (y <= -1.35e+111)
                          		tmp = Float64(Float64(Float64(x - t) / z) * y);
                          	elseif (y <= 2.2e+121)
                          		tmp = fma(a, Float64(t / z), t);
                          	elseif (y <= 2.8e+247)
                          		tmp = t_1;
                          	else
                          		tmp = Float64(Float64(x - t) * Float64(y / z));
                          	end
                          	return tmp
                          end
                          
                          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$1, If[LessEqual[y, -1.35e+111], N[(N[(N[(x - t), $MachinePrecision] / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 2.2e+121], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$1, N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]]]]]]
                          
                          \begin{array}{l}
                          
                          \\
                          \begin{array}{l}
                          t_1 := \frac{t - x}{a} \cdot y\\
                          \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\
                          \;\;\;\;\frac{x - t}{z} \cdot y\\
                          
                          \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
                          \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                          
                          \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
                          \;\;\;\;t\_1\\
                          
                          \mathbf{else}:\\
                          \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\
                          
                          
                          \end{array}
                          \end{array}
                          
                          Derivation
                          1. Split input into 4 regimes
                          2. if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247

                            1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              if -4.1499999999999999e207 < y < -1.3499999999999999e111

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                if -1.3499999999999999e111 < y < 2.20000000000000001e121

                                1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                    if 2.7999999999999998e247 < y

                                    1. Initial program 88.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                        \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites81.9%

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

                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\ \;\;\;\;\frac{x - t}{z} \cdot y\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \end{array} \]
                                      5. Add Preprocessing

                                      Alternative 5: 36.9% accurate, 0.7× speedup?

                                      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x - t\right) \cdot \frac{y}{z}\\ t_2 := \frac{t - x}{a} \cdot y\\ \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
                                      (FPCore (x y z t a)
                                       :precision binary64
                                       (let* ((t_1 (* (- x t) (/ y z))) (t_2 (* (/ (- t x) a) y)))
                                         (if (<= y -4.15e+207)
                                           t_2
                                           (if (<= y -1.35e+111)
                                             t_1
                                             (if (<= y 2.2e+121) (fma a (/ t z) t) (if (<= y 2.8e+247) t_2 t_1))))))
                                      double code(double x, double y, double z, double t, double a) {
                                      	double t_1 = (x - t) * (y / z);
                                      	double t_2 = ((t - x) / a) * y;
                                      	double tmp;
                                      	if (y <= -4.15e+207) {
                                      		tmp = t_2;
                                      	} else if (y <= -1.35e+111) {
                                      		tmp = t_1;
                                      	} else if (y <= 2.2e+121) {
                                      		tmp = fma(a, (t / z), t);
                                      	} else if (y <= 2.8e+247) {
                                      		tmp = t_2;
                                      	} else {
                                      		tmp = t_1;
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(x, y, z, t, a)
                                      	t_1 = Float64(Float64(x - t) * Float64(y / z))
                                      	t_2 = Float64(Float64(Float64(t - x) / a) * y)
                                      	tmp = 0.0
                                      	if (y <= -4.15e+207)
                                      		tmp = t_2;
                                      	elseif (y <= -1.35e+111)
                                      		tmp = t_1;
                                      	elseif (y <= 2.2e+121)
                                      		tmp = fma(a, Float64(t / z), t);
                                      	elseif (y <= 2.8e+247)
                                      		tmp = t_2;
                                      	else
                                      		tmp = t_1;
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - t), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[y, -4.15e+207], t$95$2, If[LessEqual[y, -1.35e+111], t$95$1, If[LessEqual[y, 2.2e+121], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[y, 2.8e+247], t$95$2, t$95$1]]]]]]
                                      
                                      \begin{array}{l}
                                      
                                      \\
                                      \begin{array}{l}
                                      t_1 := \left(x - t\right) \cdot \frac{y}{z}\\
                                      t_2 := \frac{t - x}{a} \cdot y\\
                                      \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\
                                      \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                                      
                                      \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\
                                      \;\;\;\;t\_2\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;t\_1\\
                                      
                                      
                                      \end{array}
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 3 regimes
                                      2. if y < -4.1499999999999999e207 or 2.20000000000000001e121 < y < 2.7999999999999998e247

                                        1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                          if -4.1499999999999999e207 < y < -1.3499999999999999e111 or 2.7999999999999998e247 < y

                                          1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                              \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites78.5%

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

                                              if -1.3499999999999999e111 < y < 2.20000000000000001e121

                                              1. Initial program 78.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                  \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.15 \cdot 10^{+207}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{elif}\;y \leq -1.35 \cdot 10^{+111}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+247}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\left(x - t\right) \cdot \frac{y}{z}\\ \end{array} \]
                                                6. Add Preprocessing

                                                Alternative 6: 47.9% accurate, 0.8× speedup?

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

                                                  1. Initial program 90.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--.f6465.5

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

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

                                                    if -1.19999999999999996e-29 < a < -7.2e-299

                                                    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                      if -7.2e-299 < a < 1.15999999999999996e-80

                                                      1. Initial program 68.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                        Alternative 7: 36.2% accurate, 0.8× speedup?

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

                                                          1. Initial program 98.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                            if -1.05e107 < y < 2.20000000000000001e121

                                                            1. Initial program 78.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. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                if 2.2999999999999999e272 < y

                                                                1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                      \[\leadsto \frac{-t}{z} \cdot y \]
                                                                  4. Recombined 3 regimes into one program.
                                                                  5. Final simplification42.9%

                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.05 \cdot 10^{+107}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+272}:\\ \;\;\;\;\frac{t - x}{a} \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{z} \cdot y\\ \end{array} \]
                                                                  6. Add Preprocessing

                                                                  Alternative 8: 76.2% accurate, 0.8× speedup?

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

                                                                    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    if -1.2500000000000001e68 < a < 7.2000000000000004e-42

                                                                    1. Initial program 75.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)} \]
                                                                      11. mul-1-negN/A

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

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

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

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

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

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

                                                                    if 7.2000000000000004e-42 < a

                                                                    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

                                                                  Alternative 9: 73.5% accurate, 0.8× speedup?

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

                                                                    1. Initial program 90.8%

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

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

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

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

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

                                                                    if -3.4999999999999997e-29 < a < 7.2000000000000004e-42

                                                                    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                    Alternative 10: 70.0% accurate, 0.8× speedup?

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

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

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

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

                                                                      if -3.4999999999999997e-29 < a < 1.65e-31

                                                                      1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        if 1.65e-31 < a

                                                                        1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                        Alternative 11: 61.3% accurate, 0.8× speedup?

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

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

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

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

                                                                          if -3.99999999999999977e-29 < a < 2.79999999999999988e-30

                                                                          1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

                                                                          if 2.79999999999999988e-30 < a

                                                                          1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                          Alternative 12: 62.3% accurate, 0.9× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                if -5.7999999999999996e87 < z < 5.4999999999999998e121

                                                                                1. Initial program 93.8%

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

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

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

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

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

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

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

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

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

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

                                                                              Alternative 13: 63.5% accurate, 0.9× speedup?

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

                                                                                1. Initial program 68.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                                                                  if -5.7999999999999996e87 < z < 5.4999999999999998e121

                                                                                  1. Initial program 93.8%

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

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

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

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

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

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

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

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

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                    9. lower-/.f6494.8

                                                                                      \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                  4. Applied rewrites94.8%

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                  5. Taylor expanded in a around inf

                                                                                    \[\leadsto \color{blue}{x + \frac{\left(t - x\right) \cdot \left(y - z\right)}{a}} \]
                                                                                  6. Step-by-step derivation
                                                                                    1. +-commutativeN/A

                                                                                      \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a} + x} \]
                                                                                    2. associate-/l*N/A

                                                                                      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a}} + x \]
                                                                                    3. lower-fma.f64N/A

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)} \]
                                                                                    4. lower--.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(\color{blue}{t - x}, \frac{y - z}{a}, x\right) \]
                                                                                    5. lower-/.f64N/A

                                                                                      \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a}}, x\right) \]
                                                                                    6. lower--.f6471.5

                                                                                      \[\leadsto \mathsf{fma}\left(t - x, \frac{\color{blue}{y - z}}{a}, x\right) \]
                                                                                  7. Applied rewrites71.5%

                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a}, x\right)} \]
                                                                                  8. Taylor expanded in y around inf

                                                                                    \[\leadsto \mathsf{fma}\left(t - x, \frac{y}{\color{blue}{a}}, x\right) \]
                                                                                  9. Step-by-step derivation
                                                                                    1. Applied rewrites66.7%

                                                                                      \[\leadsto \mathsf{fma}\left(t - x, \frac{y}{\color{blue}{a}}, x\right) \]

                                                                                    if 5.4999999999999998e121 < z

                                                                                    1. Initial program 57.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. lift-/.f64N/A

                                                                                        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                      6. associate-*l/N/A

                                                                                        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                      7. associate-/l*N/A

                                                                                        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                      8. lower-fma.f64N/A

                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                      9. lower-/.f6461.3

                                                                                        \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                    4. Applied rewrites61.3%

                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                    5. Taylor expanded in z around inf

                                                                                      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                    6. Step-by-step derivation
                                                                                      1. associate--l+N/A

                                                                                        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                      2. distribute-lft-out--N/A

                                                                                        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                      3. div-subN/A

                                                                                        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                      4. metadata-evalN/A

                                                                                        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                      5. fp-cancel-sub-sign-invN/A

                                                                                        \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                      6. *-lft-identityN/A

                                                                                        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                      7. lower--.f64N/A

                                                                                        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                      8. div-subN/A

                                                                                        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                      9. associate-/l*N/A

                                                                                        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                      10. associate-/l*N/A

                                                                                        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                      11. distribute-rgt-out--N/A

                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                      12. lower-*.f64N/A

                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                      13. lower-/.f64N/A

                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                      14. lower--.f64N/A

                                                                                        \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                      15. lower--.f6470.4

                                                                                        \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                    7. Applied rewrites70.4%

                                                                                      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                    8. Taylor expanded in y around 0

                                                                                      \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                    9. Step-by-step derivation
                                                                                      1. Applied rewrites59.9%

                                                                                        \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]
                                                                                      2. Taylor expanded in x around inf

                                                                                        \[\leadsto \mathsf{fma}\left(a, \frac{-1 \cdot x}{z}, t\right) \]
                                                                                      3. Step-by-step derivation
                                                                                        1. Applied rewrites60.2%

                                                                                          \[\leadsto \mathsf{fma}\left(a, \frac{-x}{z}, t\right) \]
                                                                                      4. Recombined 3 regimes into one program.
                                                                                      5. Final simplification66.4%

                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(t - x, \frac{y}{a}, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \end{array} \]
                                                                                      6. Add Preprocessing

                                                                                      Alternative 14: 62.4% accurate, 0.9× speedup?

                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \end{array} \end{array} \]
                                                                                      (FPCore (x y z t a)
                                                                                       :precision binary64
                                                                                       (if (<= z -5.8e+87)
                                                                                         (fma a (/ (- t x) z) t)
                                                                                         (if (<= z 5.5e+121) (fma (/ (- t x) a) y x) (fma a (/ (- x) z) t))))
                                                                                      double code(double x, double y, double z, double t, double a) {
                                                                                      	double tmp;
                                                                                      	if (z <= -5.8e+87) {
                                                                                      		tmp = fma(a, ((t - x) / z), t);
                                                                                      	} else if (z <= 5.5e+121) {
                                                                                      		tmp = fma(((t - x) / a), y, x);
                                                                                      	} else {
                                                                                      		tmp = fma(a, (-x / z), t);
                                                                                      	}
                                                                                      	return tmp;
                                                                                      }
                                                                                      
                                                                                      function code(x, y, z, t, a)
                                                                                      	tmp = 0.0
                                                                                      	if (z <= -5.8e+87)
                                                                                      		tmp = fma(a, Float64(Float64(t - x) / z), t);
                                                                                      	elseif (z <= 5.5e+121)
                                                                                      		tmp = fma(Float64(Float64(t - x) / a), y, x);
                                                                                      	else
                                                                                      		tmp = fma(a, Float64(Float64(-x) / z), t);
                                                                                      	end
                                                                                      	return tmp
                                                                                      end
                                                                                      
                                                                                      code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+87], N[(a * N[(N[(t - x), $MachinePrecision] / z), $MachinePrecision] + t), $MachinePrecision], If[LessEqual[z, 5.5e+121], N[(N[(N[(t - x), $MachinePrecision] / a), $MachinePrecision] * y + x), $MachinePrecision], N[(a * N[((-x) / z), $MachinePrecision] + t), $MachinePrecision]]]
                                                                                      
                                                                                      \begin{array}{l}
                                                                                      
                                                                                      \\
                                                                                      \begin{array}{l}
                                                                                      \mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\
                                                                                      
                                                                                      \mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\
                                                                                      
                                                                                      \mathbf{else}:\\
                                                                                      \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\
                                                                                      
                                                                                      
                                                                                      \end{array}
                                                                                      \end{array}
                                                                                      
                                                                                      Derivation
                                                                                      1. Split input into 3 regimes
                                                                                      2. if z < -5.7999999999999996e87

                                                                                        1. Initial program 68.9%

                                                                                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                        2. Add Preprocessing
                                                                                        3. Step-by-step derivation
                                                                                          1. lift-+.f64N/A

                                                                                            \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                                                                                          2. +-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                                                                                          3. lift-*.f64N/A

                                                                                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                                                                                          4. *-commutativeN/A

                                                                                            \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                          5. lift-/.f64N/A

                                                                                            \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                          6. associate-*l/N/A

                                                                                            \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                          7. associate-/l*N/A

                                                                                            \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                          8. lower-fma.f64N/A

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                          9. lower-/.f6471.4

                                                                                            \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                        4. Applied rewrites71.4%

                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                        5. Taylor expanded in z around inf

                                                                                          \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                        6. Step-by-step derivation
                                                                                          1. associate--l+N/A

                                                                                            \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                          2. distribute-lft-out--N/A

                                                                                            \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                          3. div-subN/A

                                                                                            \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                          4. metadata-evalN/A

                                                                                            \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                          5. fp-cancel-sub-sign-invN/A

                                                                                            \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                          6. *-lft-identityN/A

                                                                                            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                          7. lower--.f64N/A

                                                                                            \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                          8. div-subN/A

                                                                                            \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                          9. associate-/l*N/A

                                                                                            \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                          10. associate-/l*N/A

                                                                                            \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                          11. distribute-rgt-out--N/A

                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                          12. lower-*.f64N/A

                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                          13. lower-/.f64N/A

                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                          14. lower--.f64N/A

                                                                                            \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                          15. lower--.f6490.5

                                                                                            \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                        7. Applied rewrites90.5%

                                                                                          \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                        8. Taylor expanded in y around 0

                                                                                          \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                        9. Step-by-step derivation
                                                                                          1. Applied rewrites69.8%

                                                                                            \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]

                                                                                          if -5.7999999999999996e87 < z < 5.4999999999999998e121

                                                                                          1. Initial program 93.8%

                                                                                            \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                          2. Add Preprocessing
                                                                                          3. Taylor expanded in z around 0

                                                                                            \[\leadsto \color{blue}{x + \frac{y \cdot \left(t - x\right)}{a}} \]
                                                                                          4. Step-by-step derivation
                                                                                            1. +-commutativeN/A

                                                                                              \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a} + x} \]
                                                                                            2. associate-/l*N/A

                                                                                              \[\leadsto \color{blue}{y \cdot \frac{t - x}{a}} + x \]
                                                                                            3. *-commutativeN/A

                                                                                              \[\leadsto \color{blue}{\frac{t - x}{a} \cdot y} + x \]
                                                                                            4. lower-fma.f64N/A

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)} \]
                                                                                            5. lower-/.f64N/A

                                                                                              \[\leadsto \mathsf{fma}\left(\color{blue}{\frac{t - x}{a}}, y, x\right) \]
                                                                                            6. lower--.f6466.6

                                                                                              \[\leadsto \mathsf{fma}\left(\frac{\color{blue}{t - x}}{a}, y, x\right) \]
                                                                                          5. Applied rewrites66.6%

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)} \]

                                                                                          if 5.4999999999999998e121 < z

                                                                                          1. Initial program 57.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. lift-/.f64N/A

                                                                                              \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                            6. associate-*l/N/A

                                                                                              \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                            7. associate-/l*N/A

                                                                                              \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                            8. lower-fma.f64N/A

                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                            9. lower-/.f6461.3

                                                                                              \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                          4. Applied rewrites61.3%

                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                          5. Taylor expanded in z around inf

                                                                                            \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                          6. Step-by-step derivation
                                                                                            1. associate--l+N/A

                                                                                              \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                            2. distribute-lft-out--N/A

                                                                                              \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                            3. div-subN/A

                                                                                              \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                            4. metadata-evalN/A

                                                                                              \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                            5. fp-cancel-sub-sign-invN/A

                                                                                              \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                            6. *-lft-identityN/A

                                                                                              \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                            7. lower--.f64N/A

                                                                                              \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                            8. div-subN/A

                                                                                              \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                            9. associate-/l*N/A

                                                                                              \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                            10. associate-/l*N/A

                                                                                              \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                            11. distribute-rgt-out--N/A

                                                                                              \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                            12. lower-*.f64N/A

                                                                                              \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                            13. lower-/.f64N/A

                                                                                              \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                            14. lower--.f64N/A

                                                                                              \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                            15. lower--.f6470.4

                                                                                              \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                          7. Applied rewrites70.4%

                                                                                            \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                          8. Taylor expanded in y around 0

                                                                                            \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                          9. Step-by-step derivation
                                                                                            1. Applied rewrites59.9%

                                                                                              \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]
                                                                                            2. Taylor expanded in x around inf

                                                                                              \[\leadsto \mathsf{fma}\left(a, \frac{-1 \cdot x}{z}, t\right) \]
                                                                                            3. Step-by-step derivation
                                                                                              1. Applied rewrites60.2%

                                                                                                \[\leadsto \mathsf{fma}\left(a, \frac{-x}{z}, t\right) \]
                                                                                            4. Recombined 3 regimes into one program.
                                                                                            5. Final simplification66.3%

                                                                                              \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+87}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t - x}{z}, t\right)\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+121}:\\ \;\;\;\;\mathsf{fma}\left(\frac{t - x}{a}, y, x\right)\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{-x}{z}, t\right)\\ \end{array} \]
                                                                                            6. Add Preprocessing

                                                                                            Alternative 15: 38.0% accurate, 0.9× speedup?

                                                                                            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-10} \lor \neg \left(z \leq 6.8 \cdot 10^{-10}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \end{array} \]
                                                                                            (FPCore (x y z t a)
                                                                                             :precision binary64
                                                                                             (if (or (<= z -1.2e-10) (not (<= z 6.8e-10)))
                                                                                               (fma a (/ t z) t)
                                                                                               (* t (/ y (- a z)))))
                                                                                            double code(double x, double y, double z, double t, double a) {
                                                                                            	double tmp;
                                                                                            	if ((z <= -1.2e-10) || !(z <= 6.8e-10)) {
                                                                                            		tmp = fma(a, (t / z), t);
                                                                                            	} else {
                                                                                            		tmp = t * (y / (a - z));
                                                                                            	}
                                                                                            	return tmp;
                                                                                            }
                                                                                            
                                                                                            function code(x, y, z, t, a)
                                                                                            	tmp = 0.0
                                                                                            	if ((z <= -1.2e-10) || !(z <= 6.8e-10))
                                                                                            		tmp = fma(a, Float64(t / z), t);
                                                                                            	else
                                                                                            		tmp = Float64(t * Float64(y / Float64(a - z)));
                                                                                            	end
                                                                                            	return tmp
                                                                                            end
                                                                                            
                                                                                            code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.2e-10], N[Not[LessEqual[z, 6.8e-10]], $MachinePrecision]], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(t * N[(y / N[(a - z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
                                                                                            
                                                                                            \begin{array}{l}
                                                                                            
                                                                                            \\
                                                                                            \begin{array}{l}
                                                                                            \mathbf{if}\;z \leq -1.2 \cdot 10^{-10} \lor \neg \left(z \leq 6.8 \cdot 10^{-10}\right):\\
                                                                                            \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                                                                                            
                                                                                            \mathbf{else}:\\
                                                                                            \;\;\;\;t \cdot \frac{y}{a - z}\\
                                                                                            
                                                                                            
                                                                                            \end{array}
                                                                                            \end{array}
                                                                                            
                                                                                            Derivation
                                                                                            1. Split input into 2 regimes
                                                                                            2. if z < -1.2e-10 or 6.8000000000000003e-10 < z

                                                                                              1. Initial program 74.4%

                                                                                                \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                              2. Add Preprocessing
                                                                                              3. Step-by-step derivation
                                                                                                1. lift-+.f64N/A

                                                                                                  \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                                                                                                2. +-commutativeN/A

                                                                                                  \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                                                                                                3. lift-*.f64N/A

                                                                                                  \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                                                                                                4. *-commutativeN/A

                                                                                                  \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                5. lift-/.f64N/A

                                                                                                  \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                6. associate-*l/N/A

                                                                                                  \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                7. associate-/l*N/A

                                                                                                  \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                8. lower-fma.f64N/A

                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                9. lower-/.f6476.3

                                                                                                  \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                              4. Applied rewrites76.3%

                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                              5. Taylor expanded in z around inf

                                                                                                \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                              6. Step-by-step derivation
                                                                                                1. associate--l+N/A

                                                                                                  \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                2. distribute-lft-out--N/A

                                                                                                  \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                3. div-subN/A

                                                                                                  \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                4. metadata-evalN/A

                                                                                                  \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                5. fp-cancel-sub-sign-invN/A

                                                                                                  \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                6. *-lft-identityN/A

                                                                                                  \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                7. lower--.f64N/A

                                                                                                  \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                8. div-subN/A

                                                                                                  \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                9. associate-/l*N/A

                                                                                                  \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                10. associate-/l*N/A

                                                                                                  \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                11. distribute-rgt-out--N/A

                                                                                                  \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                12. lower-*.f64N/A

                                                                                                  \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                13. lower-/.f64N/A

                                                                                                  \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                14. lower--.f64N/A

                                                                                                  \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                15. lower--.f6470.6

                                                                                                  \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                              7. Applied rewrites70.6%

                                                                                                \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                              8. Taylor expanded in y around 0

                                                                                                \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                              9. Step-by-step derivation
                                                                                                1. Applied rewrites49.6%

                                                                                                  \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]
                                                                                                2. Taylor expanded in x around 0

                                                                                                  \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]
                                                                                                3. Step-by-step derivation
                                                                                                  1. Applied rewrites43.5%

                                                                                                    \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]

                                                                                                  if -1.2e-10 < z < 6.8000000000000003e-10

                                                                                                  1. Initial program 93.9%

                                                                                                    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                  2. Add Preprocessing
                                                                                                  3. Taylor expanded in y around inf

                                                                                                    \[\leadsto \color{blue}{y \cdot \left(\frac{t}{a - z} - \frac{x}{a - z}\right)} \]
                                                                                                  4. Step-by-step derivation
                                                                                                    1. div-subN/A

                                                                                                      \[\leadsto y \cdot \color{blue}{\frac{t - x}{a - z}} \]
                                                                                                    2. associate-/l*N/A

                                                                                                      \[\leadsto \color{blue}{\frac{y \cdot \left(t - x\right)}{a - z}} \]
                                                                                                    3. *-commutativeN/A

                                                                                                      \[\leadsto \frac{\color{blue}{\left(t - x\right) \cdot y}}{a - z} \]
                                                                                                    4. associate-/l*N/A

                                                                                                      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
                                                                                                    5. lower-*.f64N/A

                                                                                                      \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
                                                                                                    6. lower--.f64N/A

                                                                                                      \[\leadsto \color{blue}{\left(t - x\right)} \cdot \frac{y}{a - z} \]
                                                                                                    7. lower-/.f64N/A

                                                                                                      \[\leadsto \left(t - x\right) \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                                                    8. lower--.f6453.6

                                                                                                      \[\leadsto \left(t - x\right) \cdot \frac{y}{\color{blue}{a - z}} \]
                                                                                                  5. Applied rewrites53.6%

                                                                                                    \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y}{a - z}} \]
                                                                                                  6. Taylor expanded in x around 0

                                                                                                    \[\leadsto \frac{t \cdot y}{\color{blue}{a - z}} \]
                                                                                                  7. Step-by-step derivation
                                                                                                    1. Applied rewrites36.5%

                                                                                                      \[\leadsto t \cdot \color{blue}{\frac{y}{a - z}} \]
                                                                                                  8. Recombined 2 regimes into one program.
                                                                                                  9. Final simplification40.0%

                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-10} \lor \neg \left(z \leq 6.8 \cdot 10^{-10}\right):\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;t \cdot \frac{y}{a - z}\\ \end{array} \]
                                                                                                  10. Add Preprocessing

                                                                                                  Alternative 16: 31.1% accurate, 0.9× speedup?

                                                                                                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+122} \lor \neg \left(y \leq 1.65 \cdot 10^{+139}\right):\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \end{array} \end{array} \]
                                                                                                  (FPCore (x y z t a)
                                                                                                   :precision binary64
                                                                                                   (if (or (<= y -5.8e+122) (not (<= y 1.65e+139)))
                                                                                                     (* (- t) (/ y z))
                                                                                                     (fma a (/ t z) t)))
                                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                                  	double tmp;
                                                                                                  	if ((y <= -5.8e+122) || !(y <= 1.65e+139)) {
                                                                                                  		tmp = -t * (y / z);
                                                                                                  	} else {
                                                                                                  		tmp = fma(a, (t / z), t);
                                                                                                  	}
                                                                                                  	return tmp;
                                                                                                  }
                                                                                                  
                                                                                                  function code(x, y, z, t, a)
                                                                                                  	tmp = 0.0
                                                                                                  	if ((y <= -5.8e+122) || !(y <= 1.65e+139))
                                                                                                  		tmp = Float64(Float64(-t) * Float64(y / z));
                                                                                                  	else
                                                                                                  		tmp = fma(a, Float64(t / z), t);
                                                                                                  	end
                                                                                                  	return tmp
                                                                                                  end
                                                                                                  
                                                                                                  code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -5.8e+122], N[Not[LessEqual[y, 1.65e+139]], $MachinePrecision]], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision]]
                                                                                                  
                                                                                                  \begin{array}{l}
                                                                                                  
                                                                                                  \\
                                                                                                  \begin{array}{l}
                                                                                                  \mathbf{if}\;y \leq -5.8 \cdot 10^{+122} \lor \neg \left(y \leq 1.65 \cdot 10^{+139}\right):\\
                                                                                                  \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
                                                                                                  
                                                                                                  \mathbf{else}:\\
                                                                                                  \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                                                                                                  
                                                                                                  
                                                                                                  \end{array}
                                                                                                  \end{array}
                                                                                                  
                                                                                                  Derivation
                                                                                                  1. Split input into 2 regimes
                                                                                                  2. if y < -5.8000000000000002e122 or 1.6500000000000001e139 < y

                                                                                                    1. Initial program 97.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. lift-/.f64N/A

                                                                                                        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                      6. associate-*l/N/A

                                                                                                        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                      7. associate-/l*N/A

                                                                                                        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                      8. lower-fma.f64N/A

                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                      9. lower-/.f6497.4

                                                                                                        \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                    4. Applied rewrites97.4%

                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                    5. Taylor expanded in z around inf

                                                                                                      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                    6. Step-by-step derivation
                                                                                                      1. associate--l+N/A

                                                                                                        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                      2. distribute-lft-out--N/A

                                                                                                        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                      3. div-subN/A

                                                                                                        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                      4. metadata-evalN/A

                                                                                                        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                      5. fp-cancel-sub-sign-invN/A

                                                                                                        \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                      6. *-lft-identityN/A

                                                                                                        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                      7. lower--.f64N/A

                                                                                                        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                      8. div-subN/A

                                                                                                        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                      9. associate-/l*N/A

                                                                                                        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                      10. associate-/l*N/A

                                                                                                        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                      11. distribute-rgt-out--N/A

                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                      12. lower-*.f64N/A

                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                      13. lower-/.f64N/A

                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                      14. lower--.f64N/A

                                                                                                        \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                      15. lower--.f6466.2

                                                                                                        \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                    7. Applied rewrites66.2%

                                                                                                      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                    8. Taylor expanded in y around inf

                                                                                                      \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                    9. Step-by-step derivation
                                                                                                      1. Applied rewrites60.8%

                                                                                                        \[\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 rewrites44.7%

                                                                                                          \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{z}} \]

                                                                                                        if -5.8000000000000002e122 < y < 1.6500000000000001e139

                                                                                                        1. Initial program 79.1%

                                                                                                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                        2. Add Preprocessing
                                                                                                        3. Step-by-step derivation
                                                                                                          1. lift-+.f64N/A

                                                                                                            \[\leadsto \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. lift-/.f64N/A

                                                                                                            \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                          6. associate-*l/N/A

                                                                                                            \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                          7. associate-/l*N/A

                                                                                                            \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                          8. lower-fma.f64N/A

                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                          9. lower-/.f6481.4

                                                                                                            \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                        4. Applied rewrites81.4%

                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                        5. Taylor expanded in z around inf

                                                                                                          \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                        6. Step-by-step derivation
                                                                                                          1. associate--l+N/A

                                                                                                            \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                          2. distribute-lft-out--N/A

                                                                                                            \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                          3. div-subN/A

                                                                                                            \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                          4. metadata-evalN/A

                                                                                                            \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                          5. fp-cancel-sub-sign-invN/A

                                                                                                            \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                          6. *-lft-identityN/A

                                                                                                            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                          7. lower--.f64N/A

                                                                                                            \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                          8. div-subN/A

                                                                                                            \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                          9. associate-/l*N/A

                                                                                                            \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                          10. associate-/l*N/A

                                                                                                            \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                          11. distribute-rgt-out--N/A

                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                          12. lower-*.f64N/A

                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                          13. lower-/.f64N/A

                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                          14. lower--.f64N/A

                                                                                                            \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                          15. lower--.f6448.0

                                                                                                            \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                        7. Applied rewrites48.0%

                                                                                                          \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                        8. Taylor expanded in y around 0

                                                                                                          \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                        9. Step-by-step derivation
                                                                                                          1. Applied rewrites38.7%

                                                                                                            \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]
                                                                                                          2. Taylor expanded in x around 0

                                                                                                            \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]
                                                                                                          3. Step-by-step derivation
                                                                                                            1. Applied rewrites33.1%

                                                                                                              \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]
                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                          5. Final simplification36.2%

                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+122} \lor \neg \left(y \leq 1.65 \cdot 10^{+139}\right):\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \end{array} \]
                                                                                                          6. Add Preprocessing

                                                                                                          Alternative 17: 30.9% accurate, 0.9× speedup?

                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+122}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{z} \cdot y\\ \end{array} \end{array} \]
                                                                                                          (FPCore (x y z t a)
                                                                                                           :precision binary64
                                                                                                           (if (<= y -5.8e+122)
                                                                                                             (* (- t) (/ y z))
                                                                                                             (if (<= y 1.65e+139) (fma a (/ t z) t) (* (/ (- t) z) y))))
                                                                                                          double code(double x, double y, double z, double t, double a) {
                                                                                                          	double tmp;
                                                                                                          	if (y <= -5.8e+122) {
                                                                                                          		tmp = -t * (y / z);
                                                                                                          	} else if (y <= 1.65e+139) {
                                                                                                          		tmp = fma(a, (t / z), t);
                                                                                                          	} else {
                                                                                                          		tmp = (-t / z) * y;
                                                                                                          	}
                                                                                                          	return tmp;
                                                                                                          }
                                                                                                          
                                                                                                          function code(x, y, z, t, a)
                                                                                                          	tmp = 0.0
                                                                                                          	if (y <= -5.8e+122)
                                                                                                          		tmp = Float64(Float64(-t) * Float64(y / z));
                                                                                                          	elseif (y <= 1.65e+139)
                                                                                                          		tmp = fma(a, Float64(t / z), t);
                                                                                                          	else
                                                                                                          		tmp = Float64(Float64(Float64(-t) / z) * y);
                                                                                                          	end
                                                                                                          	return tmp
                                                                                                          end
                                                                                                          
                                                                                                          code[x_, y_, z_, t_, a_] := If[LessEqual[y, -5.8e+122], N[((-t) * N[(y / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1.65e+139], N[(a * N[(t / z), $MachinePrecision] + t), $MachinePrecision], N[(N[((-t) / z), $MachinePrecision] * y), $MachinePrecision]]]
                                                                                                          
                                                                                                          \begin{array}{l}
                                                                                                          
                                                                                                          \\
                                                                                                          \begin{array}{l}
                                                                                                          \mathbf{if}\;y \leq -5.8 \cdot 10^{+122}:\\
                                                                                                          \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\
                                                                                                          
                                                                                                          \mathbf{elif}\;y \leq 1.65 \cdot 10^{+139}:\\
                                                                                                          \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\
                                                                                                          
                                                                                                          \mathbf{else}:\\
                                                                                                          \;\;\;\;\frac{-t}{z} \cdot y\\
                                                                                                          
                                                                                                          
                                                                                                          \end{array}
                                                                                                          \end{array}
                                                                                                          
                                                                                                          Derivation
                                                                                                          1. Split input into 3 regimes
                                                                                                          2. if y < -5.8000000000000002e122

                                                                                                            1. Initial program 100.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. *-commutativeN/A

                                                                                                                \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                              5. lift-/.f64N/A

                                                                                                                \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                              6. associate-*l/N/A

                                                                                                                \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                              7. associate-/l*N/A

                                                                                                                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                              8. lower-fma.f64N/A

                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                              9. lower-/.f6497.2

                                                                                                                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                            4. Applied rewrites97.2%

                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                            5. Taylor expanded in z around inf

                                                                                                              \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                            6. Step-by-step derivation
                                                                                                              1. associate--l+N/A

                                                                                                                \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                              2. distribute-lft-out--N/A

                                                                                                                \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                              3. div-subN/A

                                                                                                                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                              4. metadata-evalN/A

                                                                                                                \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                              5. fp-cancel-sub-sign-invN/A

                                                                                                                \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                              6. *-lft-identityN/A

                                                                                                                \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                              7. lower--.f64N/A

                                                                                                                \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                              8. div-subN/A

                                                                                                                \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                              9. associate-/l*N/A

                                                                                                                \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                              10. associate-/l*N/A

                                                                                                                \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                              11. distribute-rgt-out--N/A

                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                              12. lower-*.f64N/A

                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                              13. lower-/.f64N/A

                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                              14. lower--.f64N/A

                                                                                                                \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                              15. lower--.f6464.0

                                                                                                                \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                            7. Applied rewrites64.0%

                                                                                                              \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                            8. Taylor expanded in y around inf

                                                                                                              \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                            9. Step-by-step derivation
                                                                                                              1. Applied rewrites55.5%

                                                                                                                \[\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 rewrites38.7%

                                                                                                                  \[\leadsto \left(-t\right) \cdot \frac{y}{\color{blue}{z}} \]

                                                                                                                if -5.8000000000000002e122 < y < 1.6500000000000001e139

                                                                                                                1. Initial program 79.1%

                                                                                                                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                2. Add Preprocessing
                                                                                                                3. Step-by-step derivation
                                                                                                                  1. lift-+.f64N/A

                                                                                                                    \[\leadsto \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. lift-/.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                                  6. associate-*l/N/A

                                                                                                                    \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                                  7. associate-/l*N/A

                                                                                                                    \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                                  8. lower-fma.f64N/A

                                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                  9. lower-/.f6481.4

                                                                                                                    \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                                4. Applied rewrites81.4%

                                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                5. Taylor expanded in z around inf

                                                                                                                  \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                6. Step-by-step derivation
                                                                                                                  1. associate--l+N/A

                                                                                                                    \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                  2. distribute-lft-out--N/A

                                                                                                                    \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                  3. div-subN/A

                                                                                                                    \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                  4. metadata-evalN/A

                                                                                                                    \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                                  5. fp-cancel-sub-sign-invN/A

                                                                                                                    \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                  6. *-lft-identityN/A

                                                                                                                    \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                  7. lower--.f64N/A

                                                                                                                    \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                  8. div-subN/A

                                                                                                                    \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                  9. associate-/l*N/A

                                                                                                                    \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                                  10. associate-/l*N/A

                                                                                                                    \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                                  11. distribute-rgt-out--N/A

                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                  12. lower-*.f64N/A

                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                  13. lower-/.f64N/A

                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                                  14. lower--.f64N/A

                                                                                                                    \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                                  15. lower--.f6448.0

                                                                                                                    \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                                7. Applied rewrites48.0%

                                                                                                                  \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                8. Taylor expanded in y around 0

                                                                                                                  \[\leadsto t - \color{blue}{-1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                9. Step-by-step derivation
                                                                                                                  1. Applied rewrites38.7%

                                                                                                                    \[\leadsto \mathsf{fma}\left(a, \color{blue}{\frac{t - x}{z}}, t\right) \]
                                                                                                                  2. Taylor expanded in x around 0

                                                                                                                    \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]
                                                                                                                  3. Step-by-step derivation
                                                                                                                    1. Applied rewrites33.1%

                                                                                                                      \[\leadsto \mathsf{fma}\left(a, \frac{t}{z}, t\right) \]

                                                                                                                    if 1.6500000000000001e139 < y

                                                                                                                    1. Initial program 94.8%

                                                                                                                      \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                    2. Add Preprocessing
                                                                                                                    3. Step-by-step derivation
                                                                                                                      1. lift-+.f64N/A

                                                                                                                        \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                                                                                                                      2. +-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                                                                                                                      3. lift-*.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                                                                                                                      4. *-commutativeN/A

                                                                                                                        \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                                      5. lift-/.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                                      6. associate-*l/N/A

                                                                                                                        \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                                      7. associate-/l*N/A

                                                                                                                        \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                                      8. lower-fma.f64N/A

                                                                                                                        \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                      9. lower-/.f6497.6

                                                                                                                        \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                                    4. Applied rewrites97.6%

                                                                                                                      \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                    5. Taylor expanded in z around inf

                                                                                                                      \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                    6. Step-by-step derivation
                                                                                                                      1. associate--l+N/A

                                                                                                                        \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                      2. distribute-lft-out--N/A

                                                                                                                        \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                      3. div-subN/A

                                                                                                                        \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                      4. metadata-evalN/A

                                                                                                                        \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                                      5. fp-cancel-sub-sign-invN/A

                                                                                                                        \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                      6. *-lft-identityN/A

                                                                                                                        \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                      7. lower--.f64N/A

                                                                                                                        \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                      8. div-subN/A

                                                                                                                        \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                      9. associate-/l*N/A

                                                                                                                        \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                                      10. associate-/l*N/A

                                                                                                                        \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                                      11. distribute-rgt-out--N/A

                                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                      12. lower-*.f64N/A

                                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                      13. lower-/.f64N/A

                                                                                                                        \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                                      14. lower--.f64N/A

                                                                                                                        \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                                      15. lower--.f6468.5

                                                                                                                        \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                                    7. Applied rewrites68.5%

                                                                                                                      \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                    8. Taylor expanded in y around inf

                                                                                                                      \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                                    9. Step-by-step derivation
                                                                                                                      1. Applied rewrites66.4%

                                                                                                                        \[\leadsto \frac{x - t}{z} \cdot \color{blue}{y} \]
                                                                                                                      2. Taylor expanded in x around 0

                                                                                                                        \[\leadsto \left(-1 \cdot \frac{t}{z}\right) \cdot y \]
                                                                                                                      3. Step-by-step derivation
                                                                                                                        1. Applied rewrites51.2%

                                                                                                                          \[\leadsto \frac{-t}{z} \cdot y \]
                                                                                                                      4. Recombined 3 regimes into one program.
                                                                                                                      5. Final simplification36.3%

                                                                                                                        \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{+122}:\\ \;\;\;\;\left(-t\right) \cdot \frac{y}{z}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+139}:\\ \;\;\;\;\mathsf{fma}\left(a, \frac{t}{z}, t\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-t}{z} \cdot y\\ \end{array} \]
                                                                                                                      6. Add Preprocessing

                                                                                                                      Alternative 18: 24.0% accurate, 1.0× speedup?

                                                                                                                      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+109} \lor \neg \left(y \leq 4.3 \cdot 10^{+77}\right):\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right)\\ \end{array} \end{array} \]
                                                                                                                      (FPCore (x y z t a)
                                                                                                                       :precision binary64
                                                                                                                       (if (or (<= y -1.55e+109) (not (<= y 4.3e+77))) (/ (* y x) z) (+ x (- t x))))
                                                                                                                      double code(double x, double y, double z, double t, double a) {
                                                                                                                      	double tmp;
                                                                                                                      	if ((y <= -1.55e+109) || !(y <= 4.3e+77)) {
                                                                                                                      		tmp = (y * x) / z;
                                                                                                                      	} else {
                                                                                                                      		tmp = x + (t - 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 <= (-1.55d+109)) .or. (.not. (y <= 4.3d+77))) then
                                                                                                                              tmp = (y * x) / z
                                                                                                                          else
                                                                                                                              tmp = x + (t - 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 <= -1.55e+109) || !(y <= 4.3e+77)) {
                                                                                                                      		tmp = (y * x) / z;
                                                                                                                      	} else {
                                                                                                                      		tmp = x + (t - x);
                                                                                                                      	}
                                                                                                                      	return tmp;
                                                                                                                      }
                                                                                                                      
                                                                                                                      def code(x, y, z, t, a):
                                                                                                                      	tmp = 0
                                                                                                                      	if (y <= -1.55e+109) or not (y <= 4.3e+77):
                                                                                                                      		tmp = (y * x) / z
                                                                                                                      	else:
                                                                                                                      		tmp = x + (t - x)
                                                                                                                      	return tmp
                                                                                                                      
                                                                                                                      function code(x, y, z, t, a)
                                                                                                                      	tmp = 0.0
                                                                                                                      	if ((y <= -1.55e+109) || !(y <= 4.3e+77))
                                                                                                                      		tmp = Float64(Float64(y * x) / z);
                                                                                                                      	else
                                                                                                                      		tmp = Float64(x + Float64(t - x));
                                                                                                                      	end
                                                                                                                      	return tmp
                                                                                                                      end
                                                                                                                      
                                                                                                                      function tmp_2 = code(x, y, z, t, a)
                                                                                                                      	tmp = 0.0;
                                                                                                                      	if ((y <= -1.55e+109) || ~((y <= 4.3e+77)))
                                                                                                                      		tmp = (y * x) / z;
                                                                                                                      	else
                                                                                                                      		tmp = x + (t - x);
                                                                                                                      	end
                                                                                                                      	tmp_2 = tmp;
                                                                                                                      end
                                                                                                                      
                                                                                                                      code[x_, y_, z_, t_, a_] := If[Or[LessEqual[y, -1.55e+109], N[Not[LessEqual[y, 4.3e+77]], $MachinePrecision]], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]]
                                                                                                                      
                                                                                                                      \begin{array}{l}
                                                                                                                      
                                                                                                                      \\
                                                                                                                      \begin{array}{l}
                                                                                                                      \mathbf{if}\;y \leq -1.55 \cdot 10^{+109} \lor \neg \left(y \leq 4.3 \cdot 10^{+77}\right):\\
                                                                                                                      \;\;\;\;\frac{y \cdot x}{z}\\
                                                                                                                      
                                                                                                                      \mathbf{else}:\\
                                                                                                                      \;\;\;\;x + \left(t - x\right)\\
                                                                                                                      
                                                                                                                      
                                                                                                                      \end{array}
                                                                                                                      \end{array}
                                                                                                                      
                                                                                                                      Derivation
                                                                                                                      1. Split input into 2 regimes
                                                                                                                      2. if y < -1.54999999999999996e109 or 4.29999999999999991e77 < y

                                                                                                                        1. Initial program 96.4%

                                                                                                                          \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                        2. Add Preprocessing
                                                                                                                        3. Step-by-step derivation
                                                                                                                          1. lift-+.f64N/A

                                                                                                                            \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                                                                                                                          2. +-commutativeN/A

                                                                                                                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                                                                                                                          3. lift-*.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                                                                                                                          4. *-commutativeN/A

                                                                                                                            \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                                          5. lift-/.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                                          6. associate-*l/N/A

                                                                                                                            \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                                          7. associate-/l*N/A

                                                                                                                            \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                                          8. lower-fma.f64N/A

                                                                                                                            \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                          9. lower-/.f6496.4

                                                                                                                            \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                                        4. Applied rewrites96.4%

                                                                                                                          \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                        5. Taylor expanded in z around inf

                                                                                                                          \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                        6. Step-by-step derivation
                                                                                                                          1. associate--l+N/A

                                                                                                                            \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                          2. distribute-lft-out--N/A

                                                                                                                            \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                          3. div-subN/A

                                                                                                                            \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                          4. metadata-evalN/A

                                                                                                                            \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                                          5. fp-cancel-sub-sign-invN/A

                                                                                                                            \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                          6. *-lft-identityN/A

                                                                                                                            \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                          7. lower--.f64N/A

                                                                                                                            \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                          8. div-subN/A

                                                                                                                            \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                          9. associate-/l*N/A

                                                                                                                            \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                                          10. associate-/l*N/A

                                                                                                                            \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                                          11. distribute-rgt-out--N/A

                                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                          12. lower-*.f64N/A

                                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                          13. lower-/.f64N/A

                                                                                                                            \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                                          14. lower--.f64N/A

                                                                                                                            \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                                          15. lower--.f6464.7

                                                                                                                            \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                                        7. Applied rewrites64.7%

                                                                                                                          \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                        8. Taylor expanded in y around inf

                                                                                                                          \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                                        9. Step-by-step derivation
                                                                                                                          1. Applied rewrites57.0%

                                                                                                                            \[\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 rewrites36.9%

                                                                                                                              \[\leadsto \frac{y \cdot x}{z} \]

                                                                                                                            if -1.54999999999999996e109 < y < 4.29999999999999991e77

                                                                                                                            1. Initial program 77.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--.f6424.5

                                                                                                                                \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                            5. Applied rewrites24.5%

                                                                                                                              \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                          4. Recombined 2 regimes into one program.
                                                                                                                          5. Final simplification28.6%

                                                                                                                            \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+109} \lor \neg \left(y \leq 4.3 \cdot 10^{+77}\right):\\ \;\;\;\;\frac{y \cdot x}{z}\\ \mathbf{else}:\\ \;\;\;\;x + \left(t - x\right)\\ \end{array} \]
                                                                                                                          6. Add Preprocessing

                                                                                                                          Alternative 19: 24.8% accurate, 1.0× speedup?

                                                                                                                          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+109}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+77}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \end{array} \]
                                                                                                                          (FPCore (x y z t a)
                                                                                                                           :precision binary64
                                                                                                                           (if (<= y -1.55e+109)
                                                                                                                             (* (/ x z) y)
                                                                                                                             (if (<= y 4.3e+77) (+ x (- t x)) (/ (* y x) z))))
                                                                                                                          double code(double x, double y, double z, double t, double a) {
                                                                                                                          	double tmp;
                                                                                                                          	if (y <= -1.55e+109) {
                                                                                                                          		tmp = (x / z) * y;
                                                                                                                          	} else if (y <= 4.3e+77) {
                                                                                                                          		tmp = x + (t - x);
                                                                                                                          	} else {
                                                                                                                          		tmp = (y * x) / z;
                                                                                                                          	}
                                                                                                                          	return tmp;
                                                                                                                          }
                                                                                                                          
                                                                                                                          real(8) function code(x, y, z, t, a)
                                                                                                                              real(8), intent (in) :: x
                                                                                                                              real(8), intent (in) :: y
                                                                                                                              real(8), intent (in) :: z
                                                                                                                              real(8), intent (in) :: t
                                                                                                                              real(8), intent (in) :: a
                                                                                                                              real(8) :: tmp
                                                                                                                              if (y <= (-1.55d+109)) then
                                                                                                                                  tmp = (x / z) * y
                                                                                                                              else if (y <= 4.3d+77) then
                                                                                                                                  tmp = x + (t - x)
                                                                                                                              else
                                                                                                                                  tmp = (y * x) / z
                                                                                                                              end if
                                                                                                                              code = tmp
                                                                                                                          end function
                                                                                                                          
                                                                                                                          public static double code(double x, double y, double z, double t, double a) {
                                                                                                                          	double tmp;
                                                                                                                          	if (y <= -1.55e+109) {
                                                                                                                          		tmp = (x / z) * y;
                                                                                                                          	} else if (y <= 4.3e+77) {
                                                                                                                          		tmp = x + (t - x);
                                                                                                                          	} else {
                                                                                                                          		tmp = (y * x) / z;
                                                                                                                          	}
                                                                                                                          	return tmp;
                                                                                                                          }
                                                                                                                          
                                                                                                                          def code(x, y, z, t, a):
                                                                                                                          	tmp = 0
                                                                                                                          	if y <= -1.55e+109:
                                                                                                                          		tmp = (x / z) * y
                                                                                                                          	elif y <= 4.3e+77:
                                                                                                                          		tmp = x + (t - x)
                                                                                                                          	else:
                                                                                                                          		tmp = (y * x) / z
                                                                                                                          	return tmp
                                                                                                                          
                                                                                                                          function code(x, y, z, t, a)
                                                                                                                          	tmp = 0.0
                                                                                                                          	if (y <= -1.55e+109)
                                                                                                                          		tmp = Float64(Float64(x / z) * y);
                                                                                                                          	elseif (y <= 4.3e+77)
                                                                                                                          		tmp = Float64(x + Float64(t - x));
                                                                                                                          	else
                                                                                                                          		tmp = Float64(Float64(y * x) / z);
                                                                                                                          	end
                                                                                                                          	return tmp
                                                                                                                          end
                                                                                                                          
                                                                                                                          function tmp_2 = code(x, y, z, t, a)
                                                                                                                          	tmp = 0.0;
                                                                                                                          	if (y <= -1.55e+109)
                                                                                                                          		tmp = (x / z) * y;
                                                                                                                          	elseif (y <= 4.3e+77)
                                                                                                                          		tmp = x + (t - x);
                                                                                                                          	else
                                                                                                                          		tmp = (y * x) / z;
                                                                                                                          	end
                                                                                                                          	tmp_2 = tmp;
                                                                                                                          end
                                                                                                                          
                                                                                                                          code[x_, y_, z_, t_, a_] := If[LessEqual[y, -1.55e+109], N[(N[(x / z), $MachinePrecision] * y), $MachinePrecision], If[LessEqual[y, 4.3e+77], N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision], N[(N[(y * x), $MachinePrecision] / z), $MachinePrecision]]]
                                                                                                                          
                                                                                                                          \begin{array}{l}
                                                                                                                          
                                                                                                                          \\
                                                                                                                          \begin{array}{l}
                                                                                                                          \mathbf{if}\;y \leq -1.55 \cdot 10^{+109}:\\
                                                                                                                          \;\;\;\;\frac{x}{z} \cdot y\\
                                                                                                                          
                                                                                                                          \mathbf{elif}\;y \leq 4.3 \cdot 10^{+77}:\\
                                                                                                                          \;\;\;\;x + \left(t - x\right)\\
                                                                                                                          
                                                                                                                          \mathbf{else}:\\
                                                                                                                          \;\;\;\;\frac{y \cdot x}{z}\\
                                                                                                                          
                                                                                                                          
                                                                                                                          \end{array}
                                                                                                                          \end{array}
                                                                                                                          
                                                                                                                          Derivation
                                                                                                                          1. Split input into 3 regimes
                                                                                                                          2. if y < -1.54999999999999996e109

                                                                                                                            1. Initial program 100.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. *-commutativeN/A

                                                                                                                                \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                                              5. lift-/.f64N/A

                                                                                                                                \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                                              6. associate-*l/N/A

                                                                                                                                \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                                              7. associate-/l*N/A

                                                                                                                                \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                                              8. lower-fma.f64N/A

                                                                                                                                \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                              9. lower-/.f6497.5

                                                                                                                                \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                                            4. Applied rewrites97.5%

                                                                                                                              \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                            5. Taylor expanded in z around inf

                                                                                                                              \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                            6. Step-by-step derivation
                                                                                                                              1. associate--l+N/A

                                                                                                                                \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                              2. distribute-lft-out--N/A

                                                                                                                                \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                              3. div-subN/A

                                                                                                                                \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                              4. metadata-evalN/A

                                                                                                                                \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                                              5. fp-cancel-sub-sign-invN/A

                                                                                                                                \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                              6. *-lft-identityN/A

                                                                                                                                \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                              7. lower--.f64N/A

                                                                                                                                \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                              8. div-subN/A

                                                                                                                                \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                              9. associate-/l*N/A

                                                                                                                                \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                                              10. associate-/l*N/A

                                                                                                                                \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                                              11. distribute-rgt-out--N/A

                                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                              12. lower-*.f64N/A

                                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                              13. lower-/.f64N/A

                                                                                                                                \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                                              14. lower--.f64N/A

                                                                                                                                \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                                              15. lower--.f6462.9

                                                                                                                                \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                                            7. Applied rewrites62.9%

                                                                                                                              \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                            8. Taylor expanded in y around inf

                                                                                                                              \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                                            9. Step-by-step derivation
                                                                                                                              1. Applied rewrites55.2%

                                                                                                                                \[\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 rewrites31.8%

                                                                                                                                  \[\leadsto \frac{x}{z} \cdot y \]

                                                                                                                                if -1.54999999999999996e109 < y < 4.29999999999999991e77

                                                                                                                                1. Initial program 77.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--.f6424.5

                                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                5. Applied rewrites24.5%

                                                                                                                                  \[\leadsto x + \color{blue}{\left(t - x\right)} \]

                                                                                                                                if 4.29999999999999991e77 < y

                                                                                                                                1. Initial program 93.4%

                                                                                                                                  \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                                2. Add Preprocessing
                                                                                                                                3. Step-by-step derivation
                                                                                                                                  1. lift-+.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{x + \left(y - z\right) \cdot \frac{t - x}{a - z}} \]
                                                                                                                                  2. +-commutativeN/A

                                                                                                                                    \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z} + x} \]
                                                                                                                                  3. lift-*.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{\left(y - z\right) \cdot \frac{t - x}{a - z}} + x \]
                                                                                                                                  4. *-commutativeN/A

                                                                                                                                    \[\leadsto \color{blue}{\frac{t - x}{a - z} \cdot \left(y - z\right)} + x \]
                                                                                                                                  5. lift-/.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{\frac{t - x}{a - z}} \cdot \left(y - z\right) + x \]
                                                                                                                                  6. associate-*l/N/A

                                                                                                                                    \[\leadsto \color{blue}{\frac{\left(t - x\right) \cdot \left(y - z\right)}{a - z}} + x \]
                                                                                                                                  7. associate-/l*N/A

                                                                                                                                    \[\leadsto \color{blue}{\left(t - x\right) \cdot \frac{y - z}{a - z}} + x \]
                                                                                                                                  8. lower-fma.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                                  9. lower-/.f6495.4

                                                                                                                                    \[\leadsto \mathsf{fma}\left(t - x, \color{blue}{\frac{y - z}{a - z}}, x\right) \]
                                                                                                                                4. Applied rewrites95.4%

                                                                                                                                  \[\leadsto \color{blue}{\mathsf{fma}\left(t - x, \frac{y - z}{a - z}, x\right)} \]
                                                                                                                                5. Taylor expanded in z around inf

                                                                                                                                  \[\leadsto \color{blue}{\left(t + -1 \cdot \frac{y \cdot \left(t - x\right)}{z}\right) - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}} \]
                                                                                                                                6. Step-by-step derivation
                                                                                                                                  1. associate--l+N/A

                                                                                                                                    \[\leadsto \color{blue}{t + \left(-1 \cdot \frac{y \cdot \left(t - x\right)}{z} - -1 \cdot \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                                  2. distribute-lft-out--N/A

                                                                                                                                    \[\leadsto t + \color{blue}{-1 \cdot \left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                                  3. div-subN/A

                                                                                                                                    \[\leadsto t + -1 \cdot \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                                  4. metadata-evalN/A

                                                                                                                                    \[\leadsto t + \color{blue}{\left(\mathsf{neg}\left(1\right)\right)} \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z} \]
                                                                                                                                  5. fp-cancel-sub-sign-invN/A

                                                                                                                                    \[\leadsto \color{blue}{t - 1 \cdot \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                                  6. *-lft-identityN/A

                                                                                                                                    \[\leadsto t - \color{blue}{\frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                                  7. lower--.f64N/A

                                                                                                                                    \[\leadsto \color{blue}{t - \frac{y \cdot \left(t - x\right) - a \cdot \left(t - x\right)}{z}} \]
                                                                                                                                  8. div-subN/A

                                                                                                                                    \[\leadsto t - \color{blue}{\left(\frac{y \cdot \left(t - x\right)}{z} - \frac{a \cdot \left(t - x\right)}{z}\right)} \]
                                                                                                                                  9. associate-/l*N/A

                                                                                                                                    \[\leadsto t - \left(\color{blue}{y \cdot \frac{t - x}{z}} - \frac{a \cdot \left(t - x\right)}{z}\right) \]
                                                                                                                                  10. associate-/l*N/A

                                                                                                                                    \[\leadsto t - \left(y \cdot \frac{t - x}{z} - \color{blue}{a \cdot \frac{t - x}{z}}\right) \]
                                                                                                                                  11. distribute-rgt-out--N/A

                                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                                  12. lower-*.f64N/A

                                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                                  13. lower-/.f64N/A

                                                                                                                                    \[\leadsto t - \color{blue}{\frac{t - x}{z}} \cdot \left(y - a\right) \]
                                                                                                                                  14. lower--.f64N/A

                                                                                                                                    \[\leadsto t - \frac{\color{blue}{t - x}}{z} \cdot \left(y - a\right) \]
                                                                                                                                  15. lower--.f6466.3

                                                                                                                                    \[\leadsto t - \frac{t - x}{z} \cdot \color{blue}{\left(y - a\right)} \]
                                                                                                                                7. Applied rewrites66.3%

                                                                                                                                  \[\leadsto \color{blue}{t - \frac{t - x}{z} \cdot \left(y - a\right)} \]
                                                                                                                                8. Taylor expanded in y around inf

                                                                                                                                  \[\leadsto y \cdot \color{blue}{\left(\frac{x}{z} - \frac{t}{z}\right)} \]
                                                                                                                                9. Step-by-step derivation
                                                                                                                                  1. Applied rewrites58.5%

                                                                                                                                    \[\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 rewrites41.4%

                                                                                                                                      \[\leadsto \frac{y \cdot x}{z} \]
                                                                                                                                  4. Recombined 3 regimes into one program.
                                                                                                                                  5. Final simplification28.7%

                                                                                                                                    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.55 \cdot 10^{+109}:\\ \;\;\;\;\frac{x}{z} \cdot y\\ \mathbf{elif}\;y \leq 4.3 \cdot 10^{+77}:\\ \;\;\;\;x + \left(t - x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot x}{z}\\ \end{array} \]
                                                                                                                                  6. Add Preprocessing

                                                                                                                                  Alternative 20: 19.1% accurate, 4.1× speedup?

                                                                                                                                  \[\begin{array}{l} \\ x + \left(t - x\right) \end{array} \]
                                                                                                                                  (FPCore (x y z t a) :precision binary64 (+ x (- t x)))
                                                                                                                                  double code(double x, double y, double z, double t, double a) {
                                                                                                                                  	return x + (t - x);
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  real(8) function code(x, y, z, t, a)
                                                                                                                                      real(8), intent (in) :: x
                                                                                                                                      real(8), intent (in) :: y
                                                                                                                                      real(8), intent (in) :: z
                                                                                                                                      real(8), intent (in) :: t
                                                                                                                                      real(8), intent (in) :: a
                                                                                                                                      code = x + (t - x)
                                                                                                                                  end function
                                                                                                                                  
                                                                                                                                  public static double code(double x, double y, double z, double t, double a) {
                                                                                                                                  	return x + (t - x);
                                                                                                                                  }
                                                                                                                                  
                                                                                                                                  def code(x, y, z, t, a):
                                                                                                                                  	return x + (t - x)
                                                                                                                                  
                                                                                                                                  function code(x, y, z, t, a)
                                                                                                                                  	return Float64(x + Float64(t - x))
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  function tmp = code(x, y, z, t, a)
                                                                                                                                  	tmp = x + (t - x);
                                                                                                                                  end
                                                                                                                                  
                                                                                                                                  code[x_, y_, z_, t_, a_] := N[(x + N[(t - x), $MachinePrecision]), $MachinePrecision]
                                                                                                                                  
                                                                                                                                  \begin{array}{l}
                                                                                                                                  
                                                                                                                                  \\
                                                                                                                                  x + \left(t - x\right)
                                                                                                                                  \end{array}
                                                                                                                                  
                                                                                                                                  Derivation
                                                                                                                                  1. Initial program 84.1%

                                                                                                                                    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                                  2. Add Preprocessing
                                                                                                                                  3. Taylor expanded in z around inf

                                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. lower--.f6419.0

                                                                                                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                  5. Applied rewrites19.0%

                                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                  6. Add Preprocessing

                                                                                                                                  Alternative 21: 2.8% accurate, 4.8× speedup?

                                                                                                                                  \[\begin{array}{l} \\ x + \left(-x\right) \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(x + Float64(-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}
                                                                                                                                  
                                                                                                                                  \\
                                                                                                                                  x + \left(-x\right)
                                                                                                                                  \end{array}
                                                                                                                                  
                                                                                                                                  Derivation
                                                                                                                                  1. Initial program 84.1%

                                                                                                                                    \[x + \left(y - z\right) \cdot \frac{t - x}{a - z} \]
                                                                                                                                  2. Add Preprocessing
                                                                                                                                  3. Taylor expanded in z around inf

                                                                                                                                    \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                  4. Step-by-step derivation
                                                                                                                                    1. lower--.f6419.0

                                                                                                                                      \[\leadsto x + \color{blue}{\left(t - x\right)} \]
                                                                                                                                  5. Applied rewrites19.0%

                                                                                                                                    \[\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. Add Preprocessing

                                                                                                                                    Reproduce

                                                                                                                                    ?
                                                                                                                                    herbie shell --seed 2024339 
                                                                                                                                    (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)))))