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

Percentage Accurate: 84.7% → 90.9%
Time: 15.4s
Alternatives: 9
Speedup: 0.5×

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 9 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.7% 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: 90.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;z \leq 1.55 \cdot 10^{+109}:\\
\;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.29999999999999978e179

    1. Initial program 51.1%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative51.1%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified51.1%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 51.1%

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

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

        \[\leadsto \color{blue}{-\frac{y}{\frac{t}{z} - a}} \]
      2. distribute-neg-frac295.5%

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

        \[\leadsto \frac{y}{-\color{blue}{\left(\frac{t}{z} + \left(-a\right)\right)}} \]
      4. +-commutative95.5%

        \[\leadsto \frac{y}{-\color{blue}{\left(\left(-a\right) + \frac{t}{z}\right)}} \]
      5. distribute-neg-in95.5%

        \[\leadsto \frac{y}{\color{blue}{\left(-\left(-a\right)\right) + \left(-\frac{t}{z}\right)}} \]
      6. remove-double-neg95.5%

        \[\leadsto \frac{y}{\color{blue}{a} + \left(-\frac{t}{z}\right)} \]
      7. unsub-neg95.5%

        \[\leadsto \frac{y}{\color{blue}{a - \frac{t}{z}}} \]
    8. Simplified95.5%

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

    if -3.29999999999999978e179 < z < 1.54999999999999996e109

    1. Initial program 95.0%

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

    if 1.54999999999999996e109 < z

    1. Initial program 40.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative40.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified40.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 57.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/83.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot \left(\frac{x}{y \cdot z} - 1\right)\right)}{a}} \]
      2. associate-*r*83.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot \left(\frac{x}{y \cdot z} - 1\right)}}{a} \]
      3. neg-mul-183.7%

        \[\leadsto \frac{\color{blue}{\left(-y\right)} \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a} \]
      4. sub-neg83.7%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\left(\frac{x}{y \cdot z} + \left(-1\right)\right)}}{a} \]
      5. associate-/r*72.9%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\color{blue}{\frac{\frac{x}{y}}{z}} + \left(-1\right)\right)}{a} \]
      6. metadata-eval72.9%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\frac{\frac{x}{y}}{z} + \color{blue}{-1}\right)}{a} \]
    9. Simplified72.9%

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

      \[\leadsto \frac{\color{blue}{y + -1 \cdot \frac{x}{z}}}{a} \]
    11. Step-by-step derivation
      1. mul-1-neg86.4%

        \[\leadsto \frac{y + \color{blue}{\left(-\frac{x}{z}\right)}}{a} \]
      2. unsub-neg86.4%

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
    12. Simplified86.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.3 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a - \frac{t}{z}}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+109}:\\ \;\;\;\;\frac{x - z \cdot y}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 53.8% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{+147}:\\ \;\;\;\;\frac{\frac{x}{z}}{-a}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-54}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.2e+179)
   (/ y a)
   (if (<= z -6.4e+147)
     (/ (/ x z) (- a))
     (if (<= z -4e+25)
       (/ y a)
       (if (<= z -3.9e-54)
         (/ (* z y) (- t))
         (if (<= z 7.4e-93) (/ x t) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.2e+179) {
		tmp = y / a;
	} else if (z <= -6.4e+147) {
		tmp = (x / z) / -a;
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -3.9e-54) {
		tmp = (z * y) / -t;
	} else if (z <= 7.4e-93) {
		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 <= (-3.2d+179)) then
        tmp = y / a
    else if (z <= (-6.4d+147)) then
        tmp = (x / z) / -a
    else if (z <= (-4d+25)) then
        tmp = y / a
    else if (z <= (-3.9d-54)) then
        tmp = (z * y) / -t
    else if (z <= 7.4d-93) 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 <= -3.2e+179) {
		tmp = y / a;
	} else if (z <= -6.4e+147) {
		tmp = (x / z) / -a;
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -3.9e-54) {
		tmp = (z * y) / -t;
	} else if (z <= 7.4e-93) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.2e+179:
		tmp = y / a
	elif z <= -6.4e+147:
		tmp = (x / z) / -a
	elif z <= -4e+25:
		tmp = y / a
	elif z <= -3.9e-54:
		tmp = (z * y) / -t
	elif z <= 7.4e-93:
		tmp = x / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.2e+179)
		tmp = Float64(y / a);
	elseif (z <= -6.4e+147)
		tmp = Float64(Float64(x / z) / Float64(-a));
	elseif (z <= -4e+25)
		tmp = Float64(y / a);
	elseif (z <= -3.9e-54)
		tmp = Float64(Float64(z * y) / Float64(-t));
	elseif (z <= 7.4e-93)
		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 <= -3.2e+179)
		tmp = y / a;
	elseif (z <= -6.4e+147)
		tmp = (x / z) / -a;
	elseif (z <= -4e+25)
		tmp = y / a;
	elseif (z <= -3.9e-54)
		tmp = (z * y) / -t;
	elseif (z <= 7.4e-93)
		tmp = x / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.2e+179], N[(y / a), $MachinePrecision], If[LessEqual[z, -6.4e+147], N[(N[(x / z), $MachinePrecision] / (-a)), $MachinePrecision], If[LessEqual[z, -4e+25], N[(y / a), $MachinePrecision], If[LessEqual[z, -3.9e-54], N[(N[(z * y), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 7.4e-93], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -6.4 \cdot 10^{+147}:\\
\;\;\;\;\frac{\frac{x}{z}}{-a}\\

\mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq -3.9 \cdot 10^{-54}:\\
\;\;\;\;\frac{z \cdot y}{-t}\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.2000000000000002e179 or -6.39999999999999958e147 < z < -4.00000000000000036e25 or 7.40000000000000005e-93 < z

    1. Initial program 67.6%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative67.6%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified67.6%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 58.6%

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

    if -3.2000000000000002e179 < z < -6.39999999999999958e147

    1. Initial program 71.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative71.4%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified71.4%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 71.2%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/32.3%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot \left(\frac{x}{y \cdot z} - 1\right)\right)}{a}} \]
      2. associate-*r*32.3%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot \left(\frac{x}{y \cdot z} - 1\right)}}{a} \]
      3. neg-mul-132.3%

        \[\leadsto \frac{\color{blue}{\left(-y\right)} \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a} \]
      4. sub-neg32.3%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\left(\frac{x}{y \cdot z} + \left(-1\right)\right)}}{a} \]
      5. associate-/r*32.2%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\color{blue}{\frac{\frac{x}{y}}{z}} + \left(-1\right)\right)}{a} \]
      6. metadata-eval32.2%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\frac{\frac{x}{y}}{z} + \color{blue}{-1}\right)}{a} \]
    9. Simplified32.2%

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

      \[\leadsto \frac{\color{blue}{-1 \cdot \frac{x}{z}}}{a} \]
    11. Step-by-step derivation
      1. associate-*r/51.8%

        \[\leadsto \frac{\color{blue}{\frac{-1 \cdot x}{z}}}{a} \]
      2. mul-1-neg51.8%

        \[\leadsto \frac{\frac{\color{blue}{-x}}{z}}{a} \]
    12. Simplified51.8%

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

    if -4.00000000000000036e25 < z < -3.9e-54

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 61.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. mul-1-neg61.4%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t - a \cdot z}} \]
      3. distribute-rgt-neg-in61.4%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{t - a \cdot z}\right)} \]
      4. distribute-neg-frac261.4%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-\left(t - a \cdot z\right)}} \]
      5. cancel-sign-sub-inv61.4%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(t + \left(-a\right) \cdot z\right)}} \]
      6. *-commutative61.4%

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

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(z \cdot \left(-a\right) + t\right)}} \]
      8. *-commutative61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a\right) \cdot z} + t\right)} \]
      9. neg-mul-161.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-1 \cdot a\right)} \cdot z + t\right)} \]
      10. associate-*r*61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      11. mul-1-neg61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      12. distribute-rgt-neg-in61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{a \cdot \left(-z\right)} + t\right)} \]
      13. fma-undefine61.4%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      14. neg-sub061.4%

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

        \[\leadsto y \cdot \frac{z}{0 - \color{blue}{\left(a \cdot \left(-z\right) + t\right)}} \]
      16. distribute-rgt-neg-in61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      17. mul-1-neg61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      18. associate-*r*61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-1 \cdot a\right) \cdot z} + t\right)} \]
      19. neg-mul-161.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a\right)} \cdot z + t\right)} \]
      20. *-commutative61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{z \cdot \left(-a\right)} + t\right)} \]
      21. associate--r+61.4%

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{z \cdot a - t}} \]
    8. Taylor expanded in z around 0 54.9%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/54.9%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      2. neg-mul-154.9%

        \[\leadsto y \cdot \frac{\color{blue}{-z}}{t} \]
    10. Simplified54.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    12. Step-by-step derivation
      1. associate-*r/54.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot z\right)}{t}} \]
      2. *-commutative54.9%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(z \cdot y\right)}}{t} \]
      3. neg-mul-154.9%

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{t} \]
      4. distribute-rgt-neg-in54.9%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-y\right)}}{t} \]
    13. Simplified54.9%

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

    if -3.9e-54 < z < 7.40000000000000005e-93

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 57.0%

      \[\leadsto \color{blue}{\frac{x}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -6.4 \cdot 10^{+147}:\\ \;\;\;\;\frac{\frac{x}{z}}{-a}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -3.9 \cdot 10^{-54}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \frac{z}{-t}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-54}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -3.6e+179)
   (/ y a)
   (if (<= z -5e+117)
     (* y (/ z (- t)))
     (if (<= z -4e+25)
       (/ y a)
       (if (<= z -1.65e-54)
         (/ (* z y) (- t))
         (if (<= z 7.4e-93) (/ x t) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -3.6e+179) {
		tmp = y / a;
	} else if (z <= -5e+117) {
		tmp = y * (z / -t);
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -1.65e-54) {
		tmp = (z * y) / -t;
	} else if (z <= 7.4e-93) {
		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 <= (-3.6d+179)) then
        tmp = y / a
    else if (z <= (-5d+117)) then
        tmp = y * (z / -t)
    else if (z <= (-4d+25)) then
        tmp = y / a
    else if (z <= (-1.65d-54)) then
        tmp = (z * y) / -t
    else if (z <= 7.4d-93) 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 <= -3.6e+179) {
		tmp = y / a;
	} else if (z <= -5e+117) {
		tmp = y * (z / -t);
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -1.65e-54) {
		tmp = (z * y) / -t;
	} else if (z <= 7.4e-93) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -3.6e+179:
		tmp = y / a
	elif z <= -5e+117:
		tmp = y * (z / -t)
	elif z <= -4e+25:
		tmp = y / a
	elif z <= -1.65e-54:
		tmp = (z * y) / -t
	elif z <= 7.4e-93:
		tmp = x / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -3.6e+179)
		tmp = Float64(y / a);
	elseif (z <= -5e+117)
		tmp = Float64(y * Float64(z / Float64(-t)));
	elseif (z <= -4e+25)
		tmp = Float64(y / a);
	elseif (z <= -1.65e-54)
		tmp = Float64(Float64(z * y) / Float64(-t));
	elseif (z <= 7.4e-93)
		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 <= -3.6e+179)
		tmp = y / a;
	elseif (z <= -5e+117)
		tmp = y * (z / -t);
	elseif (z <= -4e+25)
		tmp = y / a;
	elseif (z <= -1.65e-54)
		tmp = (z * y) / -t;
	elseif (z <= 7.4e-93)
		tmp = x / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -3.6e+179], N[(y / a), $MachinePrecision], If[LessEqual[z, -5e+117], N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -4e+25], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.65e-54], N[(N[(z * y), $MachinePrecision] / (-t)), $MachinePrecision], If[LessEqual[z, 7.4e-93], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq -1.65 \cdot 10^{-54}:\\
\;\;\;\;\frac{z \cdot y}{-t}\\

\mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\
\;\;\;\;\frac{x}{t}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.5999999999999998e179 or -4.99999999999999983e117 < z < -4.00000000000000036e25 or 7.40000000000000005e-93 < z

    1. Initial program 68.1%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative68.1%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified68.1%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.7%

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

    if -3.5999999999999998e179 < z < -4.99999999999999983e117

    1. Initial program 66.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative66.4%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified66.4%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 30.9%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. mul-1-neg30.9%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t - a \cdot z}} \]
      3. distribute-rgt-neg-in50.8%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{t - a \cdot z}\right)} \]
      4. distribute-neg-frac250.8%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-\left(t - a \cdot z\right)}} \]
      5. cancel-sign-sub-inv50.8%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(t + \left(-a\right) \cdot z\right)}} \]
      6. *-commutative50.8%

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

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(z \cdot \left(-a\right) + t\right)}} \]
      8. *-commutative50.8%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a\right) \cdot z} + t\right)} \]
      9. neg-mul-150.8%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-1 \cdot a\right)} \cdot z + t\right)} \]
      10. associate-*r*50.8%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      11. mul-1-neg50.8%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      12. distribute-rgt-neg-in50.8%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{a \cdot \left(-z\right)} + t\right)} \]
      13. fma-undefine50.8%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      14. neg-sub050.8%

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

        \[\leadsto y \cdot \frac{z}{0 - \color{blue}{\left(a \cdot \left(-z\right) + t\right)}} \]
      16. distribute-rgt-neg-in50.8%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      17. mul-1-neg50.8%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      18. associate-*r*50.8%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-1 \cdot a\right) \cdot z} + t\right)} \]
      19. neg-mul-150.8%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a\right)} \cdot z + t\right)} \]
      20. *-commutative50.8%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{z \cdot \left(-a\right)} + t\right)} \]
      21. associate--r+50.8%

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{z \cdot a - t}} \]
    8. Taylor expanded in z around 0 43.4%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/43.4%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      2. neg-mul-143.4%

        \[\leadsto y \cdot \frac{\color{blue}{-z}}{t} \]
    10. Simplified43.4%

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

    if -4.00000000000000036e25 < z < -1.64999999999999996e-54

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 61.4%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. mul-1-neg61.4%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t - a \cdot z}} \]
      3. distribute-rgt-neg-in61.4%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{t - a \cdot z}\right)} \]
      4. distribute-neg-frac261.4%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-\left(t - a \cdot z\right)}} \]
      5. cancel-sign-sub-inv61.4%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(t + \left(-a\right) \cdot z\right)}} \]
      6. *-commutative61.4%

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

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(z \cdot \left(-a\right) + t\right)}} \]
      8. *-commutative61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a\right) \cdot z} + t\right)} \]
      9. neg-mul-161.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-1 \cdot a\right)} \cdot z + t\right)} \]
      10. associate-*r*61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      11. mul-1-neg61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      12. distribute-rgt-neg-in61.4%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{a \cdot \left(-z\right)} + t\right)} \]
      13. fma-undefine61.4%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      14. neg-sub061.4%

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

        \[\leadsto y \cdot \frac{z}{0 - \color{blue}{\left(a \cdot \left(-z\right) + t\right)}} \]
      16. distribute-rgt-neg-in61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      17. mul-1-neg61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      18. associate-*r*61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-1 \cdot a\right) \cdot z} + t\right)} \]
      19. neg-mul-161.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a\right)} \cdot z + t\right)} \]
      20. *-commutative61.4%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{z \cdot \left(-a\right)} + t\right)} \]
      21. associate--r+61.4%

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{z \cdot a - t}} \]
    8. Taylor expanded in z around 0 54.9%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/54.9%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      2. neg-mul-154.9%

        \[\leadsto y \cdot \frac{\color{blue}{-z}}{t} \]
    10. Simplified54.9%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    12. Step-by-step derivation
      1. associate-*r/54.9%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot z\right)}{t}} \]
      2. *-commutative54.9%

        \[\leadsto \frac{-1 \cdot \color{blue}{\left(z \cdot y\right)}}{t} \]
      3. neg-mul-154.9%

        \[\leadsto \frac{\color{blue}{-z \cdot y}}{t} \]
      4. distribute-rgt-neg-in54.9%

        \[\leadsto \frac{\color{blue}{z \cdot \left(-y\right)}}{t} \]
    13. Simplified54.9%

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

    if -1.64999999999999996e-54 < z < 7.40000000000000005e-93

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 57.0%

      \[\leadsto \color{blue}{\frac{x}{t}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification57.3%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+117}:\\ \;\;\;\;y \cdot \frac{z}{-t}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.65 \cdot 10^{-54}:\\ \;\;\;\;\frac{z \cdot y}{-t}\\ \mathbf{elif}\;z \leq 7.4 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 52.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{z}{-t}\\ \mathbf{if}\;z \leq -3.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+119}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-54}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (* y (/ z (- t)))))
   (if (<= z -3.6e+179)
     (/ y a)
     (if (<= z -1.9e+119)
       t_1
       (if (<= z -4e+25)
         (/ y a)
         (if (<= z -1.05e-54) t_1 (if (<= z 5.5e-93) (/ x t) (/ y a))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = y * (z / -t);
	double tmp;
	if (z <= -3.6e+179) {
		tmp = y / a;
	} else if (z <= -1.9e+119) {
		tmp = t_1;
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -1.05e-54) {
		tmp = t_1;
	} else if (z <= 5.5e-93) {
		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) :: t_1
    real(8) :: tmp
    t_1 = y * (z / -t)
    if (z <= (-3.6d+179)) then
        tmp = y / a
    else if (z <= (-1.9d+119)) then
        tmp = t_1
    else if (z <= (-4d+25)) then
        tmp = y / a
    else if (z <= (-1.05d-54)) then
        tmp = t_1
    else if (z <= 5.5d-93) 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 t_1 = y * (z / -t);
	double tmp;
	if (z <= -3.6e+179) {
		tmp = y / a;
	} else if (z <= -1.9e+119) {
		tmp = t_1;
	} else if (z <= -4e+25) {
		tmp = y / a;
	} else if (z <= -1.05e-54) {
		tmp = t_1;
	} else if (z <= 5.5e-93) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = y * (z / -t)
	tmp = 0
	if z <= -3.6e+179:
		tmp = y / a
	elif z <= -1.9e+119:
		tmp = t_1
	elif z <= -4e+25:
		tmp = y / a
	elif z <= -1.05e-54:
		tmp = t_1
	elif z <= 5.5e-93:
		tmp = x / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(y * Float64(z / Float64(-t)))
	tmp = 0.0
	if (z <= -3.6e+179)
		tmp = Float64(y / a);
	elseif (z <= -1.9e+119)
		tmp = t_1;
	elseif (z <= -4e+25)
		tmp = Float64(y / a);
	elseif (z <= -1.05e-54)
		tmp = t_1;
	elseif (z <= 5.5e-93)
		tmp = Float64(x / t);
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = y * (z / -t);
	tmp = 0.0;
	if (z <= -3.6e+179)
		tmp = y / a;
	elseif (z <= -1.9e+119)
		tmp = t_1;
	elseif (z <= -4e+25)
		tmp = y / a;
	elseif (z <= -1.05e-54)
		tmp = t_1;
	elseif (z <= 5.5e-93)
		tmp = x / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(y * N[(z / (-t)), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -3.6e+179], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.9e+119], t$95$1, If[LessEqual[z, -4e+25], N[(y / a), $MachinePrecision], If[LessEqual[z, -1.05e-54], t$95$1, If[LessEqual[z, 5.5e-93], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -1.9 \cdot 10^{+119}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;z \leq -1.05 \cdot 10^{-54}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.5999999999999998e179 or -1.89999999999999995e119 < z < -4.00000000000000036e25 or 5.49999999999999968e-93 < z

    1. Initial program 68.1%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative68.1%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified68.1%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 59.7%

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

    if -3.5999999999999998e179 < z < -1.89999999999999995e119 or -4.00000000000000036e25 < z < -1.05e-54

    1. Initial program 89.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative89.2%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified89.2%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 51.7%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. mul-1-neg51.7%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t - a \cdot z}} \]
      3. distribute-rgt-neg-in58.0%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{t - a \cdot z}\right)} \]
      4. distribute-neg-frac258.0%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-\left(t - a \cdot z\right)}} \]
      5. cancel-sign-sub-inv58.0%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(t + \left(-a\right) \cdot z\right)}} \]
      6. *-commutative58.0%

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

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(z \cdot \left(-a\right) + t\right)}} \]
      8. *-commutative58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a\right) \cdot z} + t\right)} \]
      9. neg-mul-158.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-1 \cdot a\right)} \cdot z + t\right)} \]
      10. associate-*r*58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      11. mul-1-neg58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      12. distribute-rgt-neg-in58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{a \cdot \left(-z\right)} + t\right)} \]
      13. fma-undefine58.0%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      14. neg-sub058.0%

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

        \[\leadsto y \cdot \frac{z}{0 - \color{blue}{\left(a \cdot \left(-z\right) + t\right)}} \]
      16. distribute-rgt-neg-in58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      17. mul-1-neg58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      18. associate-*r*58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-1 \cdot a\right) \cdot z} + t\right)} \]
      19. neg-mul-158.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a\right)} \cdot z + t\right)} \]
      20. *-commutative58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{z \cdot \left(-a\right)} + t\right)} \]
      21. associate--r+58.0%

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{z \cdot a - t}} \]
    8. Taylor expanded in z around 0 51.3%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/51.3%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      2. neg-mul-151.3%

        \[\leadsto y \cdot \frac{\color{blue}{-z}}{t} \]
    10. Simplified51.3%

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

    if -1.05e-54 < z < 5.49999999999999968e-93

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 57.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+119}:\\ \;\;\;\;y \cdot \frac{z}{-t}\\ \mathbf{elif}\;z \leq -4 \cdot 10^{+25}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{-54}:\\ \;\;\;\;y \cdot \frac{z}{-t}\\ \mathbf{elif}\;z \leq 5.5 \cdot 10^{-93}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 67.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -6500000 \lor \neg \left(a \leq -2.9 \cdot 10^{-33}\right) \land \left(a \leq -4.2 \cdot 10^{-77} \lor \neg \left(a \leq 1.45 \cdot 10^{-105}\right)\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= a -6500000.0)
         (and (not (<= a -2.9e-33))
              (or (<= a -4.2e-77) (not (<= a 1.45e-105)))))
   (/ (- y (/ x z)) a)
   (/ (- x (* z y)) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -6500000.0) || (!(a <= -2.9e-33) && ((a <= -4.2e-77) || !(a <= 1.45e-105)))) {
		tmp = (y - (x / z)) / a;
	} else {
		tmp = (x - (z * y)) / t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((a <= (-6500000.0d0)) .or. (.not. (a <= (-2.9d-33))) .and. (a <= (-4.2d-77)) .or. (.not. (a <= 1.45d-105))) then
        tmp = (y - (x / z)) / a
    else
        tmp = (x - (z * y)) / t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((a <= -6500000.0) || (!(a <= -2.9e-33) && ((a <= -4.2e-77) || !(a <= 1.45e-105)))) {
		tmp = (y - (x / z)) / a;
	} else {
		tmp = (x - (z * y)) / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (a <= -6500000.0) or (not (a <= -2.9e-33) and ((a <= -4.2e-77) or not (a <= 1.45e-105))):
		tmp = (y - (x / z)) / a
	else:
		tmp = (x - (z * y)) / t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((a <= -6500000.0) || (!(a <= -2.9e-33) && ((a <= -4.2e-77) || !(a <= 1.45e-105))))
		tmp = Float64(Float64(y - Float64(x / z)) / a);
	else
		tmp = Float64(Float64(x - Float64(z * y)) / t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((a <= -6500000.0) || (~((a <= -2.9e-33)) && ((a <= -4.2e-77) || ~((a <= 1.45e-105)))))
		tmp = (y - (x / z)) / a;
	else
		tmp = (x - (z * y)) / t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[a, -6500000.0], And[N[Not[LessEqual[a, -2.9e-33]], $MachinePrecision], Or[LessEqual[a, -4.2e-77], N[Not[LessEqual[a, 1.45e-105]], $MachinePrecision]]]], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6500000 \lor \neg \left(a \leq -2.9 \cdot 10^{-33}\right) \land \left(a \leq -4.2 \cdot 10^{-77} \lor \neg \left(a \leq 1.45 \cdot 10^{-105}\right)\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x - z \cdot y}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.5e6 or -2.90000000000000003e-33 < a < -4.20000000000000031e-77 or 1.45000000000000002e-105 < a

    1. Initial program 73.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative73.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified73.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in y around -inf 71.4%

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a}} \]
    8. Step-by-step derivation
      1. associate-*r/74.7%

        \[\leadsto \color{blue}{\frac{-1 \cdot \left(y \cdot \left(\frac{x}{y \cdot z} - 1\right)\right)}{a}} \]
      2. associate-*r*74.7%

        \[\leadsto \frac{\color{blue}{\left(-1 \cdot y\right) \cdot \left(\frac{x}{y \cdot z} - 1\right)}}{a} \]
      3. neg-mul-174.7%

        \[\leadsto \frac{\color{blue}{\left(-y\right)} \cdot \left(\frac{x}{y \cdot z} - 1\right)}{a} \]
      4. sub-neg74.7%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\left(\frac{x}{y \cdot z} + \left(-1\right)\right)}}{a} \]
      5. associate-/r*72.0%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\color{blue}{\frac{\frac{x}{y}}{z}} + \left(-1\right)\right)}{a} \]
      6. metadata-eval72.0%

        \[\leadsto \frac{\left(-y\right) \cdot \left(\frac{\frac{x}{y}}{z} + \color{blue}{-1}\right)}{a} \]
    9. Simplified72.0%

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

      \[\leadsto \frac{\color{blue}{y + -1 \cdot \frac{x}{z}}}{a} \]
    11. Step-by-step derivation
      1. mul-1-neg82.7%

        \[\leadsto \frac{y + \color{blue}{\left(-\frac{x}{z}\right)}}{a} \]
      2. unsub-neg82.7%

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
    12. Simplified82.7%

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

    if -6.5e6 < a < -2.90000000000000003e-33 or -4.20000000000000031e-77 < a < 1.45000000000000002e-105

    1. Initial program 96.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative96.4%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified96.4%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in t around inf 89.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6500000 \lor \neg \left(a \leq -2.9 \cdot 10^{-33}\right) \land \left(a \leq -4.2 \cdot 10^{-77} \lor \neg \left(a \leq 1.45 \cdot 10^{-105}\right)\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 58.5% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq 4.2 \cdot 10^{+21}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+53}:\\
