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

Percentage Accurate: 84.1% → 90.1%
Time: 13.3s
Alternatives: 14
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 84.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: 90.1% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
t_1 := t - a \cdot z\\
\mathbf{if}\;a \leq -4.2 \cdot 10^{+213} \lor \neg \left(a \leq 1.15 \cdot 10^{+214}\right):\\
\;\;\;\;\frac{y}{a} + \frac{\frac{y}{\frac{{a}^{2}}{t}} - \frac{x}{a}}{z}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-1, \frac{y}{\frac{t\_1}{z}}, \frac{x}{t\_1}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -4.2000000000000001e213 or 1.15e214 < a

    1. Initial program 45.8%

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

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

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

      \[\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. +-commutative67.2%

        \[\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+67.2%

        \[\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*76.8%

        \[\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/76.8%

        \[\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*76.8%

        \[\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/76.8%

        \[\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-sub76.8%

        \[\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--76.8%

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

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

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

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

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

    if -4.2000000000000001e213 < a < 1.15e214

    1. Initial program 90.4%

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

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

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

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

        \[\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*94.7%

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

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

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

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

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

Alternative 2: 86.3% accurate, 0.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+213} \lor \neg \left(a \leq 9.5 \cdot 10^{+211}\right):\\
\;\;\;\;\frac{y}{a} + \frac{\frac{y}{\frac{{a}^{2}}{t}} - \frac{x}{a}}{z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.79999999999999983e213 or 9.4999999999999997e211 < a

    1. Initial program 45.8%

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

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

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

      \[\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. +-commutative67.2%

        \[\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+67.2%

        \[\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*76.8%

        \[\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/76.8%

        \[\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*76.8%

        \[\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/76.8%

        \[\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-sub76.8%

        \[\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--76.8%

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

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

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

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

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

    if -6.79999999999999983e213 < a < 9.4999999999999997e211

    1. Initial program 90.4%

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

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

Alternative 3: 71.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{t} - z \cdot \frac{y}{t}\\ t_2 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.2 \cdot 10^{+74}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-108}:\\ \;\;\;\;\frac{x}{t - a \cdot z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.00064 \lor \neg \left(z \leq 1.8 \cdot 10^{+44}\right):\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- (/ x t) (* z (/ y t)))) (t_2 (/ (- y (/ x z)) a)))
   (if (<= z -1.2e+74)
     t_2
     (if (<= z -7e-166)
       t_1
       (if (<= z 7e-108)
         (/ x (- t (* a z)))
         (if (<= z 7.5e-16)
           t_1
           (if (or (<= z 0.00064) (not (<= z 1.8e+44)))
             t_2
             (/ (- x (* y z)) t))))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x / t) - (z * (y / t));
	double t_2 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.2e+74) {
		tmp = t_2;
	} else if (z <= -7e-166) {
		tmp = t_1;
	} else if (z <= 7e-108) {
		tmp = x / (t - (a * z));
	} else if (z <= 7.5e-16) {
		tmp = t_1;
	} else if ((z <= 0.00064) || !(z <= 1.8e+44)) {
		tmp = t_2;
	} 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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (x / t) - (z * (y / t))
    t_2 = (y - (x / z)) / a
    if (z <= (-1.2d+74)) then
        tmp = t_2
    else if (z <= (-7d-166)) then
        tmp = t_1
    else if (z <= 7d-108) then
        tmp = x / (t - (a * z))
    else if (z <= 7.5d-16) then
        tmp = t_1
    else if ((z <= 0.00064d0) .or. (.not. (z <= 1.8d+44))) then
        tmp = t_2
    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 t_1 = (x / t) - (z * (y / t));
	double t_2 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.2e+74) {
		tmp = t_2;
	} else if (z <= -7e-166) {
		tmp = t_1;
	} else if (z <= 7e-108) {
		tmp = x / (t - (a * z));
	} else if (z <= 7.5e-16) {
		tmp = t_1;
	} else if ((z <= 0.00064) || !(z <= 1.8e+44)) {
		tmp = t_2;
	} else {
		tmp = (x - (y * z)) / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x / t) - (z * (y / t))
	t_2 = (y - (x / z)) / a
	tmp = 0
	if z <= -1.2e+74:
		tmp = t_2
	elif z <= -7e-166:
		tmp = t_1
	elif z <= 7e-108:
		tmp = x / (t - (a * z))
	elif z <= 7.5e-16:
		tmp = t_1
	elif (z <= 0.00064) or not (z <= 1.8e+44):
		tmp = t_2
	else:
		tmp = (x - (y * z)) / t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x / t) - Float64(z * Float64(y / t)))
	t_2 = Float64(Float64(y - Float64(x / z)) / a)
	tmp = 0.0
	if (z <= -1.2e+74)
		tmp = t_2;
	elseif (z <= -7e-166)
		tmp = t_1;
	elseif (z <= 7e-108)
		tmp = Float64(x / Float64(t - Float64(a * z)));
	elseif (z <= 7.5e-16)
		tmp = t_1;
	elseif ((z <= 0.00064) || !(z <= 1.8e+44))
		tmp = t_2;
	else
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x / t) - (z * (y / t));
	t_2 = (y - (x / z)) / a;
	tmp = 0.0;
	if (z <= -1.2e+74)
		tmp = t_2;
	elseif (z <= -7e-166)
		tmp = t_1;
	elseif (z <= 7e-108)
		tmp = x / (t - (a * z));
	elseif (z <= 7.5e-16)
		tmp = t_1;
	elseif ((z <= 0.00064) || ~((z <= 1.8e+44)))
		tmp = t_2;
	else
		tmp = (x - (y * z)) / t;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x / t), $MachinePrecision] - N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[z, -1.2e+74], t$95$2, If[LessEqual[z, -7e-166], t$95$1, If[LessEqual[z, 7e-108], N[(x / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 7.5e-16], t$95$1, If[Or[LessEqual[z, 0.00064], N[Not[LessEqual[z, 1.8e+44]], $MachinePrecision]], t$95$2, N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;z \leq -7 \cdot 10^{-166}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;z \leq 7.5 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 0.00064 \lor \neg \left(z \leq 1.8 \cdot 10^{+44}\right):\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.20000000000000004e74 or 7.5e-16 < z < 6.40000000000000052e-4 or 1.8e44 < z

    1. Initial program 70.5%

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

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

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

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

        \[\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*79.6%

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

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

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

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

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

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

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

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

    if -1.20000000000000004e74 < z < -6.9999999999999998e-166 or 6.9999999999999997e-108 < z < 7.5e-16

    1. Initial program 91.7%

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. div-sub70.4%

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

        \[\leadsto \frac{x}{t} - \frac{\color{blue}{z \cdot y}}{t} \]
      3. associate-/l*75.1%

        \[\leadsto \frac{x}{t} - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    7. Applied egg-rr75.1%

      \[\leadsto \color{blue}{\frac{x}{t} - \frac{z}{\frac{t}{y}}} \]
    8. Step-by-step derivation
      1. clear-num75.0%

        \[\leadsto \frac{x}{t} - \color{blue}{\frac{1}{\frac{\frac{t}{y}}{z}}} \]
      2. associate-/r/75.0%

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

        \[\leadsto \frac{x}{t} - \color{blue}{\frac{y}{t}} \cdot z \]
    9. Applied egg-rr75.1%

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

    if -6.9999999999999998e-166 < z < 6.9999999999999997e-108

    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. Add Preprocessing
    5. Taylor expanded in x around inf 87.0%

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

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

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

    if 6.40000000000000052e-4 < z < 1.8e44

    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. Add Preprocessing
    5. Taylor expanded in t around inf 69.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.2 \cdot 10^{+74}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq -7 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{t} - z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 7 \cdot 10^{-108}:\\ \;\;\;\;\frac{x}{t - a \cdot z}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{t} - z \cdot \frac{y}{t}\\ \mathbf{elif}\;z \leq 0.00064 \lor \neg \left(z \leq 1.8 \cdot 10^{+44}\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 71.1% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.25 \cdot 10^{+74} \lor \neg \left(z \leq 1.45 \cdot 10^{-13}\right) \land \left(z \leq 5.9 \cdot 10^{-5} \lor \neg \left(z \leq 1.3 \cdot 10^{+44}\right)\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 -1.25e+74)
         (and (not (<= z 1.45e-13)) (or (<= z 5.9e-5) (not (<= z 1.3e+44)))))
   (/ (- y (/ x z)) a)
   (/ (- x (* y z)) t)))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.25e+74) || (!(z <= 1.45e-13) && ((z <= 5.9e-5) || !(z <= 1.3e+44)))) {
		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 <= (-1.25d+74)) .or. (.not. (z <= 1.45d-13)) .and. (z <= 5.9d-5) .or. (.not. (z <= 1.3d+44))) 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 <= -1.25e+74) || (!(z <= 1.45e-13) && ((z <= 5.9e-5) || !(z <= 1.3e+44)))) {
		tmp = (y - (x / z)) / a;
	} else {
		tmp = (x - (y * z)) / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	tmp = 0
	if (z <= -1.25e+74) or (not (z <= 1.45e-13) and ((z <= 5.9e-5) or not (z <= 1.3e+44))):
		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 <= -1.25e+74) || (!(z <= 1.45e-13) && ((z <= 5.9e-5) || !(z <= 1.3e+44))))
		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 <= -1.25e+74) || (~((z <= 1.45e-13)) && ((z <= 5.9e-5) || ~((z <= 1.3e+44)))))
		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, -1.25e+74], And[N[Not[LessEqual[z, 1.45e-13]], $MachinePrecision], Or[LessEqual[z, 5.9e-5], N[Not[LessEqual[z, 1.3e+44]], $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 -1.25 \cdot 10^{+74} \lor \neg \left(z \leq 1.45 \cdot 10^{-13}\right) \land \left(z \leq 5.9 \cdot 10^{-5} \lor \neg \left(z \leq 1.3 \cdot 10^{+44}\right)\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 < -1.24999999999999991e74 or 1.4499999999999999e-13 < z < 5.8999999999999998e-5 or 1.3e44 < z

    1. Initial program 70.5%

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

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

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

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

        \[\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*79.6%

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

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

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

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

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

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

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

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

    if -1.24999999999999991e74 < z < 1.4499999999999999e-13 or 5.8999999999999998e-5 < z < 1.3e44

    1. Initial program 96.4%

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

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

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

      \[\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 -1.25 \cdot 10^{+74} \lor \neg \left(z \leq 1.45 \cdot 10^{-13}\right) \land \left(z \leq 5.9 \cdot 10^{-5} \lor \neg \left(z \leq 1.3 \cdot 10^{+44}\right)\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 69.5% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.06 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 0.000112 \lor \neg \left(z \leq 7.8 \cdot 10^{+43}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- y (/ x z)) a)))
   (if (<= z -1.06e+74)
     t_1
     (if (<= z 8.5e-14)
       (- (/ x t) (/ z (/ t y)))
       (if (or (<= z 0.000112) (not (<= z 7.8e+43)))
         t_1
         (/ (- x (* y z)) t))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.06e+74) {
		tmp = t_1;
	} else if (z <= 8.5e-14) {
		tmp = (x / t) - (z / (t / y));
	} else if ((z <= 0.000112) || !(z <= 7.8e+43)) {
		tmp = t_1;
	} 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) :: t_1
    real(8) :: tmp
    t_1 = (y - (x / z)) / a
    if (z <= (-1.06d+74)) then
        tmp = t_1
    else if (z <= 8.5d-14) then
        tmp = (x / t) - (z / (t / y))
    else if ((z <= 0.000112d0) .or. (.not. (z <= 7.8d+43))) then
        tmp = t_1
    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 t_1 = (y - (x / z)) / a;
	double tmp;
	if (z <= -1.06e+74) {
		tmp = t_1;
	} else if (z <= 8.5e-14) {
		tmp = (x / t) - (z / (t / y));
	} else if ((z <= 0.000112) || !(z <= 7.8e+43)) {
		tmp = t_1;
	} else {
		tmp = (x - (y * z)) / t;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	tmp = 0
	if z <= -1.06e+74:
		tmp = t_1
	elif z <= 8.5e-14:
		tmp = (x / t) - (z / (t / y))
	elif (z <= 0.000112) or not (z <= 7.8e+43):
		tmp = t_1
	else:
		tmp = (x - (y * z)) / t
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(y - Float64(x / z)) / a)
	tmp = 0.0
	if (z <= -1.06e+74)
		tmp = t_1;
	elseif (z <= 8.5e-14)
		tmp = Float64(Float64(x / t) - Float64(z / Float64(t / y)));
	elseif ((z <= 0.000112) || !(z <= 7.8e+43))
		tmp = t_1;
	else
		tmp = Float64(Float64(x - Float64(y * z)) / t);
	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.06e+74)
		tmp = t_1;
	elseif (z <= 8.5e-14)
		tmp = (x / t) - (z / (t / y));
	elseif ((z <= 0.000112) || ~((z <= 7.8e+43)))
		tmp = t_1;
	else
		tmp = (x - (y * z)) / t;
	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.06e+74], t$95$1, If[LessEqual[z, 8.5e-14], N[(N[(x / t), $MachinePrecision] - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[z, 0.000112], N[Not[LessEqual[z, 7.8e+43]], $MachinePrecision]], t$95$1, N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 0.000112 \lor \neg \left(z \leq 7.8 \cdot 10^{+43}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.05999999999999999e74 or 8.50000000000000038e-14 < z < 1.11999999999999998e-4 or 7.8000000000000001e43 < z

    1. Initial program 70.5%

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

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

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

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

        \[\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*79.6%

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

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

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

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

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

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

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

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

    if -1.05999999999999999e74 < z < 8.50000000000000038e-14

    1. Initial program 96.0%

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. div-sub78.0%

        \[\leadsto \color{blue}{\frac{x}{t} - \frac{y \cdot z}{t}} \]
      2. *-commutative78.0%

        \[\leadsto \frac{x}{t} - \frac{\color{blue}{z \cdot y}}{t} \]
      3. associate-/l*78.7%

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

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

    if 1.11999999999999998e-4 < z < 7.8000000000000001e43

    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. Add Preprocessing
    5. Taylor expanded in t around inf 69.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.06 \cdot 10^{+74}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 0.000112 \lor \neg \left(z \leq 7.8 \cdot 10^{+43}\right):\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 69.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+44}:\\ \;\;\;\;z \cdot \frac{-y}{t - a \cdot z}\\ \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.3e+74)
     t_1
     (if (<= z 8.5e-24)
       (- (/ x t) (/ z (/ t y)))
       (if (<= z 1.4e+44) (* z (/ (- y) (- t (* a z)))) 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.3e+74) {
		tmp = t_1;
	} else if (z <= 8.5e-24) {
		tmp = (x / t) - (z / (t / y));
	} else if (z <= 1.4e+44) {
		tmp = z * (-y / (t - (a * z)));
	} 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.3d+74)) then
        tmp = t_1
    else if (z <= 8.5d-24) then
        tmp = (x / t) - (z / (t / y))
    else if (z <= 1.4d+44) then
        tmp = z * (-y / (t - (a * z)))
    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.3e+74) {
		tmp = t_1;
	} else if (z <= 8.5e-24) {
		tmp = (x / t) - (z / (t / y));
	} else if (z <= 1.4e+44) {
		tmp = z * (-y / (t - (a * z)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	tmp = 0
	if z <= -1.3e+74:
		tmp = t_1
	elif z <= 8.5e-24:
		tmp = (x / t) - (z / (t / y))
	elif z <= 1.4e+44:
		tmp = z * (-y / (t - (a * z)))
	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.3e+74)
		tmp = t_1;
	elseif (z <= 8.5e-24)
		tmp = Float64(Float64(x / t) - Float64(z / Float64(t / y)));
	elseif (z <= 1.4e+44)
		tmp = Float64(z * Float64(Float64(-y) / Float64(t - Float64(a * z))));
	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.3e+74)
		tmp = t_1;
	elseif (z <= 8.5e-24)
		tmp = (x / t) - (z / (t / y));
	elseif (z <= 1.4e+44)
		tmp = z * (-y / (t - (a * z)));
	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.3e+74], t$95$1, If[LessEqual[z, 8.5e-24], N[(N[(x / t), $MachinePrecision] - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.4e+44], N[(z * N[((-y) / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.3e74 or 1.4e44 < z

    1. Initial program 68.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. fma-def68.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*78.5%

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

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

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

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

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

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

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

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

    if -1.3e74 < z < 8.5000000000000002e-24

    1. Initial program 96.0%

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. div-sub77.8%

        \[\leadsto \color{blue}{\frac{x}{t} - \frac{y \cdot z}{t}} \]
      2. *-commutative77.8%

        \[\leadsto \frac{x}{t} - \frac{\color{blue}{z \cdot y}}{t} \]
      3. associate-/l*78.5%

        \[\leadsto \frac{x}{t} - \color{blue}{\frac{z}{\frac{t}{y}}} \]
    7. Applied egg-rr78.5%

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

    if 8.5000000000000002e-24 < z < 1.4e44

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

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

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

        \[\leadsto -\color{blue}{\frac{y}{\frac{t - a \cdot z}{z}}} \]
      3. associate-/r/85.7%

        \[\leadsto -\color{blue}{\frac{y}{t - a \cdot z} \cdot z} \]
      4. sub-neg85.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.3 \cdot 10^{+74}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-24}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{+44}:\\ \;\;\;\;z \cdot \frac{-y}{t - a \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 69.6% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y - \frac{x}{z}}{a}\\ \mathbf{if}\;z \leq -1.1 \cdot 10^{+74}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+44}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{t - a \cdot z}\\ \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.1e+74)
     t_1
     (if (<= z 7.5e-15)
       (- (/ x t) (/ z (/ t y)))
       (if (<= z 1.45e+44) (/ (* y (- z)) (- t (* a z))) 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.1e+74) {
		tmp = t_1;
	} else if (z <= 7.5e-15) {
		tmp = (x / t) - (z / (t / y));
	} else if (z <= 1.45e+44) {
		tmp = (y * -z) / (t - (a * z));
	} 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.1d+74)) then
        tmp = t_1
    else if (z <= 7.5d-15) then
        tmp = (x / t) - (z / (t / y))
    else if (z <= 1.45d+44) then
        tmp = (y * -z) / (t - (a * z))
    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.1e+74) {
		tmp = t_1;
	} else if (z <= 7.5e-15) {
		tmp = (x / t) - (z / (t / y));
	} else if (z <= 1.45e+44) {
		tmp = (y * -z) / (t - (a * z));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (y - (x / z)) / a
	tmp = 0
	if z <= -1.1e+74:
		tmp = t_1
	elif z <= 7.5e-15:
		tmp = (x / t) - (z / (t / y))
	elif z <= 1.45e+44:
		tmp = (y * -z) / (t - (a * z))
	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.1e+74)
		tmp = t_1;
	elseif (z <= 7.5e-15)
		tmp = Float64(Float64(x / t) - Float64(z / Float64(t / y)));
	elseif (z <= 1.45e+44)
		tmp = Float64(Float64(y * Float64(-z)) / Float64(t - Float64(a * z)));
	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.1e+74)
		tmp = t_1;
	elseif (z <= 7.5e-15)
		tmp = (x / t) - (z / (t / y));
	elseif (z <= 1.45e+44)
		tmp = (y * -z) / (t - (a * z));
	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.1e+74], t$95$1, If[LessEqual[z, 7.5e-15], N[(N[(x / t), $MachinePrecision] - N[(z / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[z, 1.45e+44], N[(N[(y * (-z)), $MachinePrecision] / N[(t - N[(a * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;z \leq 1.45 \cdot 10^{+44}:\\
\;\;\;\;\frac{y \cdot \left(-z\right)}{t - a \cdot z}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.1000000000000001e74 or 1.4500000000000001e44 < z

    1. Initial program 68.9%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. fma-def68.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*78.5%

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

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

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

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

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

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

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

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

    if -1.1000000000000001e74 < z < 7.4999999999999996e-15

    1. Initial program 96.0%

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. div-sub78.0%

        \[\leadsto \color{blue}{\frac{x}{t} - \frac{y \cdot z}{t}} \]
      2. *-commutative78.0%

        \[\leadsto \frac{x}{t} - \frac{\color{blue}{z \cdot y}}{t} \]
      3. associate-/l*78.7%

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

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

    if 7.4999999999999996e-15 < z < 1.4500000000000001e44

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

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

        \[\leadsto \frac{\color{blue}{-y \cdot z}}{t - z \cdot a} \]
      2. *-commutative85.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.1 \cdot 10^{+74}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 7.5 \cdot 10^{-15}:\\ \;\;\;\;\frac{x}{t} - \frac{z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+44}:\\ \;\;\;\;\frac{y \cdot \left(-z\right)}{t - a \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 64.4% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.5199999999999999e102 or 1.4000000000000001e-12 < z

    1. Initial program 73.6%

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

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

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

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

    if -1.5199999999999999e102 < z < -5.79999999999999957e37

    1. Initial program 69.9%

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num69.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z \cdot a}{x - y \cdot z}}} \]
      2. associate-/r/69.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999957e37 < z < 1.4000000000000001e-12

    1. Initial program 98.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.52 \cdot 10^{+102}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -5.8 \cdot 10^{+37}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 1.4 \cdot 10^{-12}:\\ \;\;\;\;\frac{x}{t - a \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 90.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.1 \cdot 10^{+118} \lor \neg \left(z \leq 3.5 \cdot 10^{+188}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.09999999999999993e118 or 3.50000000000000008e188 < z

    1. Initial program 60.0%

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t - a \cdot z} + \frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. fma-def60.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*71.1%

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

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

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

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

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

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

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

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

    if -1.09999999999999993e118 < z < 3.50000000000000008e188

    1. Initial program 92.4%

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

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

Alternative 10: 68.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.2 \cdot 10^{-46} \lor \neg \left(a \leq 8.5 \cdot 10^{+132}\right):\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.2000000000000001e-46 or 8.49999999999999969e132 < a

    1. Initial program 71.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.2000000000000001e-46 < a < 8.49999999999999969e132

    1. Initial program 92.2%

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

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. div-sub69.0%

        \[\leadsto \color{blue}{\frac{x}{t} - \frac{y \cdot z}{t}} \]
      2. sub-neg69.0%

        \[\leadsto \color{blue}{\frac{x}{t} + \left(-\frac{y \cdot z}{t}\right)} \]
      3. *-commutative69.0%

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

        \[\leadsto \frac{x}{t} + \left(-\color{blue}{\frac{z}{\frac{t}{y}}}\right) \]
    7. Applied egg-rr70.1%

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

        \[\leadsto \color{blue}{\frac{x}{t} - \frac{z}{\frac{t}{y}}} \]
      2. associate-/r/71.9%

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

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

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

Alternative 11: 54.5% accurate, 0.6× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5e102 or 4.8e-14 < z

    1. Initial program 73.6%

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

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

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

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

    if -5e102 < z < -1.2e19

    1. Initial program 70.9%

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num70.8%

        \[\leadsto \color{blue}{\frac{1}{\frac{t - z \cdot a}{x - y \cdot z}}} \]
      2. associate-/r/70.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e19 < z < 4.8e-14

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5 \cdot 10^{+102}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq -1.2 \cdot 10^{+19}:\\ \;\;\;\;y \cdot \frac{-z}{t}\\ \mathbf{elif}\;z \leq 4.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 64.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.2 \cdot 10^{+102} \lor \neg \left(z \leq 8.2 \cdot 10^{+43}\right):\\
\;\;\;\;\frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.20000000000000003e102 or 8.2000000000000001e43 < z

    1. Initial program 68.4%

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

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

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

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

    if -4.20000000000000003e102 < z < 8.2000000000000001e43

    1. Initial program 94.9%

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

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

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

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

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

Alternative 13: 55.2% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.5e6 or 2.60000000000000004e-15 < z

    1. Initial program 73.4%

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

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

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

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

    if -9.5e6 < z < 2.60000000000000004e-15

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

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

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

Alternative 14: 34.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 84.4%

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

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

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

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

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

Developer target: 97.3% accurate, 0.4× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024027 
(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))))