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

Percentage Accurate: 85.2% → 90.8%
Time: 12.8s
Alternatives: 12
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 12 alternatives:

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

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

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+177} \lor \neg \left(z \leq 4.5 \cdot 10^{+105}\right):\\ \;\;\;\;\frac{-y}{\frac{t}{z} - a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - z \cdot y}{\mathsf{fma}\left(-z, a, t\right)}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (if (or (<= z -1.05e+177) (not (<= z 4.5e+105)))
   (/ (- y) (- (/ t z) a))
   (/ (- x (* z y)) (fma (- z) a t))))
double code(double x, double y, double z, double t, double a) {
	double tmp;
	if ((z <= -1.05e+177) || !(z <= 4.5e+105)) {
		tmp = -y / ((t / z) - a);
	} else {
		tmp = (x - (z * y)) / fma(-z, a, t);
	}
	return tmp;
}
function code(x, y, z, t, a)
	tmp = 0.0
	if ((z <= -1.05e+177) || !(z <= 4.5e+105))
		tmp = Float64(Float64(-y) / Float64(Float64(t / z) - a));
	else
		tmp = Float64(Float64(x - Float64(z * y)) / fma(Float64(-z), a, t));
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := If[Or[LessEqual[z, -1.05e+177], N[Not[LessEqual[z, 4.5e+105]], $MachinePrecision]], N[((-y) / N[(N[(t / z), $MachinePrecision] - a), $MachinePrecision]), $MachinePrecision], N[(N[(x - N[(z * y), $MachinePrecision]), $MachinePrecision] / N[((-z) * a + t), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.05 \cdot 10^{+177} \lor \neg \left(z \leq 4.5 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{-y}{\frac{t}{z} - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.05000000000000006e177 or 4.5000000000000001e105 < z

    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. Step-by-step derivation
      1. clear-num45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-y}{\frac{\color{blue}{t - a \cdot z}}{z}} \]
      6. div-sub58.1%

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

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
      9. /-rgt-identity87.7%

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

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

    if -1.05000000000000006e177 < z < 4.5000000000000001e105

    1. Initial program 94.3%

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Step-by-step derivation
      1. sub-neg94.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.05 \cdot 10^{+177} \lor \neg \left(z \leq 4.5 \cdot 10^{+105}\right):\\ \;\;\;\;\frac{-y}{\frac{t}{z} - a}\\ \mathbf{else}:\\ \;\;\;\;\frac{x - z \cdot y}{\mathsf{fma}\left(-z, a, t\right)}\\ \end{array} \]

Alternative 2: 90.9% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -9 \cdot 10^{+172} \lor \neg \left(z \leq 5 \cdot 10^{+105}\right):\\
\;\;\;\;\frac{-y}{\frac{t}{z} - a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -9.0000000000000004e172 or 5.00000000000000046e105 < z

    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. Step-by-step derivation
      1. clear-num45.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{-y}{\frac{\color{blue}{t - a \cdot z}}{z}} \]
      6. div-sub58.1%

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

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
      9. /-rgt-identity87.7%

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

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

    if -9.0000000000000004e172 < z < 5.00000000000000046e105

    1. Initial program 94.3%

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

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

Alternative 3: 72.3% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.15000000000000003e-76

    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. Taylor expanded in t around 0 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15000000000000003e-76 < z < 2.75e-251

    1. Initial program 99.8%

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

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

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

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

    if 2.75e-251 < z < 2.00000000000000018e25

    1. Initial program 99.9%

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

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

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

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

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

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

    if 2.00000000000000018e25 < z

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t + -1 \cdot \left(a \cdot z\right)}} \]
    7. Step-by-step derivation
      1. mul-1-neg42.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
      9. /-rgt-identity81.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -1.15 \cdot 10^{-76}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 2.75 \cdot 10^{-251}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;z \leq 2 \cdot 10^{+25}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{\frac{t}{z} - a}\\ \end{array} \]

