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

Percentage Accurate: 85.3% → 91.6%
Time: 11.4s
Alternatives: 11
Speedup: 0.7×

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 11 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: 85.3% 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: 91.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;\frac{y - \frac{x}{z}}{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))) < -1.00000000000000001e-155

    1. Initial program 95.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def95.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*99.9%

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    8. Step-by-step derivation
      1. +-commutative95.1%

        \[\leadsto \color{blue}{\frac{x}{t - a \cdot z} + -1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
      2. sub-neg95.1%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{t - a \cdot z} - \frac{y}{\frac{t + \color{blue}{\left(-a \cdot z\right)}}{z}} \]
      12. sub-neg99.9%

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

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

    if -1.00000000000000001e-155 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 5.00000000000000009e305

    1. Initial program 91.5%

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

    if 5.00000000000000009e305 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z)))

    1. Initial program 30.8%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def30.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*51.5%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -1 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{t - z \cdot a} - \frac{y}{\frac{t - z \cdot a}{z}}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]

Alternative 2: 90.5% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+80} \lor \neg \left(z \leq 6.8 \cdot 10^{+173}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.20000000000000003e80 or 6.80000000000000042e173 < z

    1. Initial program 62.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def62.1%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*73.5%

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

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

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

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

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

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

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

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

    if -4.20000000000000003e80 < z < 6.80000000000000042e173

    1. Initial program 97.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification93.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.2 \cdot 10^{+80} \lor \neg \left(z \leq 6.8 \cdot 10^{+173}\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \end{array} \]

Alternative 3: 72.1% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq -4.85 \cdot 10^{-82}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -6e36

    1. Initial program 72.0%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def72.0%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*83.3%

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

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

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

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

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

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

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

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

    if -6e36 < z < -4.84999999999999993e-82

    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. Taylor expanded in x around inf 72.7%

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

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

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

    if -4.84999999999999993e-82 < z < 1.6500000000000001e-7

    1. Initial program 99.9%

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

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

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

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

    if 1.6500000000000001e-7 < z

    1. Initial program 72.7%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*78.0%

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{t - a \cdot z} + -1 \cdot \frac{y \cdot z}{t - a \cdot z}} \]
      2. sub-neg72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{t - a \cdot z}{z}}} \]
      4. div-sub62.8%

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \color{blue}{\frac{a}{\frac{z}{z}}}} \]
      6. *-inverses76.4%

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
    12. Simplified76.4%

      \[\leadsto \color{blue}{\frac{-y}{\frac{t}{z} - \frac{a}{1}}} \]
    13. Taylor expanded in y around 0 76.4%

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

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

        \[\leadsto \color{blue}{\frac{-y}{\frac{t}{z} - a}} \]
    15. Simplified76.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6 \cdot 10^{+36}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -4.85 \cdot 10^{-82}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 1.65 \cdot 10^{-7}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{\frac{t}{z} - a}\\ \end{array} \]

