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

Percentage Accurate: 85.1% → 91.7%
Time: 16.7s
Alternatives: 11
Speedup: 0.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Accuracy vs Speed?

Herbie found 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.1% 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.7% accurate, 0.2× 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 -5 \cdot 10^{-305}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{y}{a} + \frac{-1}{z \cdot \frac{a}{x}}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{x}{t\_1} - \frac{y \cdot z}{t\_1}\\ \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 -5e-305)
     t_2
     (if (<= t_2 0.0)
       (+ (/ y a) (/ -1.0 (* z (/ a x))))
       (if (<= t_2 2e+292)
         (- (/ x t_1) (/ (* y z) t_1))
         (/ (- 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 <= -5e-305) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (y / a) + (-1.0 / (z * (a / x)));
	} else if (t_2 <= 2e+292) {
		tmp = (x / t_1) - ((y * z) / t_1);
	} 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 <= (-5d-305)) then
        tmp = t_2
    else if (t_2 <= 0.0d0) then
        tmp = (y / a) + ((-1.0d0) / (z * (a / x)))
    else if (t_2 <= 2d+292) then
        tmp = (x / t_1) - ((y * z) / t_1)
    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 <= -5e-305) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (y / a) + (-1.0 / (z * (a / x)));
	} else if (t_2 <= 2e+292) {
		tmp = (x / t_1) - ((y * z) / t_1);
	} 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 <= -5e-305:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = (y / a) + (-1.0 / (z * (a / x)))
	elif t_2 <= 2e+292:
		tmp = (x / t_1) - ((y * z) / t_1)
	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 <= -5e-305)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(y / a) + Float64(-1.0 / Float64(z * Float64(a / x))));
	elseif (t_2 <= 2e+292)
		tmp = Float64(Float64(x / t_1) - Float64(Float64(y * z) / t_1));
	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 <= -5e-305)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = (y / a) + (-1.0 / (z * (a / x)));
	elseif (t_2 <= 2e+292)
		tmp = (x / t_1) - ((y * z) / t_1);
	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, -5e-305], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(y / a), $MachinePrecision] + N[(-1.0 / N[(z * N[(a / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+292], N[(N[(x / t$95$1), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], 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 -5 \cdot 10^{-305}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{y}{a} + \frac{-1}{z \cdot \frac{a}{x}}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{x}{t\_1} - \frac{y \cdot z}{t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -4.99999999999999985e-305

    1. Initial program 96.7%

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

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

    1. Initial program 52.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}\right)} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z} \]
      2. associate--l+65.7%

        \[\leadsto \color{blue}{\frac{y}{a} + \left(-1 \cdot \frac{x}{a \cdot z} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right)} \]
      3. associate-/r*81.0%

        \[\leadsto \frac{y}{a} + \left(-1 \cdot \color{blue}{\frac{\frac{x}{a}}{z}} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right) \]
      4. associate-*r/81.0%

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

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

        \[\leadsto \frac{y}{a} + \left(\frac{-1 \cdot \frac{x}{a}}{z} - \color{blue}{\frac{-1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}}\right) \]
      7. div-sub81.0%

        \[\leadsto \frac{y}{a} + \color{blue}{\frac{-1 \cdot \frac{x}{a} - -1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}} \]
      8. distribute-lft-out--81.0%

        \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \left(\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}\right)}}{z} \]
      9. associate-*r/81.0%

        \[\leadsto \frac{y}{a} + \color{blue}{-1 \cdot \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
      10. mul-1-neg81.0%

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

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
    7. Simplified81.0%

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

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{a}}{z}} \]
    10. Simplified81.2%

      \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{a}}{z}} \]
    11. Step-by-step derivation
      1. clear-num81.2%

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{1}{\frac{z}{\frac{x}{a}}}} \]
      2. inv-pow81.2%

        \[\leadsto \frac{y}{a} - \color{blue}{{\left(\frac{z}{\frac{x}{a}}\right)}^{-1}} \]
      3. div-inv81.3%

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

        \[\leadsto \frac{y}{a} - {\left(z \cdot \color{blue}{\frac{a}{x}}\right)}^{-1} \]
    12. Applied egg-rr81.3%

      \[\leadsto \frac{y}{a} - \color{blue}{{\left(z \cdot \frac{a}{x}\right)}^{-1}} \]
    13. Step-by-step derivation
      1. unpow-181.3%

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

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

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

    1. Initial program 99.7%

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

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

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

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

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

    1. Initial program 35.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 81.6%

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

        \[\leadsto \color{blue}{\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}} \]
      2. mul-1-neg81.6%

        \[\leadsto \frac{y}{a} + \color{blue}{\left(-\frac{x}{a \cdot z}\right)} \]
      3. sub-neg81.6%

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative81.6%

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

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

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

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

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