Alternative 4: 72.3% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -3.7999999999999999e-77

    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. Taylor expanded in t around 0 48.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.7999999999999999e-77 < z < 2.79999999999999989e-251

    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. Step-by-step derivation
      1. sub-neg99.8%

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

        \[\leadsto \frac{\color{blue}{\left(-y \cdot z\right) + x}}{t - z \cdot a} \]
      3. distribute-lft-neg-in99.8%

        \[\leadsto \frac{\color{blue}{\left(-y\right) \cdot z} + x}{t - z \cdot a} \]
      4. add-cube-cbrt99.3%

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)} + x}{t - z \cdot a} \]
      5. associate-*r*99.3%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\left(-y\right) \cdot \color{blue}{{\left(\sqrt[3]{z}\right)}^{2}}, \sqrt[3]{z}, x\right)}{t - z \cdot a} \]
    5. Applied egg-rr99.3%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\left(-y\right) \cdot {\left(\sqrt[3]{z}\right)}^{2}, \sqrt[3]{z}, x\right)}}{t - z \cdot a} \]
    6. Step-by-step derivation
      1. fma-udef99.3%

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

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

        \[\leadsto \frac{x + \color{blue}{\left(-y\right) \cdot \left({\left(\sqrt[3]{z}\right)}^{2} \cdot \sqrt[3]{z}\right)}}{t - z \cdot a} \]
      4. pow-plus99.3%

        \[\leadsto \frac{x + \left(-y\right) \cdot \color{blue}{{\left(\sqrt[3]{z}\right)}^{\left(2 + 1\right)}}}{t - z \cdot a} \]
      5. metadata-eval99.3%

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

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

      \[\leadsto \frac{x + \left(-y\right) \cdot {\left(\sqrt[3]{z}\right)}^{3}}{\color{blue}{t}} \]
    9. Step-by-step derivation
      1. rem-cube-cbrt82.9%

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

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

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

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

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

    if 2.79999999999999989e-251 < z < 1.44999999999999995e25

    1. Initial program 99.9%

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

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

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

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

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

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

    if 1.44999999999999995e25 < z

    1. Initial program 57.7%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t + -1 \cdot \left(a \cdot z\right)}} \]
    7. Step-by-step derivation
      1. mul-1-neg42.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
      9. /-rgt-identity81.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.8 \cdot 10^{-77}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 2.8 \cdot 10^{-251}:\\ \;\;\;\;\frac{x}{t} - \frac{z \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.45 \cdot 10^{+25}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-y}{\frac{t}{z} - a}\\ \end{array} \]

Alternative 5: 65.5% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.59999999999999989e49 or 1.05e101 < z

    1. Initial program 55.7%

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

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

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

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

    if -2.59999999999999989e49 < z < 4.00000000000000006e-251

    1. Initial program 96.6%

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

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

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

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

    if 4.00000000000000006e-251 < z < 1.05e101

    1. Initial program 96.1%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+49}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{-251}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.05 \cdot 10^{+101}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 6: 72.4% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.65e-76 or 1.49999999999999989e30 < z

    1. Initial program 65.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.65e-76 < z < 2.9999999999999999e-251

    1. Initial program 99.8%

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

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

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

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

    if 2.9999999999999999e-251 < z < 1.49999999999999989e30

    1. Initial program 98.4%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.65 \cdot 10^{-76}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;z \leq 3 \cdot 10^{-251}:\\ \;\;\;\;\frac{x - z \cdot y}{t}\\ \mathbf{elif}\;z \leq 1.5 \cdot 10^{+30}:\\ \;\;\;\;\frac{x}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \end{array} \]