Alternative 4: 64.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+49}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-83}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+100}:\\ \;\;\;\;\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 -1.75e+49)
   (/ y a)
   (if (<= z -5.5e-83)
     (/ x (- t (* z a)))
     (if (<= z 1.55e+100) (/ (- x (* y z)) t) (/ y a)))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -1.75e+49) {
		tmp = y / a;
	} else if (z <= -5.5e-83) {
		tmp = x / (t - (z * a));
	} else if (z <= 1.55e+100) {
		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 <= (-1.75d+49)) then
        tmp = y / a
    else if (z <= (-5.5d-83)) then
        tmp = x / (t - (z * a))
    else if (z <= 1.55d+100) 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 <= -1.75e+49) {
		tmp = y / a;
	} else if (z <= -5.5e-83) {
		tmp = x / (t - (z * a));
	} else if (z <= 1.55e+100) {
		tmp = (x - (y * z)) / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -1.75e+49:
		tmp = y / a
	elif z <= -5.5e-83:
		tmp = x / (t - (z * a))
	elif z <= 1.55e+100:
		tmp = (x - (y * z)) / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -1.75e+49)
		tmp = Float64(y / a);
	elseif (z <= -5.5e-83)
		tmp = Float64(x / Float64(t - Float64(z * a)));
	elseif (z <= 1.55e+100)
		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 <= -1.75e+49)
		tmp = y / a;
	elseif (z <= -5.5e-83)
		tmp = x / (t - (z * a));
	elseif (z <= 1.55e+100)
		tmp = (x - (y * z)) / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -1.75e+49], N[(y / a), $MachinePrecision], If[LessEqual[z, -5.5e-83], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.55e+100], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.74999999999999987e49 or 1.55000000000000003e100 < z

    1. Initial program 67.3%

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

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

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

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

    if -1.74999999999999987e49 < z < -5.49999999999999964e-83

    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. Taylor expanded in x around inf 71.1%

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

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

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

    if -5.49999999999999964e-83 < z < 1.55000000000000003e100

    1. Initial program 99.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+49}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5.5 \cdot 10^{-83}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 1.55 \cdot 10^{+100}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 5: 71.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -6.5 \cdot 10^{+34}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{x - y \cdot z}{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 -6.5e+34)
     t_1
     (if (<= z -4.7e-84)
       (/ x (- t (* z a)))
       (if (<= z 6.8e+21) (/ (- x (* y z)) 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 <= -6.5e+34) {
		tmp = t_1;
	} else if (z <= -4.7e-84) {
		tmp = x / (t - (z * a));
	} else if (z <= 6.8e+21) {
		tmp = (x - (y * z)) / t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (y - (x / z)) / a
    if (z <= (-6.5d+34)) then
        tmp = t_1
    else if (z <= (-4.7d-84)) then
        tmp = x / (t - (z * a))
    else if (z <= 6.8d+21) then
        tmp = (x - (y * z)) / t
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - (x / z)) / a;
	double tmp;
	if (z <= -6.5e+34) {
		tmp = t_1;
	} else if (z <= -4.7e-84) {
		tmp = x / (t - (z * a));
	} else if (z <= 6.8e+21) {
		tmp = (x - (y * z)) / t;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	tmp = 0
	if z <= -6.5e+34:
		tmp = t_1
	elif z <= -4.7e-84:
		tmp = x / (t - (z * a))
	elif z <= 6.8e+21:
		tmp = (x - (y * z)) / 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 <= -6.5e+34)
		tmp = t_1;
	elseif (z <= -4.7e-84)
		tmp = Float64(x / Float64(t - Float64(z * a)));
	elseif (z <= 6.8e+21)
		tmp = Float64(Float64(x - Float64(y * z)) / 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 <= -6.5e+34)
		tmp = t_1;
	elseif (z <= -4.7e-84)
		tmp = x / (t - (z * a));
	elseif (z <= 6.8e+21)
		tmp = (x - (y * z)) / 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, -6.5e+34], t$95$1, If[LessEqual[z, -4.7e-84], N[(x / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 6.8e+21], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -4.7 \cdot 10^{-84}:\\
\;\;\;\;\frac{x}{t - z \cdot a}\\

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

\mathbf{else}:\\
\;\;\;\;t_1\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -6.50000000000000017e34 or 6.8e21 < z

    1. Initial program 71.6%

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

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

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

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

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*80.0%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{y - \frac{x}{z}}}{a} \]
    9. Simplified76.5%

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

    if -6.50000000000000017e34 < z < -4.7e-84

    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. Taylor expanded in x around inf 72.7%

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

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

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

    if -4.7e-84 < z < 6.8e21

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -6.5 \cdot 10^{+34}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -4.7 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;z \leq 6.8 \cdot 10^{+21}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]