\;\;\;\;\frac{y}{a}\\

\mathbf{elif}\;y \leq 2.8 \cdot 10^{+171}:\\
\;\;\;\;t\_1\\

\mathbf{else}:\\
\;\;\;\;y \cdot \frac{z}{-t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.8999999999999998e103 or 4.2e21 < y < 2.4e53

    1. Initial program 69.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative69.0%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified69.0%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 64.6%

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

    if -2.8999999999999998e103 < y < 4.2e21 or 2.4e53 < y < 2.80000000000000004e171

    1. Initial program 91.6%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative91.6%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified91.6%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 71.2%

      \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative71.2%

        \[\leadsto \frac{x}{t - \color{blue}{z \cdot a}} \]
    7. Simplified71.2%

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

    if 2.80000000000000004e171 < y

    1. Initial program 61.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative61.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified61.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 49.1%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. mul-1-neg49.1%

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

        \[\leadsto -\color{blue}{y \cdot \frac{z}{t - a \cdot z}} \]
      3. distribute-rgt-neg-in58.0%

        \[\leadsto \color{blue}{y \cdot \left(-\frac{z}{t - a \cdot z}\right)} \]
      4. distribute-neg-frac258.0%

        \[\leadsto y \cdot \color{blue}{\frac{z}{-\left(t - a \cdot z\right)}} \]
      5. cancel-sign-sub-inv58.0%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(t + \left(-a\right) \cdot z\right)}} \]
      6. *-commutative58.0%

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

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\left(z \cdot \left(-a\right) + t\right)}} \]
      8. *-commutative58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a\right) \cdot z} + t\right)} \]
      9. neg-mul-158.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-1 \cdot a\right)} \cdot z + t\right)} \]
      10. associate-*r*58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      11. mul-1-neg58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      12. distribute-rgt-neg-in58.0%

        \[\leadsto y \cdot \frac{z}{-\left(\color{blue}{a \cdot \left(-z\right)} + t\right)} \]
      13. fma-undefine58.0%

        \[\leadsto y \cdot \frac{z}{-\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      14. neg-sub058.0%

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

        \[\leadsto y \cdot \frac{z}{0 - \color{blue}{\left(a \cdot \left(-z\right) + t\right)}} \]
      16. distribute-rgt-neg-in58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a \cdot z\right)} + t\right)} \]
      17. mul-1-neg58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{-1 \cdot \left(a \cdot z\right)} + t\right)} \]
      18. associate-*r*58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-1 \cdot a\right) \cdot z} + t\right)} \]
      19. neg-mul-158.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{\left(-a\right)} \cdot z + t\right)} \]
      20. *-commutative58.0%

        \[\leadsto y \cdot \frac{z}{0 - \left(\color{blue}{z \cdot \left(-a\right)} + t\right)} \]
      21. associate--r+58.0%

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

      \[\leadsto \color{blue}{y \cdot \frac{z}{z \cdot a - t}} \]
    8. Taylor expanded in z around 0 49.3%

      \[\leadsto y \cdot \color{blue}{\left(-1 \cdot \frac{z}{t}\right)} \]
    9. Step-by-step derivation
      1. associate-*r/49.3%

        \[\leadsto y \cdot \color{blue}{\frac{-1 \cdot z}{t}} \]
      2. neg-mul-149.3%

        \[\leadsto y \cdot \frac{\color{blue}{-z}}{t} \]
    10. Simplified49.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+103}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;y \leq 4.2 \cdot 10^{+21}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;y \leq 2.4 \cdot 10^{+53}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;y \leq 2.8 \cdot 10^{+171}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{z}{-t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 71.4% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-25} \lor \neg \left(x \leq 2 \cdot 10^{-19}\right):\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - \frac{t}{z}}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= x -1.65e-25) (not (<= x 2e-19)))
   (/ x (- t (* z a)))
   (/ y (- a (/ t z)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -1.65e-25) || !(x <= 2e-19)) {
		tmp = x / (t - (z * a));
	} else {
		tmp = y / (a - (t / 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 ((x <= (-1.65d-25)) .or. (.not. (x <= 2d-19))) then
        tmp = x / (t - (z * a))
    else
        tmp = y / (a - (t / z))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((x <= -1.65e-25) || !(x <= 2e-19)) {
		tmp = x / (t - (z * a));
	} else {
		tmp = y / (a - (t / z));
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (x <= -1.65e-25) or not (x <= 2e-19):
		tmp = x / (t - (z * a))
	else:
		tmp = y / (a - (t / z))
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((x <= -1.65e-25) || !(x <= 2e-19))
		tmp = Float64(x / Float64(t - Float64(z * a)));
	else
		tmp = Float64(y / Float64(a - Float64(t / z)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((x <= -1.65e-25) || ~((x <= 2e-19)))
		tmp = x / (t - (z * a));
	else
		tmp = y / (a - (t / z));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[x, -1.65e-25], N[Not[LessEqual[x, 2e-19]], $MachinePrecision]], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(y / N[(a - N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;x \leq -1.65 \cdot 10^{-25} \lor \neg \left(x \leq 2 \cdot 10^{-19}\right):\\
\;\;\;\;\frac{x}{t - z \cdot a}\\

\mathbf{else}:\\
\;\;\;\;\frac{y}{a - \frac{t}{z}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -1.6499999999999999e-25 or 2e-19 < x

    1. Initial program 84.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative84.4%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified84.4%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around inf 69.5%

      \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. *-commutative69.5%

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

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

    if -1.6499999999999999e-25 < x < 2e-19

    1. Initial program 82.7%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative82.7%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified82.7%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 77.2%

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y}{\frac{t}{z} - a}} \]
    7. Step-by-step derivation
      1. mul-1-neg78.6%

        \[\leadsto \color{blue}{-\frac{y}{\frac{t}{z} - a}} \]
      2. distribute-neg-frac278.6%

        \[\leadsto \color{blue}{\frac{y}{-\left(\frac{t}{z} - a\right)}} \]
      3. sub-neg78.6%

        \[\leadsto \frac{y}{-\color{blue}{\left(\frac{t}{z} + \left(-a\right)\right)}} \]
      4. +-commutative78.6%

        \[\leadsto \frac{y}{-\color{blue}{\left(\left(-a\right) + \frac{t}{z}\right)}} \]
      5. distribute-neg-in78.6%

        \[\leadsto \frac{y}{\color{blue}{\left(-\left(-a\right)\right) + \left(-\frac{t}{z}\right)}} \]
      6. remove-double-neg78.6%

        \[\leadsto \frac{y}{\color{blue}{a} + \left(-\frac{t}{z}\right)} \]
      7. unsub-neg78.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -1.65 \cdot 10^{-25} \lor \neg \left(x \leq 2 \cdot 10^{-19}\right):\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a - \frac{t}{z}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 54.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -43000000 \lor \neg \left(z \leq 7.4 \cdot 10^{-93}\right):\\ \;\;\;\;\frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -43000000.0) (not (<= z 7.4e-93))) (/ y a) (/ x t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -43000000.0) || !(z <= 7.4e-93)) {
		tmp = y / a;
	} else {
		tmp = x / t;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: tmp
    if ((z <= (-43000000.0d0)) .or. (.not. (z <= 7.4d-93))) then
        tmp = y / a
    else
        tmp = x / t
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -43000000.0) || !(z <= 7.4e-93)) {
		tmp = y / a;
	} else {
		tmp = x / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -43000000.0) or not (z <= 7.4e-93):
		tmp = y / a
	else:
		tmp = x / t
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -43000000.0) || !(z <= 7.4e-93))
		tmp = Float64(y / a);
	else
		tmp = Float64(x / t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	tmp = 0.0;
	if ((z <= -43000000.0) || ~((z <= 7.4e-93)))
		tmp = y / a;
	else
		tmp = x / t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -43000000.0], N[Not[LessEqual[z, 7.4e-93]], $MachinePrecision]], N[(y / a), $MachinePrecision], N[(x / t), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -43000000 \lor \neg \left(z \leq 7.4 \cdot 10^{-93}\right):\\
\;\;\;\;\frac{y}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{t}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.3e7 or 7.40000000000000005e-93 < z

    1. Initial program 70.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative70.0%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified70.0%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 53.2%

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

    if -4.3e7 < z < 7.40000000000000005e-93

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. *-commutative99.8%

        \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
    3. Simplified99.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around 0 52.0%

      \[\leadsto \color{blue}{\frac{x}{t}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification52.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -43000000 \lor \neg \left(z \leq 7.4 \cdot 10^{-93}\right):\\ \;\;\;\;\frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 35.0% accurate, 3.7× 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 83.6%

    \[\frac{x - y \cdot z}{t - a \cdot z} \]
  2. Step-by-step derivation
    1. *-commutative83.6%

      \[\leadsto \frac{x - y \cdot z}{t - \color{blue}{z \cdot a}} \]
  3. Simplified83.6%

    \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in z around 0 32.7%

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

Developer target: 97.3% accurate, 0.4× 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 2024110 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (if (< z -32113435955957344.0) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 3.5139522372978296e-86) (* (- x (* y z)) (/ 1.0 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a)))))

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