Alternative 2: 91.7% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\

\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))) < -4.99999999999999985e-305 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < 2e292

    1. Initial program 97.9%

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

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

    1. Initial program 52.6%

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

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

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

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

        \[\leadsto \color{blue}{\left(\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}\right)} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z} \]
      2. associate--l+65.7%

        \[\leadsto \color{blue}{\frac{y}{a} + \left(-1 \cdot \frac{x}{a \cdot z} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right)} \]
      3. associate-/r*81.0%

        \[\leadsto \frac{y}{a} + \left(-1 \cdot \color{blue}{\frac{\frac{x}{a}}{z}} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right) \]
      4. associate-*r/81.0%

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

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

        \[\leadsto \frac{y}{a} + \left(\frac{-1 \cdot \frac{x}{a}}{z} - \color{blue}{\frac{-1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}}\right) \]
      7. div-sub81.0%

        \[\leadsto \frac{y}{a} + \color{blue}{\frac{-1 \cdot \frac{x}{a} - -1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}} \]
      8. distribute-lft-out--81.0%

        \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \left(\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}\right)}}{z} \]
      9. associate-*r/81.0%

        \[\leadsto \frac{y}{a} + \color{blue}{-1 \cdot \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
      10. mul-1-neg81.0%

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

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
    7. Simplified81.0%

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

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{a}}{z}} \]
    10. Simplified81.2%

      \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{a}}{z}} \]
    11. Step-by-step derivation
      1. clear-num81.2%

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{1}{\frac{z}{\frac{x}{a}}}} \]
      2. inv-pow81.2%

        \[\leadsto \frac{y}{a} - \color{blue}{{\left(\frac{z}{\frac{x}{a}}\right)}^{-1}} \]
      3. div-inv81.3%

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

        \[\leadsto \frac{y}{a} - {\left(z \cdot \color{blue}{\frac{a}{x}}\right)}^{-1} \]
    12. Applied egg-rr81.3%

      \[\leadsto \frac{y}{a} - \color{blue}{{\left(z \cdot \frac{a}{x}\right)}^{-1}} \]
    13. Step-by-step derivation
      1. unpow-181.3%

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

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

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

    1. Initial program 35.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 81.6%

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

        \[\leadsto \color{blue}{\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}} \]
      2. mul-1-neg81.6%

        \[\leadsto \frac{y}{a} + \color{blue}{\left(-\frac{x}{a \cdot z}\right)} \]
      3. sub-neg81.6%

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative81.6%

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

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

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

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

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

