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

Percentage Accurate: 85.2% → 92.3%
Time: 10.2s
Alternatives: 10
Speedup: 0.2×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 10 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: 92.3% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x - y \cdot z\\ t_2 := t - z \cdot a\\ t_3 := \frac{t\_1}{t\_2}\\ \mathbf{if}\;t\_3 \leq -\infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_2} + \frac{z}{z \cdot a - t}\right)\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_3 \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;\frac{t\_1}{\mathsf{fma}\left(0 - z, a, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- x (* y z))) (t_2 (- t (* z a))) (t_3 (/ t_1 t_2)))
   (if (<= t_3 (- INFINITY))
     (* y (+ (/ x (* y t_2)) (/ z (- (* z a) t))))
     (if (<= t_3 -1e-236)
       t_3
       (if (<= t_3 0.0)
         (/ (- y (/ x z)) a)
         (if (<= t_3 INFINITY) (/ t_1 (fma (- 0.0 z) a t)) (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = x - (y * z);
	double t_2 = t - (z * a);
	double t_3 = t_1 / t_2;
	double tmp;
	if (t_3 <= -((double) INFINITY)) {
		tmp = y * ((x / (y * t_2)) + (z / ((z * a) - t)));
	} else if (t_3 <= -1e-236) {
		tmp = t_3;
	} else if (t_3 <= 0.0) {
		tmp = (y - (x / z)) / a;
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_1 / fma((0.0 - z), a, t);
	} else {
		tmp = y / a;
	}
	return tmp;
}
function code(x, y, z, t, a)
	t_1 = Float64(x - Float64(y * z))
	t_2 = Float64(t - Float64(z * a))
	t_3 = Float64(t_1 / t_2)
	tmp = 0.0
	if (t_3 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(x / Float64(y * t_2)) + Float64(z / Float64(Float64(z * a) - t))));
	elseif (t_3 <= -1e-236)
		tmp = t_3;
	elseif (t_3 <= 0.0)
		tmp = Float64(Float64(y - Float64(x / z)) / a);
	elseif (t_3 <= Inf)
		tmp = Float64(t_1 / fma(Float64(0.0 - z), a, t));
	else
		tmp = Float64(y / a);
	end
	return tmp
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$1 / t$95$2), $MachinePrecision]}, If[LessEqual[t$95$3, (-Infinity)], N[(y * N[(N[(x / N[(y * t$95$2), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-236], t$95$3, If[LessEqual[t$95$3, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(t$95$1 / N[(N[(0.0 - z), $MachinePrecision] * a + t), $MachinePrecision]), $MachinePrecision], N[(y / a), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := x - y \cdot z\\
t_2 := t - z \cdot a\\
t_3 := \frac{t\_1}{t\_2}\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_2} + \frac{z}{z \cdot a - t}\right)\\

\mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{y - \frac{x}{z}}{a}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{t\_1}{\mathsf{fma}\left(0 - z, a, t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -inf.0

    1. Initial program 70.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6470.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified70.3%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{z}{t - a \cdot z} + \frac{x}{y \cdot \left(t - a \cdot z\right)}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot \frac{z}{t - a \cdot z} + \frac{x}{y \cdot \left(t - a \cdot z\right)}\right)}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} + \color{blue}{-1 \cdot \frac{z}{t - a \cdot z}}\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} + \left(\mathsf{neg}\left(\frac{z}{t - a \cdot z}\right)\right)\right)\right) \]
      4. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} - \color{blue}{\frac{z}{t - a \cdot z}}\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{x}{y \cdot \left(t - a \cdot z\right)}\right), \color{blue}{\left(\frac{z}{t - a \cdot z}\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \left(y \cdot \left(t - a \cdot z\right)\right)\right), \left(\frac{\color{blue}{z}}{t - a \cdot z}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(t - a \cdot z\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \left(a \cdot z\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \left(z \cdot a\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \color{blue}{\left(t - a \cdot z\right)}\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right)\right)\right) \]
    7. Simplified99.8%

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

    if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236

    1. Initial program 99.6%

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

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

    1. Initial program 48.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6448.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified48.3%

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

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

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{\color{blue}{a \cdot z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{z \cdot \color{blue}{a}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot \left(x - y \cdot z\right)}{z}}{\color{blue}{a}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x - y \cdot z}{z}}{a} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x - y \cdot z}{z}\right), \color{blue}{a}\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - \frac{y \cdot z}{z}\right)\right), a\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot \frac{z}{z}\right)\right), a\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot 1\right)\right), a\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y\right)\right), a\right) \]
      10. distribute-lft-out--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} - -1 \cdot y\right), a\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(-1 \cdot y\right)\right)\right), a\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right), a\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + y\right), a\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + -1 \cdot \frac{x}{z}\right), a\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right), a\right) \]
      16. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y - \frac{x}{z}\right), a\right) \]
      17. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \left(\frac{x}{z}\right)\right), a\right) \]
      18. /-lowering-/.f6481.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right) \]
    7. Simplified81.0%

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

    if -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0

    1. Initial program 98.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6498.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified98.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t - z \cdot a}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t + \color{blue}{\left(\mathsf{neg}\left(z \cdot a\right)\right)}\right)\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(\left(\mathsf{neg}\left(z \cdot a\right)\right) + \color{blue}{t}\right)\right) \]
      3. distribute-lft-neg-inN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(\left(\mathsf{neg}\left(z\right)\right) \cdot a + t\right)\right) \]
      4. fma-defineN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(\mathsf{fma}\left(\mathsf{neg}\left(z\right), \color{blue}{a}, t\right)\right)\right) \]
      5. fma-lowering-fma.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(z\right)\right), \color{blue}{a}, t\right)\right) \]
      6. neg-sub0N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{fma.f64}\left(\left(0 - z\right), a, t\right)\right) \]
      7. --lowering--.f6498.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{fma.f64}\left(\mathsf{\_.f64}\left(0, z\right), a, t\right)\right) \]
    6. Applied egg-rr98.9%

      \[\leadsto \frac{x - y \cdot z}{\color{blue}{\mathsf{fma}\left(0 - z, a, t\right)}} \]
    7. Step-by-step derivation
      1. sub0-negN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{fma.f64}\left(\left(\mathsf{neg}\left(z\right)\right), a, t\right)\right) \]
      2. neg-lowering-neg.f6498.9%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{fma.f64}\left(\mathsf{neg.f64}\left(z\right), a, t\right)\right) \]
    8. Applied egg-rr98.9%

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

    if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z)))

    1. Initial program 0.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f640.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified100.0%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification96.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -\infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y \cdot \left(t - z \cdot a\right)} + \frac{z}{z \cdot a - t}\right)\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -1 \cdot 10^{-236}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq \infty:\\ \;\;\;\;\frac{x - y \cdot z}{\mathsf{fma}\left(0 - z, a, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 92.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := t - z \cdot a\\ t_2 := \frac{x - y \cdot z}{t\_1}\\ \mathbf{if}\;t\_2 \leq -\infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_1} + \frac{z}{z \cdot a - t}\right)\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;t\_2 \leq \infty:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (- t (* z a))) (t_2 (/ (- x (* y z)) t_1)))
   (if (<= t_2 (- INFINITY))
     (* y (+ (/ x (* y t_1)) (/ z (- (* z a) t))))
     (if (<= t_2 -1e-236)
       t_2
       (if (<= t_2 0.0)
         (/ (- y (/ x z)) a)
         (if (<= t_2 INFINITY) t_2 (/ y a)))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (z * a);
	double t_2 = (x - (y * z)) / t_1;
	double tmp;
	if (t_2 <= -((double) INFINITY)) {
		tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)));
	} else if (t_2 <= -1e-236) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (y - (x / z)) / a;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = y / a;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = t - (z * a);
	double t_2 = (x - (y * z)) / t_1;
	double tmp;
	if (t_2 <= -Double.POSITIVE_INFINITY) {
		tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)));
	} else if (t_2 <= -1e-236) {
		tmp = t_2;
	} else if (t_2 <= 0.0) {
		tmp = (y - (x / z)) / a;
	} else if (t_2 <= Double.POSITIVE_INFINITY) {
		tmp = t_2;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = t - (z * a)
	t_2 = (x - (y * z)) / t_1
	tmp = 0
	if t_2 <= -math.inf:
		tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)))
	elif t_2 <= -1e-236:
		tmp = t_2
	elif t_2 <= 0.0:
		tmp = (y - (x / z)) / a
	elif t_2 <= math.inf:
		tmp = t_2
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(t - Float64(z * a))
	t_2 = Float64(Float64(x - Float64(y * z)) / t_1)
	tmp = 0.0
	if (t_2 <= Float64(-Inf))
		tmp = Float64(y * Float64(Float64(x / Float64(y * t_1)) + Float64(z / Float64(Float64(z * a) - t))));
	elseif (t_2 <= -1e-236)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(y - Float64(x / z)) / a);
	elseif (t_2 <= Inf)
		tmp = t_2;
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = t - (z * a);
	t_2 = (x - (y * z)) / t_1;
	tmp = 0.0;
	if (t_2 <= -Inf)
		tmp = y * ((x / (y * t_1)) + (z / ((z * a) - t)));
	elseif (t_2 <= -1e-236)
		tmp = t_2;
	elseif (t_2 <= 0.0)
		tmp = (y - (x / z)) / a;
	elseif (t_2 <= Inf)
		tmp = t_2;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision]}, If[LessEqual[t$95$2, (-Infinity)], N[(y * N[(N[(x / N[(y * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(z / N[(N[(z * a), $MachinePrecision] - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, -1e-236], t$95$2, If[LessEqual[t$95$2, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$2, Infinity], t$95$2, N[(y / a), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := t - z \cdot a\\
t_2 := \frac{x - y \cdot z}{t\_1}\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;y \cdot \left(\frac{x}{y \cdot t\_1} + \frac{z}{z \cdot a - t}\right)\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-236}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 70.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6470.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified70.3%

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

      \[\leadsto \color{blue}{y \cdot \left(-1 \cdot \frac{z}{t - a \cdot z} + \frac{x}{y \cdot \left(t - a \cdot z\right)}\right)} \]
    6. Step-by-step derivation
      1. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \color{blue}{\left(-1 \cdot \frac{z}{t - a \cdot z} + \frac{x}{y \cdot \left(t - a \cdot z\right)}\right)}\right) \]
      2. +-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} + \color{blue}{-1 \cdot \frac{z}{t - a \cdot z}}\right)\right) \]
      3. mul-1-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} + \left(\mathsf{neg}\left(\frac{z}{t - a \cdot z}\right)\right)\right)\right) \]
      4. unsub-negN/A

        \[\leadsto \mathsf{*.f64}\left(y, \left(\frac{x}{y \cdot \left(t - a \cdot z\right)} - \color{blue}{\frac{z}{t - a \cdot z}}\right)\right) \]
      5. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\left(\frac{x}{y \cdot \left(t - a \cdot z\right)}\right), \color{blue}{\left(\frac{z}{t - a \cdot z}\right)}\right)\right) \]
      6. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \left(y \cdot \left(t - a \cdot z\right)\right)\right), \left(\frac{\color{blue}{z}}{t - a \cdot z}\right)\right)\right) \]
      7. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \left(t - a \cdot z\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      8. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \left(a \cdot z\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      9. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \left(z \cdot a\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      10. *-lowering-*.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \left(\frac{z}{t - a \cdot z}\right)\right)\right) \]
      11. /-lowering-/.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \color{blue}{\left(t - a \cdot z\right)}\right)\right)\right) \]
      12. --lowering--.f64N/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right)\right)\right) \]
      13. *-commutativeN/A

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
      14. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(\mathsf{/.f64}\left(x, \mathsf{*.f64}\left(y, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, a\right)\right)\right)\right), \mathsf{/.f64}\left(z, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right)\right)\right) \]
    7. Simplified99.8%

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

    if -inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0

    1. Initial program 99.2%

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

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

    1. Initial program 48.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6448.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified48.3%

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

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

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{\color{blue}{a \cdot z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{z \cdot \color{blue}{a}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot \left(x - y \cdot z\right)}{z}}{\color{blue}{a}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x - y \cdot z}{z}}{a} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x - y \cdot z}{z}\right), \color{blue}{a}\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - \frac{y \cdot z}{z}\right)\right), a\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot \frac{z}{z}\right)\right), a\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot 1\right)\right), a\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y\right)\right), a\right) \]
      10. distribute-lft-out--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} - -1 \cdot y\right), a\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(-1 \cdot y\right)\right)\right), a\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right), a\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + y\right), a\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + -1 \cdot \frac{x}{z}\right), a\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right), a\right) \]
      16. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y - \frac{x}{z}\right), a\right) \]
      17. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \left(\frac{x}{z}\right)\right), a\right) \]
      18. /-lowering-/.f6481.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right) \]
    7. Simplified81.0%

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

    if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z)))

    1. Initial program 0.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f640.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified100.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -\infty:\\ \;\;\;\;y \cdot \left(\frac{x}{y \cdot \left(t - z \cdot a\right)} + \frac{z}{z \cdot a - t}\right)\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq -1 \cdot 10^{-236}:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;\frac{x - y \cdot z}{t - z \cdot a} \leq \infty:\\ \;\;\;\;\frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x - y \cdot z}{t - z \cdot a}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-236}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (let* ((t_1 (/ (- x (* y z)) (- t (* z a)))))
   (if (<= t_1 -1e-236)
     t_1
     (if (<= t_1 0.0)
       (/ (- y (/ x z)) a)
       (if (<= t_1 INFINITY) t_1 (/ y a))))))
