Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A

Percentage Accurate: 84.8% → 97.3%
Time: 12.2s
Alternatives: 12
Speedup: 0.2×

Specification

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

\\
\frac{x - y \cdot z}{t - a \cdot 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 12 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: 84.8% accurate, 1.0× speedup?

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

\\
\frac{x - y \cdot z}{t - a \cdot z}
\end{array}

Alternative 1: 97.3% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{-321}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{\frac{t}{a} - z}}{a}\\

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.99994e-321 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 5.00000000000000011e-47

    1. Initial program 97.7%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing

    if -4.99994e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0

    1. Initial program 49.8%

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

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

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

        \[\leadsto \frac{x - y \cdot z}{a \cdot \color{blue}{\left(\frac{t}{a} - z\right)}} \]
      3. /-lowering-/.f6449.8

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x - \color{blue}{z \cdot y}}{\frac{t}{a} - z}}{a} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \frac{\frac{x - \color{blue}{z \cdot y}}{\frac{t}{a} - z}}{a} \]
      8. --lowering--.f64N/A

        \[\leadsto \frac{\frac{x - z \cdot y}{\color{blue}{\frac{t}{a} - z}}}{a} \]
      9. /-lowering-/.f6499.7

        \[\leadsto \frac{\frac{x - z \cdot y}{\color{blue}{\frac{t}{a}} - z}}{a} \]
    7. Applied egg-rr99.7%

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

    if 5.00000000000000011e-47 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0

    1. Initial program 91.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification98.6%

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

Alternative 2: 96.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := \frac{t\_1}{t - z \cdot a}\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{-321}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{\frac{t\_1}{\frac{t}{a} - z}}{a}\\

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

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

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.99994e-321 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.99999999999999986e306

    1. Initial program 98.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing

    if -4.99994e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0

    1. Initial program 49.8%

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

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

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

        \[\leadsto \frac{x - y \cdot z}{a \cdot \color{blue}{\left(\frac{t}{a} - z\right)}} \]
      3. /-lowering-/.f6449.8

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

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

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

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

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

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

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

        \[\leadsto \frac{\frac{x - \color{blue}{z \cdot y}}{\frac{t}{a} - z}}{a} \]
      7. *-lowering-*.f64N/A

        \[\leadsto \frac{\frac{x - \color{blue}{z \cdot y}}{\frac{t}{a} - z}}{a} \]
      8. --lowering--.f64N/A

        \[\leadsto \frac{\frac{x - z \cdot y}{\color{blue}{\frac{t}{a} - z}}}{a} \]
      9. /-lowering-/.f6499.7

        \[\leadsto \frac{\frac{x - z \cdot y}{\color{blue}{\frac{t}{a}} - z}}{a} \]
    7. Applied egg-rr99.7%

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

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

    1. Initial program 73.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \frac{z}{\mathsf{fma}\left(z, a, 0 - t\right)}, \color{blue}{\frac{x}{t}}\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{z \cdot a - t}} + \frac{x}{t} \]
      6. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y}{\mathsf{fma}\left(z, a, \color{blue}{0 - t}\right)}, \frac{x}{t}\right) \]
      12. /-lowering-/.f6496.6

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified100.0%

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

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

Alternative 3: 92.7% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-321}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.99994e-321 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.99999999999999986e306

    1. Initial program 98.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing

    if -4.99994e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0

    1. Initial program 49.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + -1 \cdot \frac{x}{z}}{a}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      4. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      5. /-lowering-/.f6496.6

        \[\leadsto \frac{y - \color{blue}{\frac{x}{z}}}{a} \]
    8. Simplified96.6%

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

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

    1. Initial program 73.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

      \[\leadsto \mathsf{fma}\left(y, \frac{z}{\mathsf{fma}\left(z, a, 0 - t\right)}, \color{blue}{\frac{x}{t}}\right) \]
    9. Step-by-step derivation
      1. associate-*r/N/A

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

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

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

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

        \[\leadsto \color{blue}{z \cdot \frac{y}{z \cdot a - t}} + \frac{x}{t} \]
      6. accelerator-lowering-fma.f64N/A

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

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

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

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

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

        \[\leadsto \mathsf{fma}\left(z, \frac{y}{\mathsf{fma}\left(z, a, \color{blue}{0 - t}\right)}, \frac{x}{t}\right) \]
      12. /-lowering-/.f6496.6

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification98.0%

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

Alternative 4: 92.9% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-321}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