Alternative 3: 69.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.65 \cdot 10^{+253}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+190}:\\ \;\;\;\;\frac{y}{\frac{t - z \cdot a}{-z}}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{x}{t} - \frac{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 -1.65e+253)
     t_1
     (if (<= z -1.05e+190)
       (/ y (/ (- t (* z a)) (- z)))
       (if (<= z -2.65e+85)
         t_1
         (if (<= z -1.05e+55)
           (/ (- x (* y z)) t)
           (if (<= z -1.25e-71)
             (- (/ y a) (/ (/ x a) z))
             (if (<= z 2.2e+60) (- (/ x t) (/ (* 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 <= -1.65e+253) {
		tmp = t_1;
	} else if (z <= -1.05e+190) {
		tmp = y / ((t - (z * a)) / -z);
	} else if (z <= -2.65e+85) {
		tmp = t_1;
	} else if (z <= -1.05e+55) {
		tmp = (x - (y * z)) / t;
	} else if (z <= -1.25e-71) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 2.2e+60) {
		tmp = (x / t) - ((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 <= (-1.65d+253)) then
        tmp = t_1
    else if (z <= (-1.05d+190)) then
        tmp = y / ((t - (z * a)) / -z)
    else if (z <= (-2.65d+85)) then
        tmp = t_1
    else if (z <= (-1.05d+55)) then
        tmp = (x - (y * z)) / t
    else if (z <= (-1.25d-71)) then
        tmp = (y / a) - ((x / a) / z)
    else if (z <= 2.2d+60) then
        tmp = (x / t) - ((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 <= -1.65e+253) {
		tmp = t_1;
	} else if (z <= -1.05e+190) {
		tmp = y / ((t - (z * a)) / -z);
	} else if (z <= -2.65e+85) {
		tmp = t_1;
	} else if (z <= -1.05e+55) {
		tmp = (x - (y * z)) / t;
	} else if (z <= -1.25e-71) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 2.2e+60) {
		tmp = (x / t) - ((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 <= -1.65e+253:
		tmp = t_1
	elif z <= -1.05e+190:
		tmp = y / ((t - (z * a)) / -z)
	elif z <= -2.65e+85:
		tmp = t_1
	elif z <= -1.05e+55:
		tmp = (x - (y * z)) / t
	elif z <= -1.25e-71:
		tmp = (y / a) - ((x / a) / z)
	elif z <= 2.2e+60:
		tmp = (x / t) - ((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 <= -1.65e+253)
		tmp = t_1;
	elseif (z <= -1.05e+190)
		tmp = Float64(y / Float64(Float64(t - Float64(z * a)) / Float64(-z)));
	elseif (z <= -2.65e+85)
		tmp = t_1;
	elseif (z <= -1.05e+55)
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	elseif (z <= -1.25e-71)
		tmp = Float64(Float64(y / a) - Float64(Float64(x / a) / z));
	elseif (z <= 2.2e+60)
		tmp = Float64(Float64(x / t) - Float64(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 <= -1.65e+253)
		tmp = t_1;
	elseif (z <= -1.05e+190)
		tmp = y / ((t - (z * a)) / -z);
	elseif (z <= -2.65e+85)
		tmp = t_1;
	elseif (z <= -1.05e+55)
		tmp = (x - (y * z)) / t;
	elseif (z <= -1.25e-71)
		tmp = (y / a) - ((x / a) / z);
	elseif (z <= 2.2e+60)
		tmp = (x / t) - ((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, -1.65e+253], t$95$1, If[LessEqual[z, -1.05e+190], N[(y / N[(N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -2.65e+85], t$95$1, If[LessEqual[z, -1.05e+55], N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision], If[LessEqual[z, -1.25e-71], N[(N[(y / a), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.2e+60], N[(N[(x / t), $MachinePrecision] - N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

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

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

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

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if z < -1.65e253 or -1.05e190 < z < -2.65e85 or 2.19999999999999996e60 < z

    1. Initial program 66.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 82.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative82.2%

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{z}}{a}} \]
      6. div-sub86.2%

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

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

    if -1.65e253 < z < -1.05e190

    1. Initial program 74.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a \cdot z}{-z}}} \]
      5. *-commutative86.1%

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

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

    if -2.65e85 < z < -1.05e55

    1. Initial program 86.3%

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

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

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

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

    if -1.05e55 < z < -1.24999999999999999e-71

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{x}{a \cdot z} + \frac{y}{a}\right) - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. +-commutative52.4%

        \[\leadsto \color{blue}{\left(\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}\right)} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z} \]
      2. associate--l+52.4%

        \[\leadsto \color{blue}{\frac{y}{a} + \left(-1 \cdot \frac{x}{a \cdot z} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right)} \]
      3. associate-/r*52.5%

        \[\leadsto \frac{y}{a} + \left(-1 \cdot \color{blue}{\frac{\frac{x}{a}}{z}} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right) \]
      4. associate-*r/52.5%

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

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

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

        \[\leadsto \frac{y}{a} + \color{blue}{\frac{-1 \cdot \frac{x}{a} - -1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}} \]
      8. distribute-lft-out--52.5%

        \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \left(\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}\right)}}{z} \]
      9. associate-*r/52.5%

        \[\leadsto \frac{y}{a} + \color{blue}{-1 \cdot \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
      10. mul-1-neg52.5%

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

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

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

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

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

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

    if -1.24999999999999999e-71 < z < 2.19999999999999996e60

    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 99.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in a around 0 77.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.65 \cdot 10^{+253}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+190}:\\ \;\;\;\;\frac{y}{\frac{t - z \cdot a}{-z}}\\ \mathbf{elif}\;z \leq -2.65 \cdot 10^{+85}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -1.05 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{+60}:\\ \;\;\;\;\frac{x}{t} - \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 69.2% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ t_2 := \frac{x - y \cdot z}{t}\\ \mathbf{if}\;z \leq -5.7 \cdot 10^{+253}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+187}:\\ \;\;\;\;\frac{y}{\frac{t - z \cdot a}{-z}}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+85}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{+54}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+55}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y (/ x z)) a)) (t_2 (/ (- x (* y z)) t)))
   (if (<= z -5.7e+253)
     t_1
     (if (<= z -5e+187)
       (/ y (/ (- t (* z a)) (- z)))
       (if (<= z -3.05e+85)
         t_1
         (if (<= z -9.6e+54)
           t_2
           (if (<= z -1.25e-71)
             (- (/ y a) (/ (/ x a) z))
             (if (<= z 2.3e+55) t_2 t_1))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - (x / z)) / a;
	double t_2 = (x - (y * z)) / t;
	double tmp;
	if (z <= -5.7e+253) {
		tmp = t_1;
	} else if (z <= -5e+187) {
		tmp = y / ((t - (z * a)) / -z);
	} else if (z <= -3.05e+85) {
		tmp = t_1;
	} else if (z <= -9.6e+54) {
		tmp = t_2;
	} else if (z <= -1.25e-71) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 2.3e+55) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (y - (x / z)) / a
    t_2 = (x - (y * z)) / t
    if (z <= (-5.7d+253)) then
        tmp = t_1
    else if (z <= (-5d+187)) then
        tmp = y / ((t - (z * a)) / -z)
    else if (z <= (-3.05d+85)) then
        tmp = t_1
    else if (z <= (-9.6d+54)) then
        tmp = t_2
    else if (z <= (-1.25d-71)) then
        tmp = (y / a) - ((x / a) / z)
    else if (z <= 2.3d+55) then
        tmp = t_2
    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 t_2 = (x - (y * z)) / t;
	double tmp;
	if (z <= -5.7e+253) {
		tmp = t_1;
	} else if (z <= -5e+187) {
		tmp = y / ((t - (z * a)) / -z);
	} else if (z <= -3.05e+85) {
		tmp = t_1;
	} else if (z <= -9.6e+54) {
		tmp = t_2;
	} else if (z <= -1.25e-71) {
		tmp = (y / a) - ((x / a) / z);
	} else if (z <= 2.3e+55) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	t_2 = (x - (y * z)) / t
	tmp = 0
	if z <= -5.7e+253:
		tmp = t_1
	elif z <= -5e+187:
		tmp = y / ((t - (z * a)) / -z)
	elif z <= -3.05e+85:
		tmp = t_1
	elif z <= -9.6e+54:
		tmp = t_2
	elif z <= -1.25e-71:
		tmp = (y / a) - ((x / a) / z)
	elif z <= 2.3e+55:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - Float64(x / z)) / a)
	t_2 = Float64(Float64(x - Float64(y * z)) / t)
	tmp = 0.0
	if (z <= -5.7e+253)
		tmp = t_1;
	elseif (z <= -5e+187)
		tmp = Float64(y / Float64(Float64(t - Float64(z * a)) / Float64(-z)));
	elseif (z <= -3.05e+85)
		tmp = t_1;
	elseif (z <= -9.6e+54)
		tmp = t_2;
	elseif (z <= -1.25e-71)
		tmp = Float64(Float64(y / a) - Float64(Float64(x / a) / z));
	elseif (z <= 2.3e+55)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (y - (x / z)) / a;
	t_2 = (x - (y * z)) / t;
	tmp = 0.0;
	if (z <= -5.7e+253)
		tmp = t_1;
	elseif (z <= -5e+187)
		tmp = y / ((t - (z * a)) / -z);
	elseif (z <= -3.05e+85)
		tmp = t_1;
	elseif (z <= -9.6e+54)
		tmp = t_2;
	elseif (z <= -1.25e-71)
		tmp = (y / a) - ((x / a) / z);
	elseif (z <= 2.3e+55)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[z, -5.7e+253], t$95$1, If[LessEqual[z, -5e+187], N[(y / N[(N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision] / (-z)), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, -3.05e+85], t$95$1, If[LessEqual[z, -9.6e+54], t$95$2, If[LessEqual[z, -1.25e-71], N[(N[(y / a), $MachinePrecision] - N[(N[(x / a), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 2.3e+55], t$95$2, t$95$1]]]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;z \leq -9.6 \cdot 10^{+54}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\

\mathbf{elif}\;z \leq 2.3 \cdot 10^{+55}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -5.70000000000000016e253 or -5.0000000000000001e187 < z < -3.04999999999999991e85 or 2.29999999999999987e55 < z

    1. Initial program 66.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 82.2%

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

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

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

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative82.2%

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{z}}{a}} \]
      6. div-sub86.2%

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

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

    if -5.70000000000000016e253 < z < -5.0000000000000001e187

    1. Initial program 74.0%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t - a \cdot z}{-z}}} \]
      5. *-commutative86.1%

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

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

    if -3.04999999999999991e85 < z < -9.59999999999999993e54 or -1.24999999999999999e-71 < z < 2.29999999999999987e55

    1. Initial program 99.1%

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

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

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

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

    if -9.59999999999999993e54 < z < -1.24999999999999999e-71

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{x}{a \cdot z} + \frac{y}{a}\right) - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. +-commutative52.4%

        \[\leadsto \color{blue}{\left(\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}\right)} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z} \]
      2. associate--l+52.4%

        \[\leadsto \color{blue}{\frac{y}{a} + \left(-1 \cdot \frac{x}{a \cdot z} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right)} \]
      3. associate-/r*52.5%

        \[\leadsto \frac{y}{a} + \left(-1 \cdot \color{blue}{\frac{\frac{x}{a}}{z}} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right) \]
      4. associate-*r/52.5%

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

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

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

        \[\leadsto \frac{y}{a} + \color{blue}{\frac{-1 \cdot \frac{x}{a} - -1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}} \]
      8. distribute-lft-out--52.5%

        \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \left(\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}\right)}}{z} \]
      9. associate-*r/52.5%

        \[\leadsto \frac{y}{a} + \color{blue}{-1 \cdot \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
      10. mul-1-neg52.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.7 \cdot 10^{+253}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -5 \cdot 10^{+187}:\\ \;\;\;\;\frac{y}{\frac{t - z \cdot a}{-z}}\\ \mathbf{elif}\;z \leq -3.05 \cdot 10^{+85}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -9.6 \cdot 10^{+54}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq -1.25 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 2.3 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 70.4% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.85 \cdot 10^{+85} \lor \neg \left(z \leq -1.16 \cdot 10^{+55} \lor \neg \left(z \leq -7.5 \cdot 10^{-72}\right) \land z \leq 2.8 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8500000000000001e85 or -1.1599999999999999e55 < z < -7.5000000000000004e-72 or 2.8000000000000001e55 < z

    1. Initial program 74.7%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 73.8%

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

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

        \[\leadsto \frac{y}{a} + \color{blue}{\left(-\frac{x}{a \cdot z}\right)} \]
      3. sub-neg73.8%

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative73.8%

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{z}}{a}} \]
      6. div-sub77.3%

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

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

    if -2.8500000000000001e85 < z < -1.1599999999999999e55 or -7.5000000000000004e-72 < z < 2.8000000000000001e55

    1. Initial program 99.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.85 \cdot 10^{+85} \lor \neg \left(z \leq -1.16 \cdot 10^{+55} \lor \neg \left(z \leq -7.5 \cdot 10^{-72}\right) \land z \leq 2.8 \cdot 10^{+55}\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 70.3% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;z \leq -9.2 \cdot 10^{-72}:\\
\;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\

\mathbf{elif}\;z \leq 1.3 \cdot 10^{+59}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.60000000000000011e85 or 1.3e59 < z

    1. Initial program 67.1%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Taylor expanded in t around 0 75.6%

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

        \[\leadsto \color{blue}{\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}} \]
      2. mul-1-neg75.6%

        \[\leadsto \frac{y}{a} + \color{blue}{\left(-\frac{x}{a \cdot z}\right)} \]
      3. sub-neg75.6%

        \[\leadsto \color{blue}{\frac{y}{a} - \frac{x}{a \cdot z}} \]
      4. *-commutative75.6%

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

        \[\leadsto \frac{y}{a} - \color{blue}{\frac{\frac{x}{z}}{a}} \]
      6. div-sub80.2%

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

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

    if -2.60000000000000011e85 < z < -1.1599999999999999e55 or -9.19999999999999978e-72 < z < 1.3e59

    1. Initial program 99.1%

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

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

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

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

    if -1.1599999999999999e55 < z < -9.19999999999999978e-72

    1. Initial program 99.5%

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

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

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

      \[\leadsto \color{blue}{\left(-1 \cdot \frac{x}{a \cdot z} + \frac{y}{a}\right) - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}} \]
    6. Step-by-step derivation
      1. +-commutative52.4%

        \[\leadsto \color{blue}{\left(\frac{y}{a} + -1 \cdot \frac{x}{a \cdot z}\right)} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z} \]
      2. associate--l+52.4%

        \[\leadsto \color{blue}{\frac{y}{a} + \left(-1 \cdot \frac{x}{a \cdot z} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right)} \]
      3. associate-/r*52.5%

        \[\leadsto \frac{y}{a} + \left(-1 \cdot \color{blue}{\frac{\frac{x}{a}}{z}} - -1 \cdot \frac{t \cdot y}{{a}^{2} \cdot z}\right) \]
      4. associate-*r/52.5%

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

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

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

        \[\leadsto \frac{y}{a} + \color{blue}{\frac{-1 \cdot \frac{x}{a} - -1 \cdot \frac{t \cdot y}{{a}^{2}}}{z}} \]
      8. distribute-lft-out--52.5%

        \[\leadsto \frac{y}{a} + \frac{\color{blue}{-1 \cdot \left(\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}\right)}}{z} \]
      9. associate-*r/52.5%

        \[\leadsto \frac{y}{a} + \color{blue}{-1 \cdot \frac{\frac{x}{a} - \frac{t \cdot y}{{a}^{2}}}{z}} \]
      10. mul-1-neg52.5%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+85}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -1.16 \cdot 10^{+55}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;z \leq -9.2 \cdot 10^{-72}:\\ \;\;\;\;\frac{y}{a} - \frac{\frac{x}{a}}{z}\\ \mathbf{elif}\;z \leq 1.3 \cdot 10^{+59}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 52.9% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.2e-71 or 2.6499999999999998e66 < z

    1. Initial program 74.9%

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

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

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

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

    if -1.2e-71 < z < 1.95000000000000009e-205 or 2.2000000000000001e-166 < z < 2.6499999999999998e66

    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 63.1%

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

    if 1.95000000000000009e-205 < z < 2.2000000000000001e-166

    1. Initial program 100.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{0 - \color{blue}{\left(x + \left(-y \cdot z\right)\right)}}{a \cdot z} \]
      5. distribute-rgt-neg-out78.3%

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

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

        \[\leadsto \frac{\color{blue}{\left(0 - y \cdot \left(-z\right)\right) - x}}{a \cdot z} \]
      8. neg-sub078.3%

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

        \[\leadsto \frac{\left(-\color{blue}{\left(-y \cdot z\right)}\right) - x}{a \cdot z} \]
      10. remove-double-neg78.3%

        \[\leadsto \frac{\color{blue}{y \cdot z} - x}{a \cdot z} \]
      11. *-commutative78.3%

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

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

      \[\leadsto \frac{\color{blue}{-1 \cdot x}}{z \cdot a} \]
    9. Step-by-step derivation
      1. neg-mul-167.7%

        \[\leadsto \frac{\color{blue}{-x}}{z \cdot a} \]
    10. Simplified67.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{-71}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 1.95 \cdot 10^{-205}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 2.2 \cdot 10^{-166}:\\ \;\;\;\;\frac{-x}{z \cdot a}\\ \mathbf{elif}\;z \leq 2.65 \cdot 10^{+66}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 60.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+163}:\\