double code(double x, double y, double z, double t, double a) {
	double t_1 = (x - (y * z)) / (t - (z * a));
	double tmp;
	if (t_1 <= -1e-236) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (y - (x / z)) / a;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_1;
	} else {
		tmp = y / a;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a) {
	double t_1 = (x - (y * z)) / (t - (z * a));
	double tmp;
	if (t_1 <= -1e-236) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (y - (x / z)) / a;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = t_1;
	} else {
		tmp = y / a;
	}
	return tmp;
}
def code(x, y, z, t, a):
	t_1 = (x - (y * z)) / (t - (z * a))
	tmp = 0
	if t_1 <= -1e-236:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = (y - (x / z)) / a
	elif t_1 <= math.inf:
		tmp = t_1
	else:
		tmp = y / a
	return tmp
function code(x, y, z, t, a)
	t_1 = Float64(Float64(x - Float64(y * z)) / Float64(t - Float64(z * a)))
	tmp = 0.0
	if (t_1 <= -1e-236)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(y - Float64(x / z)) / a);
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = Float64(y / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a)
	t_1 = (x - (y * z)) / (t - (z * a));
	tmp = 0.0;
	if (t_1 <= -1e-236)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = (y - (x / z)) / a;
	elseif (t_1 <= Inf)
		tmp = t_1;
	else
		tmp = y / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(N[(x - N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(t - N[(z * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-236], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(y - N[(x / z), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t$95$1, Infinity], t$95$1, N[(y / a), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < -1e-236 or -0.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z))) < +inf.0

    1. Initial program 97.0%

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

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

    1. Initial program 48.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6448.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified48.3%

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

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

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{\color{blue}{a \cdot z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{z \cdot \color{blue}{a}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot \left(x - y \cdot z\right)}{z}}{\color{blue}{a}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x - y \cdot z}{z}}{a} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x - y \cdot z}{z}\right), \color{blue}{a}\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - \frac{y \cdot z}{z}\right)\right), a\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot \frac{z}{z}\right)\right), a\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot 1\right)\right), a\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y\right)\right), a\right) \]
      10. distribute-lft-out--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} - -1 \cdot y\right), a\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(-1 \cdot y\right)\right)\right), a\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right), a\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + y\right), a\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + -1 \cdot \frac{x}{z}\right), a\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right), a\right) \]
      16. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y - \frac{x}{z}\right), a\right) \]
      17. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \left(\frac{x}{z}\right)\right), a\right) \]
      18. /-lowering-/.f6481.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right) \]
    7. Simplified81.0%

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

    if +inf.0 < (/.f64 (-.f64 x (*.f64 y z)) (-.f64 t (*.f64 a z)))

    1. Initial program 0.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f640.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified0.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64100.0%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified100.0%

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

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