Alternative 6: 53.1% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+36}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{-x}{a}}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (<= z -2.3e+36)
   (/ y a)
   (if (<= z 2e-155)
     (/ x t)
     (if (<= z 1.6e-82)
       (/ (/ (- x) a) z)
       (if (<= z 3.5e-8) (/ x t) (/ y a))))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if (z <= -2.3e+36) {
		tmp = y / a;
	} else if (z <= 2e-155) {
		tmp = x / t;
	} else if (z <= 1.6e-82) {
		tmp = (-x / a) / z;
	} else if (z <= 3.5e-8) {
		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 <= (-2.3d+36)) then
        tmp = y / a
    else if (z <= 2d-155) then
        tmp = x / t
    else if (z <= 1.6d-82) then
        tmp = (-x / a) / z
    else if (z <= 3.5d-8) 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 <= -2.3e+36) {
		tmp = y / a;
	} else if (z <= 2e-155) {
		tmp = x / t;
	} else if (z <= 1.6e-82) {
		tmp = (-x / a) / z;
	} else if (z <= 3.5e-8) {
		tmp = x / t;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if z <= -2.3e+36:
		tmp = y / a
	elif z <= 2e-155:
		tmp = x / t
	elif z <= 1.6e-82:
		tmp = (-x / a) / z
	elif z <= 3.5e-8:
		tmp = x / t
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	tmp = 0.0
	if (z <= -2.3e+36)
		tmp = Float64(y / a);
	elseif (z <= 2e-155)
		tmp = Float64(x / t);
	elseif (z <= 1.6e-82)
		tmp = Float64(Float64(Float64(-x) / a) / z);
	elseif (z <= 3.5e-8)
		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 <= -2.3e+36)
		tmp = y / a;
	elseif (z <= 2e-155)
		tmp = x / t;
	elseif (z <= 1.6e-82)
		tmp = (-x / a) / z;
	elseif (z <= 3.5e-8)
		tmp = x / t;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := If[LessEqual[z, -2.3e+36], N[(y / a), $MachinePrecision], If[LessEqual[z, 2e-155], N[(x / t), $MachinePrecision], If[LessEqual[z, 1.6e-82], N[(N[((-x) / a), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[z, 3.5e-8], N[(x / t), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.29999999999999996e36 or 3.50000000000000024e-8 < z

    1. Initial program 72.4%

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

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

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

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

    if -2.29999999999999996e36 < z < 2.00000000000000003e-155 or 1.6000000000000001e-82 < z < 3.50000000000000024e-8

    1. Initial program 99.9%

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

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

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

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

    if 2.00000000000000003e-155 < z < 1.6000000000000001e-82

    1. Initial program 99.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def99.9%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*99.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y - \frac{x}{z}}{a}} \]
    10. Taylor expanded in y around 0 51.5%

      \[\leadsto \color{blue}{-1 \cdot \frac{x}{a \cdot z}} \]
    11. Step-by-step derivation
      1. mul-1-neg51.5%

        \[\leadsto \color{blue}{-\frac{x}{a \cdot z}} \]
      2. associate-/r*51.7%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.3 \cdot 10^{+36}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{-155}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 1.6 \cdot 10^{-82}:\\ \;\;\;\;\frac{\frac{-x}{a}}{z}\\ \mathbf{elif}\;z \leq 3.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 7: 52.5% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 4.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{y}{t} \cdot \left(-z\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -8.00000000000000034e36 or 2.1500000000000001e-8 < z

    1. Initial program 72.4%

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

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

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

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

    if -8.00000000000000034e36 < z < 4.8999999999999996e-170 or 4.4999999999999999e-74 < z < 2.1500000000000001e-8

    1. Initial program 99.9%

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

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

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

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

    if 4.8999999999999996e-170 < z < 4.4999999999999999e-74

    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. Taylor expanded in x around 0 55.3%

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

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

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

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

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

        \[\leadsto -\frac{y \cdot z}{\color{blue}{\mathsf{fma}\left(a, -z, t\right)}} \]
      6. associate-*l/55.3%

        \[\leadsto -\color{blue}{\frac{y}{\mathsf{fma}\left(a, -z, t\right)} \cdot z} \]
      7. distribute-rgt-neg-in55.3%

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

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

        \[\leadsto \frac{y}{\color{blue}{\left(-a \cdot z\right)} + t} \cdot \left(-z\right) \]
      10. +-commutative55.3%

        \[\leadsto \frac{y}{\color{blue}{t + \left(-a \cdot z\right)}} \cdot \left(-z\right) \]
      11. sub-neg55.3%

        \[\leadsto \frac{y}{\color{blue}{t - a \cdot z}} \cdot \left(-z\right) \]
      12. *-commutative55.3%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -8 \cdot 10^{+36}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-170}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 4.5 \cdot 10^{-74}:\\ \;\;\;\;\frac{y}{t} \cdot \left(-z\right)\\ \mathbf{elif}\;z \leq 2.15 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 8: 52.7% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-74}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999999e36 or 3.89999999999999985e-8 < z

    1. Initial program 72.4%

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

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

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

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

    if -3.1999999999999999e36 < z < 4.8999999999999996e-170 or 7.5e-74 < z < 3.89999999999999985e-8

    1. Initial program 99.9%

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

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

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

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

    if 4.8999999999999996e-170 < z < 7.5e-74

    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. Taylor expanded in x around 0 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    5. Step-by-step derivation
      1. fma-def99.8%

        \[\leadsto \color{blue}{\mathsf{fma}\left(-1, \frac{y \cdot z}{t - a \cdot z}, \frac{x}{t - a \cdot z}\right)} \]
      2. associate-/l*88.6%

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\left(-y \cdot z\right)}}{t} \]
      2. sub-neg65.6%

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\left(-y\right)} \cdot z}{t} \]
    12. Simplified55.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{+36}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 4.9 \cdot 10^{-170}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-74}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{t}\\ \mathbf{elif}\;z \leq 3.9 \cdot 10^{-8}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 9: 64.6% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.75 \cdot 10^{+49} \lor \neg \left(z \leq 4.5 \cdot 10^{+104}\right):\\
\;\;\;\;\frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.74999999999999987e49 or 4.4999999999999998e104 < z

    1. Initial program 67.3%

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

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

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

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

    if -1.74999999999999987e49 < z < 4.4999999999999998e104

    1. Initial program 99.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.75 \cdot 10^{+49} \lor \neg \left(z \leq 4.5 \cdot 10^{+104}\right):\\ \;\;\;\;\frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \end{array} \]

Alternative 10: 54.4% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.1 \cdot 10^{+34} \lor \neg \left(z \leq 1.55 \cdot 10^{-7}\right):\\
\;\;\;\;\frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.10000000000000017e34 or 1.55e-7 < z

    1. Initial program 72.4%

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

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

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

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

    if -2.10000000000000017e34 < z < 1.55e-7

    1. Initial program 99.9%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{+34} \lor \neg \left(z \leq 1.55 \cdot 10^{-7}\right):\\ \;\;\;\;\frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t}\\ \end{array} \]

Alternative 11: 34.7% 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 88.2%

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

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

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

    \[\leadsto \color{blue}{\frac{x}{t}} \]
  5. Final simplification38.6%

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

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

  :herbie-target
  (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))))