Alternative 7: 54.7% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.1999999999999999e-74 or 8.50000000000000038e67 < z

    1. Initial program 63.0%

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

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

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

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

    if -3.1999999999999999e-74 < z < 3.6000000000000001e-19 or 1.6999999999999999e63 < z < 8.50000000000000038e67

    1. Initial program 99.8%

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

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

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

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

    if 3.6000000000000001e-19 < z < 1.6999999999999999e63

    1. Initial program 88.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -3.2 \cdot 10^{-74}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 1.7 \cdot 10^{+63}:\\ \;\;\;\;\frac{-x}{z \cdot a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 8: 54.9% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -5.2e-75 or 3.19999999999999994e68 < z

    1. Initial program 63.0%

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

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

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

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

    if -5.2e-75 < z < 8.50000000000000038e-14 or 8.19999999999999959e67 < z < 3.19999999999999994e68

    1. Initial program 99.8%

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

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

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

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

    if 8.50000000000000038e-14 < z < 8.19999999999999959e67

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Step-by-step derivation
      1. clear-num89.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t + -1 \cdot \left(a \cdot z\right)}} \]
    7. Step-by-step derivation
      1. mul-1-neg47.0%

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

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

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

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

        \[\leadsto \frac{-y}{\frac{\color{blue}{t - a \cdot z}}{z}} \]
      6. div-sub57.2%

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

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

        \[\leadsto \frac{-y}{\frac{t}{z} - \frac{a}{\color{blue}{1}}} \]
      9. /-rgt-identity57.2%

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

      \[\leadsto \color{blue}{\frac{-y}{\frac{t}{z} - a}} \]
    9. Taylor expanded in t around inf 46.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -5.2 \cdot 10^{-75}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 8.2 \cdot 10^{+67}:\\ \;\;\;\;\frac{-y}{\frac{t}{z}}\\ \mathbf{elif}\;z \leq 3.2 \cdot 10^{+68}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 9: 54.8% accurate, 0.9× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1e-74 or 8.50000000000000038e67 < z

    1. Initial program 63.0%

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

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

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

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

    if -2.1e-74 < z < 2.39999999999999987e-12 or 4.6e66 < z < 8.50000000000000038e67

    1. Initial program 99.8%

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

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

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

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

    if 2.39999999999999987e-12 < z < 4.6e66

    1. Initial program 89.2%

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

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Step-by-step derivation
      1. sub-neg89.2%

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

        \[\leadsto \frac{\color{blue}{\left(-y \cdot z\right) + x}}{t - z \cdot a} \]
      3. distribute-lft-neg-in89.2%

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

        \[\leadsto \frac{\left(-y\right) \cdot \color{blue}{\left(\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}\right)} + x}{t - z \cdot a} \]
      5. associate-*r*88.7%

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\left(-y\right) \cdot \color{blue}{{\left(\sqrt[3]{z}\right)}^{2}}, \sqrt[3]{z}, x\right)}{t - z \cdot a} \]
    5. Applied egg-rr88.7%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\left(-y\right) \cdot {\left(\sqrt[3]{z}\right)}^{2}, \sqrt[3]{z}, x\right)}}{t - z \cdot a} \]
    6. Step-by-step derivation
      1. fma-udef88.7%

        \[\leadsto \frac{\color{blue}{\left(\left(-y\right) \cdot {\left(\sqrt[3]{z}\right)}^{2}\right) \cdot \sqrt[3]{z} + x}}{t - z \cdot a} \]
      2. +-commutative88.7%

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

        \[\leadsto \frac{x + \color{blue}{\left(-y\right) \cdot \left({\left(\sqrt[3]{z}\right)}^{2} \cdot \sqrt[3]{z}\right)}}{t - z \cdot a} \]
      4. pow-plus88.8%

        \[\leadsto \frac{x + \left(-y\right) \cdot \color{blue}{{\left(\sqrt[3]{z}\right)}^{\left(2 + 1\right)}}}{t - z \cdot a} \]
      5. metadata-eval88.8%

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

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

      \[\leadsto \frac{x + \left(-y\right) \cdot {\left(\sqrt[3]{z}\right)}^{3}}{\color{blue}{t}} \]
    9. Taylor expanded in x around 0 36.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{y \cdot z}{t}} \]
    10. Step-by-step derivation
      1. mul-1-neg36.0%

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

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

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

        \[\leadsto \color{blue}{\frac{-z}{\frac{t}{y}}} \]
    11. Simplified46.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -2.1 \cdot 10^{-74}:\\ \;\;\;\;\frac{y}{a}\\ \mathbf{elif}\;z \leq 2.4 \cdot 10^{-12}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{elif}\;z \leq 4.6 \cdot 10^{+66}:\\ \;\;\;\;\frac{-z}{\frac{t}{y}}\\ \mathbf{elif}\;z \leq 8.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{x}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]

Alternative 10: 65.7% accurate, 1.0× speedup?

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

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

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


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

    1. Initial program 57.4%

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

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

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

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

    if -2.10000000000000017e34 < z < 1.05e101

    1. Initial program 97.4%

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

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

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

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

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

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

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

Alternative 11: 55.2% accurate, 1.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -3.3 \cdot 10^{-74} \lor \neg \left(z \leq 1.2 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{y}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -3.29999999999999996e-74 or 1.2e30 < z

    1. Initial program 64.8%

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

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

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

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

    if -3.29999999999999996e-74 < z < 1.2e30

    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. Taylor expanded in z around 0 60.1%

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

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

Alternative 12: 35.3% 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 82.4%

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

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

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

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

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

Developer target: 97.3% accurate, 0.6× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}

Reproduce

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