Alternative 4: 62.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.1 \cdot 10^{+209}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -7.49999999999999989e-25 or 9.8000000000000005e61 < y < 1.0999999999999999e209

    1. Initial program 82.7%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6482.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified82.7%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{t}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), t\right) \]
      3. *-lowering-*.f6467.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), t\right) \]
    7. Simplified67.0%

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

    if -7.49999999999999989e-25 < y < 9.8000000000000005e61

    1. Initial program 89.1%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6489.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified89.1%

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

      \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      4. *-lowering-*.f6474.6%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    7. Simplified74.6%

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

    if 1.0999999999999999e209 < y

    1. Initial program 79.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6479.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified79.2%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6464.1%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified64.1%

      \[\leadsto \color{blue}{\frac{y}{a}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 5: 67.1% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-70}:\\
\;\;\;\;\frac{x - y \cdot z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.2e-70

    1. Initial program 91.3%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6491.3%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified91.3%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{t}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), t\right) \]
      3. *-lowering-*.f6481.7%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), t\right) \]
    7. Simplified81.7%

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

    if -6.2e-70 < t < 4.3999999999999998e-101

    1. Initial program 83.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6483.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified83.2%

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

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

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{\color{blue}{a \cdot z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{z \cdot \color{blue}{a}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot \left(x - y \cdot z\right)}{z}}{\color{blue}{a}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x - y \cdot z}{z}}{a} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x - y \cdot z}{z}\right), \color{blue}{a}\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - \frac{y \cdot z}{z}\right)\right), a\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot \frac{z}{z}\right)\right), a\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot 1\right)\right), a\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y\right)\right), a\right) \]
      10. distribute-lft-out--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} - -1 \cdot y\right), a\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(-1 \cdot y\right)\right)\right), a\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right), a\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + y\right), a\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + -1 \cdot \frac{x}{z}\right), a\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right), a\right) \]
      16. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y - \frac{x}{z}\right), a\right) \]
      17. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \left(\frac{x}{z}\right)\right), a\right) \]
      18. /-lowering-/.f6479.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right) \]
    7. Simplified79.8%

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

    if 4.3999999999999998e-101 < t

    1. Initial program 84.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6484.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified84.8%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{t}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), t\right) \]
      3. *-lowering-*.f6468.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), t\right) \]
    7. Simplified68.8%

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{t}{x - y \cdot z}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{x - y \cdot z}\right)}\right) \]
      3. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{\left(x - y \cdot z\right)}\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(x, \color{blue}{\left(y \cdot z\right)}\right)\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(x, \left(z \cdot \color{blue}{y}\right)\right)\right)\right) \]
      6. *-lowering-*.f6469.3%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(z, \color{blue}{y}\right)\right)\right)\right) \]
    9. Applied egg-rr69.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-70}:\\ \;\;\;\;\frac{x - y \cdot z}{t}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-101}:\\ \;\;\;\;\frac{y - \frac{x}{z}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-1}{\frac{t}{y \cdot z - x}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.5% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.50000000000000002e-58 or 3.8000000000000001e-101 < t

    1. Initial program 87.5%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6487.5%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified87.5%

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

      \[\leadsto \color{blue}{\frac{x - y \cdot z}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{t}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), t\right) \]
      3. *-lowering-*.f6474.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), t\right) \]
    7. Simplified74.1%

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

    if -7.50000000000000002e-58 < t < 3.8000000000000001e-101

    1. Initial program 83.2%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6483.2%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified83.2%

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

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

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{\color{blue}{a \cdot z}} \]
      2. *-commutativeN/A

        \[\leadsto \frac{-1 \cdot \left(x - y \cdot z\right)}{z \cdot \color{blue}{a}} \]
      3. associate-/r*N/A

        \[\leadsto \frac{\frac{-1 \cdot \left(x - y \cdot z\right)}{z}}{\color{blue}{a}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{-1 \cdot \frac{x - y \cdot z}{z}}{a} \]
      5. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x - y \cdot z}{z}\right), \color{blue}{a}\right) \]
      6. div-subN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - \frac{y \cdot z}{z}\right)\right), a\right) \]
      7. associate-/l*N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot \frac{z}{z}\right)\right), a\right) \]
      8. *-inversesN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y \cdot 1\right)\right), a\right) \]
      9. *-rgt-identityN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \left(\frac{x}{z} - y\right)\right), a\right) \]
      10. distribute-lft-out--N/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} - -1 \cdot y\right), a\right) \]
      11. sub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(-1 \cdot y\right)\right)\right), a\right) \]
      12. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + \left(\mathsf{neg}\left(\left(\mathsf{neg}\left(y\right)\right)\right)\right)\right), a\right) \]
      13. remove-double-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(-1 \cdot \frac{x}{z} + y\right), a\right) \]
      14. +-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + -1 \cdot \frac{x}{z}\right), a\right) \]
      15. mul-1-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y + \left(\mathsf{neg}\left(\frac{x}{z}\right)\right)\right), a\right) \]
      16. unsub-negN/A

        \[\leadsto \mathsf{/.f64}\left(\left(y - \frac{x}{z}\right), a\right) \]
      17. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \left(\frac{x}{z}\right)\right), a\right) \]
      18. /-lowering-/.f6479.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(y, \mathsf{/.f64}\left(x, z\right)\right), a\right) \]
    7. Simplified79.8%

      \[\leadsto \color{blue}{\frac{y - \frac{x}{z}}{a}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 63.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.2500000000000001e53 or 1.05e187 < z

    1. Initial program 62.0%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6462.0%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified62.0%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6457.0%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified57.0%

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

    if -1.2500000000000001e53 < z < 1.05e187

    1. Initial program 96.1%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6496.1%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified96.1%

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

      \[\leadsto \color{blue}{\frac{x}{t - a \cdot z}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      4. *-lowering-*.f6470.1%

        \[\leadsto \mathsf{/.f64}\left(x, \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    7. Simplified70.1%

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

Alternative 8: 54.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;z \leq 9.4 \cdot 10^{+91}:\\
\;\;\;\;\frac{1}{\frac{t}{x}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -2.8e19 or 9.3999999999999995e91 < z

    1. Initial program 66.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6466.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified66.4%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6450.9%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified50.9%

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

    if -2.8e19 < z < 9.3999999999999995e91

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    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

      \[\leadsto \color{blue}{\frac{x}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6455.8%

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{t}\right) \]
    7. Simplified55.8%

      \[\leadsto \color{blue}{\frac{x}{t}} \]
    8. Step-by-step derivation
      1. clear-numN/A

        \[\leadsto \frac{1}{\color{blue}{\frac{t}{x}}} \]
      2. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(1, \color{blue}{\left(\frac{t}{x}\right)}\right) \]
      3. /-lowering-/.f6456.1%

        \[\leadsto \mathsf{/.f64}\left(1, \mathsf{/.f64}\left(t, \color{blue}{x}\right)\right) \]
    9. Applied egg-rr56.1%

      \[\leadsto \color{blue}{\frac{1}{\frac{t}{x}}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 9: 54.3% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.75e19 or 5.59999999999999978e93 < z

    1. Initial program 66.4%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6466.4%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    3. Simplified66.4%

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

      \[\leadsto \color{blue}{\frac{y}{a}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6450.9%

        \[\leadsto \mathsf{/.f64}\left(y, \color{blue}{a}\right) \]
    7. Simplified50.9%

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

    if -1.75e19 < z < 5.59999999999999978e93

    1. Initial program 99.8%

      \[\frac{x - y \cdot z}{t - a \cdot z} \]
    2. Step-by-step derivation
      1. /-lowering-/.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
      2. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
      3. *-lowering-*.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
      4. --lowering--.f64N/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
      5. *-commutativeN/A

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
      6. *-lowering-*.f6499.8%

        \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
    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

      \[\leadsto \color{blue}{\frac{x}{t}} \]
    6. Step-by-step derivation
      1. /-lowering-/.f6455.8%

        \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{t}\right) \]
    7. Simplified55.8%

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

Alternative 10: 36.0% accurate, 3.7× speedup?

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

\\
\frac{x}{t}
\end{array}
Derivation
  1. Initial program 85.9%

    \[\frac{x - y \cdot z}{t - a \cdot z} \]
  2. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(x - y \cdot z\right), \color{blue}{\left(t - a \cdot z\right)}\right) \]
    2. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \left(y \cdot z\right)\right), \left(\color{blue}{t} - a \cdot z\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \left(t - a \cdot z\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \color{blue}{\left(a \cdot z\right)}\right)\right) \]
    5. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \left(z \cdot \color{blue}{a}\right)\right)\right) \]
    6. *-lowering-*.f6485.9%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(x, \mathsf{*.f64}\left(y, z\right)\right), \mathsf{\_.f64}\left(t, \mathsf{*.f64}\left(z, \color{blue}{a}\right)\right)\right) \]
  3. Simplified85.9%

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

    \[\leadsto \color{blue}{\frac{x}{t}} \]
  6. Step-by-step derivation
    1. /-lowering-/.f6439.1%

      \[\leadsto \mathsf{/.f64}\left(x, \color{blue}{t}\right) \]
  7. Simplified39.1%

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

Developer Target 1: 97.0% 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 2024161 
(FPCore (x y z t a)
  :name "Diagrams.Solve.Tridiagonal:solveTriDiagonal from diagrams-solve-0.1, A"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< z -32113435955957344) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))) (if (< z 4392440296622287/125000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* (- x (* y z)) (/ 1 (- t (* a z)))) (- (/ x (- t (* a z))) (/ y (- (/ t z) a))))))

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