\;\;\;\;\frac{y}{a}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.99999999999999976e163 or 2.19999999999999992e160 < y

    1. Initial program 69.5%

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

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

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

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

    if -8.99999999999999976e163 < y < 6.0000000000000002e-84

    1. Initial program 94.0%

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

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

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

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

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

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

    if 6.0000000000000002e-84 < y < 2.19999999999999992e160

    1. Initial program 89.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+163}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-84}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{elif}\;y \leq 2.2 \cdot 10^{+160}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+159} \lor \neg \left(y \leq 10^{+125}\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 y < -1.14999999999999998e159 or 9.9999999999999992e124 < y

    1. Initial program 70.6%

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

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

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

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

    if -1.14999999999999998e159 < y < 9.9999999999999992e124

    1. Initial program 93.9%

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

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

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

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

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

      \[\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}\;y \leq -1.15 \cdot 10^{+159} \lor \neg \left(y \leq 10^{+125}\right):\\ \;\;\;\;\frac{y}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -7.2 \cdot 10^{-72} \lor \neg \left(z \leq 5.3 \cdot 10^{+66}\right):\\
\;\;\;\;\frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -7.2e-72 or 5.2999999999999997e66 < z

    1. Initial program 74.9%

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

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

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

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

    if -7.2e-72 < z < 5.2999999999999997e66

    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 60.1%

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

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

Alternative 11: 35.6% 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. Add Preprocessing
  5. Taylor expanded in z around 0 37.3%

    \[\leadsto \color{blue}{\frac{x}{t}} \]
  6. Final simplification37.3%

    \[\leadsto \frac{x}{t} \]
  7. Add Preprocessing

Developer target: 97.4% 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 2024031 
(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))))