\mathbf{elif}\;t\_1 \leq 10^{+307}:\\
\;\;\;\;t\_1\\

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

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.99994e-321 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 9.99999999999999986e306

    1. Initial program 98.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing

    if -4.99994e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0

    1. Initial program 49.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + -1 \cdot \frac{x}{z}}{a}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      4. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      5. /-lowering-/.f6496.6

        \[\leadsto \frac{y - \color{blue}{\frac{x}{z}}}{a} \]
    8. Simplified96.6%

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

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

    1. Initial program 73.6%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification98.0%

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

Alternative 5: 91.1% accurate, 0.2× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{-321}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


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

    1. Initial program 95.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing

    if -4.99994e-321 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -0.0

    1. Initial program 49.8%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + -1 \cdot \frac{x}{z}}{a}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      4. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      5. /-lowering-/.f6496.6

        \[\leadsto \frac{y - \color{blue}{\frac{x}{z}}}{a} \]
    8. Simplified96.6%

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

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

    1. Initial program 0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64100.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification96.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -5 \cdot 10^{-321}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq \infty:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{z \cdot a - t}\\ \mathbf{if}\;z \leq -4.5 \cdot 10^{+168}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -7.2 \cdot 10^{-32}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5 \cdot 10^{+25}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{+206}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- (* z a) t)))))
   (if (<= z -4.5e+168)
     (/ y a)
     (if (<= z -7.2e-32)
       t_1
       (if (<= z 5e+25)
         (/ (- x (* y z)) t)
         (if (<= z 1.65e+206) t_1 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / ((z * a) - t));
	double tmp;
	if (z <= -4.5e+168) {
		tmp = y / a;
	} else if (z <= -7.2e-32) {
		tmp = t_1;
	} else if (z <= 5e+25) {
		tmp = (x - (y * z)) / t;
	} else if (z <= 1.65e+206) {
		tmp = t_1;
	} else {
		tmp = y / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = y * (z / ((z * a) - t))
    if (z <= (-4.5d+168)) then
        tmp = y / a
    else if (z <= (-7.2d-32)) then
        tmp = t_1
    else if (z <= 5d+25) then
        tmp = (x - (y * z)) / t
    else if (z <= 1.65d+206) then
        tmp = t_1
    else
        tmp = y / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / ((z * a) - t));
	double tmp;
	if (z <= -4.5e+168) {
		tmp = y / a;
	} else if (z <= -7.2e-32) {
		tmp = t_1;
	} else if (z <= 5e+25) {
		tmp = (x - (y * z)) / t;
	} else if (z <= 1.65e+206) {
		tmp = t_1;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / ((z * a) - t))
	tmp = 0
	if z <= -4.5e+168:
		tmp = y / a
	elif z <= -7.2e-32:
		tmp = t_1
	elif z <= 5e+25:
		tmp = (x - (y * z)) / t
	elif z <= 1.65e+206:
		tmp = t_1
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(Float64(z * a) - t)))
	tmp = 0.0
	if (z <= -4.5e+168)
		tmp = Float64(y / a);
	elseif (z <= -7.2e-32)
		tmp = t_1;
	elseif (z <= 5e+25)
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	elseif (z <= 1.65e+206)
		tmp = t_1;
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / ((z * a) - t));
	tmp = 0.0;
	if (z <= -4.5e+168)
		tmp = y / a;
	elseif (z <= -7.2e-32)
		tmp = t_1;
	elseif (z <= 5e+25)
		tmp = (x - (y * z)) / t;
	elseif (z <= 1.65e+206)
		tmp = t_1;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -4.5e+168], N[(y / a), $MachinePrecision], If[LessEqual[z, -7.2e-32], t$95$1, If[LessEqual[z, 5e+25], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 1.65e+206], t$95$1, N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := y \cdot \frac{z}{z \cdot a - t}\\
\mathbf{if}\;z \leq -4.5 \cdot 10^{+168}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq -7.2 \cdot 10^{-32}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 1.65 \cdot 10^{+206}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.50000000000000012e168 or 1.64999999999999992e206 < z

    1. Initial program 58.2%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6474.8

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified74.8%

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -4.50000000000000012e168 < z < -7.19999999999999986e-32 or 5.00000000000000024e25 < z < 1.64999999999999992e206

    1. Initial program 80.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-1}{\frac{1}{x - y \cdot z} \cdot \color{blue}{\left(0 - \left(t - a \cdot z\right)\right)}} \]
    4. Applied egg-rr79.6%

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a \cdot z - t}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a \cdot z - t}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{z}{a \cdot z - t}} \]
      4. --lowering--.f64N/A

        \[\leadsto y \cdot \frac{z}{\color{blue}{a \cdot z - t}} \]
      5. *-commutativeN/A

        \[\leadsto y \cdot \frac{z}{\color{blue}{z \cdot a} - t} \]
      6. *-lowering-*.f6467.8

        \[\leadsto y \cdot \frac{z}{\color{blue}{z \cdot a} - t} \]
    7. Simplified67.8%

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

    if -7.19999999999999986e-32 < z < 5.00000000000000024e25

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
      2. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{x - y \cdot z}}{t} \]
      3. *-lowering-*.f6478.0

        \[\leadsto \frac{x - \color{blue}{y \cdot z}}{t} \]
    5. Simplified78.0%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 7: 70.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -3.5 \cdot 10^{+30}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{+28}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq 5.7 \cdot 10^{+203}:\\ \;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y (/ x z)) a)))
   (if (<= z -3.5e+30)
     t_1
     (if (<= z 5.5e+28)
       (/ (- x (* y z)) t)
       (if (<= z 5.7e+203) (* y (/ z (- (* z a) t))) t_1)))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - (x / z)) / a;
	double tmp;
	if (z <= -3.5e+30) {
		tmp = t_1;
	} else if (z <= 5.5e+28) {
		tmp = (x - (y * z)) / t;
	} else if (z <= 5.7e+203) {
		tmp = y * (z / ((z * a) - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - (x / z)) / a
    if (z <= (-3.5d+30)) then
        tmp = t_1
    else if (z <= 5.5d+28) then
        tmp = (x - (y * z)) / t
    else if (z <= 5.7d+203) then
        tmp = y * (z / ((z * a) - t))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - (x / z)) / a;
	double tmp;
	if (z <= -3.5e+30) {
		tmp = t_1;
	} else if (z <= 5.5e+28) {
		tmp = (x - (y * z)) / t;
	} else if (z <= 5.7e+203) {
		tmp = y * (z / ((z * a) - t));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	tmp = 0
	if z <= -3.5e+30:
		tmp = t_1
	elif z <= 5.5e+28:
		tmp = (x - (y * z)) / t
	elif z <= 5.7e+203:
		tmp = y * (z / ((z * a) - t))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - Float64(x / z)) / a)
	tmp = 0.0
	if (z <= -3.5e+30)
		tmp = t_1;
	elseif (z <= 5.5e+28)
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	elseif (z <= 5.7e+203)
		tmp = Float64(y * Float64(z / Float64(Float64(z * a) - t)));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - (x / z)) / a;
	tmp = 0.0;
	if (z <= -3.5e+30)
		tmp = t_1;
	elseif (z <= 5.5e+28)
		tmp = (x - (y * z)) / t;
	elseif (z <= 5.7e+203)
		tmp = y * (z / ((z * a) - t));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -3.5e+30], t$95$1, If[LessEqual[z, 5.5e+28], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, 5.7e+203], N[(y * N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{y - \frac{x}{z}}{a}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{+30}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 5.7 \cdot 10^{+203}:\\
\;\;\;\;y \cdot \frac{z}{z \cdot a - t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.50000000000000021e30 or 5.7e203 < z

    1. Initial program 66.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y + -1 \cdot \frac{x}{z}}{a}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      4. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
      5. /-lowering-/.f6485.0

        \[\leadsto \frac{y - \color{blue}{\frac{x}{z}}}{a} \]
    8. Simplified85.0%

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

    if -3.50000000000000021e30 < z < 5.5000000000000003e28

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
      2. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{x - y \cdot z}}{t} \]
      3. *-lowering-*.f6476.1

        \[\leadsto \frac{x - \color{blue}{y \cdot z}}{t} \]
    5. Simplified76.1%

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

    if 5.5000000000000003e28 < z < 5.7e203

    1. Initial program 69.6%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Add Preprocessing
    3. Step-by-step derivation
      1. div-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a \cdot z - t}} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{a \cdot z - t}} \]
      3. /-lowering-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{z}{a \cdot z - t}} \]
      4. --lowering--.f64N/A

        \[\leadsto y \cdot \frac{z}{\color{blue}{a \cdot z - t}} \]
      5. *-commutativeN/A

        \[\leadsto y \cdot \frac{z}{\color{blue}{z \cdot a} - t} \]
      6. *-lowering-*.f6474.5

        \[\leadsto y \cdot \frac{z}{\color{blue}{z \cdot a} - t} \]
    7. Simplified74.5%

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

Alternative 8: 61.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+28}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;y \cdot \frac{0 - z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.3e+28)
   (/ y a)
   (if (<= z 1.6e+20)
     (/ x (- t (* z a)))
     (if (<= z 1.45e+201) (* y (/ (- 0.0 z) t)) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.3e+28) {
		tmp = y / a;
	} else if (z <= 1.6e+20) {
		tmp = x / (t - (z * a));
	} else if (z <= 1.45e+201) {
		tmp = y * ((0.0 - z) / t);
	} else {
		tmp = y / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-3.3d+28)) then
        tmp = y / a
    else if (z <= 1.6d+20) then
        tmp = x / (t - (z * a))
    else if (z <= 1.45d+201) then
        tmp = y * ((0.0d0 - z) / t)
    else
        tmp = y / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.3e+28) {
		tmp = y / a;
	} else if (z <= 1.6e+20) {
		tmp = x / (t - (z * a));
	} else if (z <= 1.45e+201) {
		tmp = y * ((0.0 - z) / t);
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.3e+28:
		tmp = y / a
	elif z <= 1.6e+20:
		tmp = x / (t - (z * a))
	elif z <= 1.45e+201:
		tmp = y * ((0.0 - z) / t)
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.3e+28)
		tmp = Float64(y / a);
	elseif (z <= 1.6e+20)
		tmp = Float64(x / Float64(t - Float64(z * a)));
	elseif (z <= 1.45e+201)
		tmp = Float64(y * Float64(Float64(0.0 - z) / t));
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -3.3e+28)
		tmp = y / a;
	elseif (z <= 1.6e+20)
		tmp = x / (t - (z * a));
	elseif (z <= 1.45e+201)
		tmp = y * ((0.0 - z) / t);
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.3e+28], N[(y / a), $MachinePrecision], If[LessEqual[z, 1.6e+20], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+201], N[(y * N[(N[(0.0 - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{+28}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq 1.6 \cdot 10^{+20}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\
\;\;\;\;y \cdot \frac{0 - z}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.3e28 or 1.4500000000000001e201 < z

    1. Initial program 67.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6466.7

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified66.7%

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -3.3e28 < z < 1.6e20

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
      2. --lowering--.f64N/A

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

        \[\leadsto \frac{x}{t - \color{blue}{z \cdot a}} \]
      4. *-lowering-*.f6472.4

        \[\leadsto \frac{x}{t - \color{blue}{z \cdot a}} \]
    5. Simplified72.4%

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

    if 1.6e20 < z < 1.4500000000000001e201

    1. Initial program 71.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
      2. --lowering--.f64N/A

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

        \[\leadsto \frac{x - \color{blue}{z \cdot y}}{t} \]
      4. *-lowering-*.f6452.1

        \[\leadsto \frac{x - \color{blue}{z \cdot y}}{t} \]
    8. Simplified52.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-1 \cdot t}} \]
      10. mul-1-negN/A

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

        \[\leadsto y \cdot \frac{z}{\color{blue}{0 - t}} \]
      12. --lowering--.f6453.7

        \[\leadsto y \cdot \frac{z}{\color{blue}{0 - t}} \]
    11. Simplified53.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{0 - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification68.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+28}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{+20}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;y \cdot \frac{0 - z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 51.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-35}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;y \cdot \frac{0 - z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.05e-35)
   (/ y a)
   (if (<= z 9.2e+18)
     (/ x t)
     (if (<= z 1.45e+201) (* y (/ (- 0.0 z) t)) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.05e-35) {
		tmp = y / a;
	} else if (z <= 9.2e+18) {
		tmp = x / t;
	} else if (z <= 1.45e+201) {
		tmp = y * ((0.0 - z) / t);
	} else {
		tmp = y / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.05d-35)) then
        tmp = y / a
    else if (z <= 9.2d+18) then
        tmp = x / t
    else if (z <= 1.45d+201) then
        tmp = y * ((0.0d0 - z) / t)
    else
        tmp = y / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.05e-35) {
		tmp = y / a;
	} else if (z <= 9.2e+18) {
		tmp = x / t;
	} else if (z <= 1.45e+201) {
		tmp = y * ((0.0 - z) / t);
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.05e-35:
		tmp = y / a
	elif z <= 9.2e+18:
		tmp = x / t
	elif z <= 1.45e+201:
		tmp = y * ((0.0 - z) / t)
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.05e-35)
		tmp = Float64(y / a);
	elseif (z <= 9.2e+18)
		tmp = Float64(x / t);
	elseif (z <= 1.45e+201)
		tmp = Float64(y * Float64(Float64(0.0 - z) / t));
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.05e-35)
		tmp = y / a;
	elseif (z <= 9.2e+18)
		tmp = x / t;
	elseif (z <= 1.45e+201)
		tmp = y * ((0.0 - z) / t);
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.05e-35], N[(y / a), $MachinePrecision], If[LessEqual[z, 9.2e+18], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.45e+201], N[(y * N[(N[(0.0 - z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq 9.2 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{t}\\

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\
\;\;\;\;y \cdot \frac{0 - z}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05e-35 or 1.4500000000000001e201 < z

    1. Initial program 71.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6461.9

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified61.9%

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -1.05e-35 < z < 9.2e18

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6461.4

        \[\leadsto \color{blue}{\frac{x}{t}} \]
    5. Simplified61.4%

      \[\leadsto \color{blue}{\frac{x}{t}} \]

    if 9.2e18 < z < 1.4500000000000001e201

    1. Initial program 71.6%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    7. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
      2. --lowering--.f64N/A

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

        \[\leadsto \frac{x - \color{blue}{z \cdot y}}{t} \]
      4. *-lowering-*.f6452.1

        \[\leadsto \frac{x - \color{blue}{z \cdot y}}{t} \]
    8. Simplified52.1%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{z}{-1 \cdot t}} \]
      10. mul-1-negN/A

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

        \[\leadsto y \cdot \frac{z}{\color{blue}{0 - t}} \]
      12. --lowering--.f6453.7

        \[\leadsto y \cdot \frac{z}{\color{blue}{0 - t}} \]
    11. Simplified53.7%

      \[\leadsto \color{blue}{y \cdot \frac{z}{0 - t}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{-35}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 9.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;y \cdot \frac{0 - z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 62.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -5.8 \cdot 10^{+33}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+201}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -5.8e+33)
   (/ y a)
   (if (<= z 1.45e+201) (/ (- x (* y z)) t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.8e+33) {
		tmp = y / a;
	} else if (z <= 1.45e+201) {
		tmp = (x - (y * z)) / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-5.8d+33)) then
        tmp = y / a
    else if (z <= 1.45d+201) then
        tmp = (x - (y * z)) / t
    else
        tmp = y / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -5.8e+33) {
		tmp = y / a;
	} else if (z <= 1.45e+201) {
		tmp = (x - (y * z)) / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -5.8e+33:
		tmp = y / a
	elif z <= 1.45e+201:
		tmp = (x - (y * z)) / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -5.8e+33)
		tmp = Float64(y / a);
	elseif (z <= 1.45e+201)
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -5.8e+33)
		tmp = y / a;
	elseif (z <= 1.45e+201)
		tmp = (x - (y * z)) / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -5.8e+33], N[(y / a), $MachinePrecision], If[LessEqual[z, 1.45e+201], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -5.8 \cdot 10^{+33}:\\
\;\;\;\;\frac{y}{a}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -5.80000000000000049e33 or 1.4500000000000001e201 < z

    1. Initial program 66.2%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6467.0

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified67.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -5.80000000000000049e33 < z < 1.4500000000000001e201

    1. Initial program 94.8%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
      2. --lowering--.f64N/A

        \[\leadsto \frac{\color{blue}{x - y \cdot z}}{t} \]
      3. *-lowering-*.f6471.6

        \[\leadsto \frac{x - \color{blue}{y \cdot z}}{t} \]
    5. Simplified71.6%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 11: 54.9% accurate, 1.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.35 \cdot 10^{-35}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -1.35e-35) (/ y a) (if (<= z 4.2e+30) (/ x t) (/ y a))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e-35) {
		tmp = y / a;
	} else if (z <= 4.2e+30) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if (z <= (-1.35d-35)) then
        tmp = y / a
    else if (z <= 4.2d+30) then
        tmp = x / t
    else
        tmp = y / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.35e-35) {
		tmp = y / a;
	} else if (z <= 4.2e+30) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.35e-35:
		tmp = y / a
	elif z <= 4.2e+30:
		tmp = x / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.35e-35)
		tmp = Float64(y / a);
	elseif (z <= 4.2e+30)
		tmp = Float64(x / t);
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if (z <= -1.35e-35)
		tmp = y / a;
	elseif (z <= 4.2e+30)
		tmp = x / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.35e-35], N[(y / a), $MachinePrecision], If[LessEqual[z, 4.2e+30], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.35 \cdot 10^{-35}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{+30}:\\
\;\;\;\;\frac{x}{t}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3499999999999999e-35 or 4.2e30 < z

    1. Initial program 70.7%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6456.7

        \[\leadsto \color{blue}{\frac{y}{a}} \]
    5. Simplified56.7%

      \[\leadsto \color{blue}{\frac{y}{a}} \]

    if -1.3499999999999999e-35 < z < 4.2e30

    1. Initial program 99.8%

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

      \[\leadsto \color{blue}{\frac{x}{t}} \]
    4. Step-by-step derivation
      1. /-lowering-/.f6461.2

        \[\leadsto \color{blue}{\frac{x}{t}} \]
    5. Simplified61.2%

      \[\leadsto \color{blue}{\frac{x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 12: 35.0% accurate, 2.3× speedup?

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

\\
\frac{x}{t}
\end{array}
Derivation
  1. Initial program 85.3%

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

    \[\leadsto \color{blue}{\frac{x}{t}} \]
  4. Step-by-step derivation
    1. /-lowering-/.f6435.1

      \[\leadsto \color{blue}{\frac{x}{t}} \]
  5. Simplified35.1%

    \[\leadsto \color{blue}{\frac{x}{t}} \]
  6. Add Preprocessing

Developer Target 1: 97.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - a \cdot z\\ t_2 := \frac{x}{t\_1} - \frac{y}{\frac{t}{z} - a}\\ \mathbf{if}\;z < -32113435955957344:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\ \;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* a z))) (t_2 (- (/ x t_1) (/ y (- (/ t z) a)))))
   (if (< z -32113435955957344.0)
     t_2
     (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 t_1)) t_2))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (a * z);
	double t_2 = (x / t_1) - (y / ((t / z) - a));
	double tmp;
	if (z < -32113435955957344.0) {
		tmp = t_2;
	} else if (z < 3.5139522372978296e-86) {
		tmp = (x - (y * z)) * (1.0 / t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = t - (a * z)
    t_2 = (x / t_1) - (y / ((t / z) - a))
    if (z < (-32113435955957344.0d0)) then
        tmp = t_2
    else if (z < 3.5139522372978296d-86) then
        tmp = (x - (y * z)) * (1.0d0 / t_1)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (a * z);
	double t_2 = (x / t_1) - (y / ((t / z) - a));
	double tmp;
	if (z < -32113435955957344.0) {
		tmp = t_2;
	} else if (z < 3.5139522372978296e-86) {
		tmp = (x - (y * z)) * (1.0 / t_1);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - (a * z)
	t_2 = (x / t_1) - (y / ((t / z) - a))
	tmp = 0
	if z < -32113435955957344.0:
		tmp = t_2
	elif z < 3.5139522372978296e-86:
		tmp = (x - (y * z)) * (1.0 / t_1)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(a * z))
	t_2 = Float64(Float64(x / t_1) - Float64(y / Float64(Float64(t / z) - a)))
	tmp = 0.0
	if (z < -32113435955957344.0)
		tmp = t_2;
	elseif (z < 3.5139522372978296e-86)
		tmp = Float64(Float64(x - Float64(y * z)) * Float64(1.0 / t_1));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (a * z);
	t_2 = (x / t_1) - (y / ((t / z) - a));
	tmp = 0.0;
	if (z < -32113435955957344.0)
		tmp = t_2;
	elseif (z < 3.5139522372978296e-86)
		tmp = (x - (y * z)) * (1.0 / t_1);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x / t$95$1), $MachinePrecision] - N[(y / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[z, -32113435955957344.0], t$95$2, If[Less[z, 3.5139522372978296e-86], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / t$95$1), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - a \cdot z\\
t_2 := \frac{x}{t\_1} - \frac{y}{\frac{t}{z} - a}\\
\mathbf{if}\;z < -32113435955957344:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z < 3.5139522372978296 \cdot 10^{-86}:\\
\;\;\;\;\left(x - y \cdot z\right) \cdot \frac{1}{t\_1}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024196 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -32113435955957344) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 4392440296622287/125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (- x (* y z)) (/ 1 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))))))

  (/ (- x (* y z)) (- t (* a z))))