Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B

Percentage Accurate: 75.2% → 88.6%
Time: 13.7s
Alternatives: 14
Speedup: 0.8×

Specification

?
\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b):
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b)
	return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 75.2% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
}
def code(x, y, z, t, a, b):
	return (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
function code(x, y, z, t, a, b)
	return Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
end
function tmp = code(x, y, z, t, a, b)
	tmp = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
end
code[x_, y_, z_, t_, a_, b_] := N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}
\end{array}

Alternative 1: 88.6% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_2 \leq -1 \cdot 10^{-66}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\

\mathbf{elif}\;t_2 \leq 10^{-297}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{t_1}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


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

    1. Initial program 49.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 80.9%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 80.9%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999998e-67

    1. Initial program 99.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. +-commutative99.6%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. associate-+l+93.0%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \left(\frac{\color{blue}{b \cdot y}}{t} + a\right)} \]
      8. associate-*r/93.0%

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}} \]
    3. Simplified93.1%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}} \]
    4. Step-by-step derivation
      1. fma-udef93.1%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)} \]
      2. clear-num93.1%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{t}{z}}} + x}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)} \]
      4. associate-/r/99.7%

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

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

    if -9.9999999999999998e-67 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297

    1. Initial program 72.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. +-commutative72.1%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. associate-+l+73.3%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \left(\frac{\color{blue}{b \cdot y}}{t} + a\right)} \]
      8. associate-*r/82.8%

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}} \]
    3. Simplified82.8%

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

    if 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]

    if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 10.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative10.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 86.5%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification91.1%

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

Alternative 2: 88.7% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-183}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}\\

\mathbf{elif}\;t_1 \leq 10^{-297}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


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

    1. Initial program 49.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 80.9%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 80.9%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000001e-183

    1. Initial program 99.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. +-commutative99.6%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. associate-+l+95.0%

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \left(\frac{\color{blue}{b \cdot y}}{t} + a\right)} \]
      8. associate-*r/95.0%

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}} \]
    3. Simplified95.0%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}} \]
    4. Step-by-step derivation
      1. fma-udef95.0%

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)} \]
      2. clear-num95.0%

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

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{t}{z}}} + x}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)} \]
      4. associate-/r/99.7%

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

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

    if -2.00000000000000001e-183 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297

    1. Initial program 64.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. associate-/l*65.6%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 - \color{blue}{\left(-b\right) \cdot \frac{y}{t}}\right)} \]
      10. cancel-sign-sub77.9%

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \color{blue}{\frac{b}{\frac{t}{y}}}\right)} \]
    3. Simplified77.9%

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}} \]
    4. Step-by-step derivation
      1. div-inv77.9%

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

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

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

    if 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]

    if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 10.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative10.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 86.5%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification91.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-183}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 10^{-297}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+298}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 3: 88.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-104}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 10^{-297}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+298}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


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

    1. Initial program 49.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 80.9%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 80.9%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999979e-104 or 1.00000000000000004e-297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000003e298

    1. Initial program 99.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]

    if -4.99999999999999979e-104 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.00000000000000004e-297

    1. Initial program 68.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative68.6%

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

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

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

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

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

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

    if 5.0000000000000003e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 10.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative10.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 86.5%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification91.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -5 \cdot 10^{-104}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 10^{-297}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+298}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 4: 63.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+92}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.0021:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+66}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -3.9e+92)
   (/ z b)
   (if (<= y -0.0021)
     (/ (+ x (* y (/ z t))) (+ a 1.0))
     (if (<= y 3.8e-14)
       (/ x (+ 1.0 (+ a (/ (* y b) t))))
       (if (<= y 2.5e+66) (/ (* y z) (+ (* y b) (* t (+ a 1.0)))) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -3.9e+92) {
		tmp = z / b;
	} else if (y <= -0.0021) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (y <= 3.8e-14) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 2.5e+66) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (y <= (-3.9d+92)) then
        tmp = z / b
    else if (y <= (-0.0021d0)) then
        tmp = (x + (y * (z / t))) / (a + 1.0d0)
    else if (y <= 3.8d-14) then
        tmp = x / (1.0d0 + (a + ((y * b) / t)))
    else if (y <= 2.5d+66) then
        tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -3.9e+92) {
		tmp = z / b;
	} else if (y <= -0.0021) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (y <= 3.8e-14) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 2.5e+66) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -3.9e+92:
		tmp = z / b
	elif y <= -0.0021:
		tmp = (x + (y * (z / t))) / (a + 1.0)
	elif y <= 3.8e-14:
		tmp = x / (1.0 + (a + ((y * b) / t)))
	elif y <= 2.5e+66:
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)))
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -3.9e+92)
		tmp = Float64(z / b);
	elseif (y <= -0.0021)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	elseif (y <= 3.8e-14)
		tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))));
	elseif (y <= 2.5e+66)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -3.9e+92)
		tmp = z / b;
	elseif (y <= -0.0021)
		tmp = (x + (y * (z / t))) / (a + 1.0);
	elseif (y <= 3.8e-14)
		tmp = x / (1.0 + (a + ((y * b) / t)));
	elseif (y <= 2.5e+66)
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -3.9e+92], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.0021], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.8e-14], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 2.5e+66], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.9 \cdot 10^{+92}:\\
\;\;\;\;\frac{z}{b}\\

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

\mathbf{elif}\;y \leq 3.8 \cdot 10^{-14}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+66}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.90000000000000011e92 or 2.49999999999999996e66 < y

    1. Initial program 45.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative45.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 69.3%

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -3.90000000000000011e92 < y < -0.00209999999999999987

    1. Initial program 76.9%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative76.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in b around 0 71.4%

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

    if -0.00209999999999999987 < y < 3.8000000000000002e-14

    1. Initial program 93.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative93.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 80.9%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]

    if 3.8000000000000002e-14 < y < 2.49999999999999996e66

    1. Initial program 72.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 59.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 72.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+92}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.0021:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 3.8 \cdot 10^{-14}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+66}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 5: 80.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.5 \cdot 10^{-172} \lor \neg \left(t \leq 5.1 \cdot 10^{-135}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.50000000000000053e-172 or 5.1000000000000001e-135 < t

    1. Initial program 80.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative80.6%

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

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

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

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

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

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

    if -9.50000000000000053e-172 < t < 5.1000000000000001e-135

    1. Initial program 51.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative51.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 53.1%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 71.3%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification82.0%

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

Alternative 6: 79.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.4 \cdot 10^{-172}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{-190}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\


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

    1. Initial program 83.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative83.8%

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

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

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

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

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

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

    if -2.4000000000000001e-172 < t < 1.2999999999999999e-190

    1. Initial program 51.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative51.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 59.3%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 79.2%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]

    if 1.2999999999999999e-190 < t

    1. Initial program 74.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. associate-/l*75.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 - \color{blue}{\left(-b\right) \cdot \frac{y}{t}}\right)} \]
      10. cancel-sign-sub78.9%

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \color{blue}{\frac{b}{\frac{t}{y}}}\right)} \]
    3. Simplified78.9%

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}} \]
    4. Step-by-step derivation
      1. div-inv78.9%

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

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

      \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \color{blue}{b \cdot \frac{y}{t}}\right)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-172}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{-190}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \end{array} \]

Alternative 7: 80.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.45 \cdot 10^{-168}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\

\mathbf{elif}\;t \leq 9.6 \cdot 10^{-191}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\


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

    1. Initial program 83.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative83.8%

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

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

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

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

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

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

    if -1.4499999999999999e-168 < t < 9.5999999999999997e-191

    1. Initial program 51.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative51.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 59.3%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Taylor expanded in t around 0 79.2%

      \[\leadsto \frac{y \cdot z}{\color{blue}{b \cdot y + t \cdot \left(1 + a\right)}} \]

    if 9.5999999999999997e-191 < t

    1. Initial program 74.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. associate-/l*75.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 - \color{blue}{\left(-b\right) \cdot \frac{y}{t}}\right)} \]
      10. cancel-sign-sub78.9%

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

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

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

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

        \[\leadsto \frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \color{blue}{\frac{b}{\frac{t}{y}}}\right)} \]
    3. Simplified78.9%

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification82.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-168}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;t \leq 9.6 \cdot 10^{-191}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \end{array} \]

Alternative 8: 62.1% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+94}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.0021:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -1.7e+94)
   (/ z b)
   (if (<= y -0.0021)
     (/ (+ x (* y (/ z t))) (+ a 1.0))
     (if (<= y 3.1e-5) (/ x (+ 1.0 (+ a (/ (* y b) t)))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.7e+94) {
		tmp = z / b;
	} else if (y <= -0.0021) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (y <= 3.1e-5) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (y <= (-1.7d+94)) then
        tmp = z / b
    else if (y <= (-0.0021d0)) then
        tmp = (x + (y * (z / t))) / (a + 1.0d0)
    else if (y <= 3.1d-5) then
        tmp = x / (1.0d0 + (a + ((y * b) / t)))
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -1.7e+94) {
		tmp = z / b;
	} else if (y <= -0.0021) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (y <= 3.1e-5) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -1.7e+94:
		tmp = z / b
	elif y <= -0.0021:
		tmp = (x + (y * (z / t))) / (a + 1.0)
	elif y <= 3.1e-5:
		tmp = x / (1.0 + (a + ((y * b) / t)))
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -1.7e+94)
		tmp = Float64(z / b);
	elseif (y <= -0.0021)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	elseif (y <= 3.1e-5)
		tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -1.7e+94)
		tmp = z / b;
	elseif (y <= -0.0021)
		tmp = (x + (y * (z / t))) / (a + 1.0);
	elseif (y <= 3.1e-5)
		tmp = x / (1.0 + (a + ((y * b) / t)));
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -1.7e+94], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.0021], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.1e-5], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.7 \cdot 10^{+94}:\\
\;\;\;\;\frac{z}{b}\\

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

\mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.7000000000000001e94 or 3.10000000000000014e-5 < y

    1. Initial program 49.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.7%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 64.6%

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -1.7000000000000001e94 < y < -0.00209999999999999987

    1. Initial program 76.9%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative76.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in b around 0 71.4%

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

    if -0.00209999999999999987 < y < 3.10000000000000014e-5

    1. Initial program 93.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative93.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 80.3%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification72.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.7 \cdot 10^{+94}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.0021:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{-5}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 9: 55.4% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+92}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.002:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= y -6e+92)
   (/ z b)
   (if (<= y -0.002)
     (/ (+ x (* y (/ z t))) a)
     (if (<= y -2.3e-26)
       (/ x (+ 1.0 (* b (/ y t))))
       (if (<= y 3.4e-20) (/ x (+ a 1.0)) (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -6e+92) {
		tmp = z / b;
	} else if (y <= -0.002) {
		tmp = (x + (y * (z / t))) / a;
	} else if (y <= -2.3e-26) {
		tmp = x / (1.0 + (b * (y / t)));
	} else if (y <= 3.4e-20) {
		tmp = x / (a + 1.0);
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (y <= (-6d+92)) then
        tmp = z / b
    else if (y <= (-0.002d0)) then
        tmp = (x + (y * (z / t))) / a
    else if (y <= (-2.3d-26)) then
        tmp = x / (1.0d0 + (b * (y / t)))
    else if (y <= 3.4d-20) then
        tmp = x / (a + 1.0d0)
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (y <= -6e+92) {
		tmp = z / b;
	} else if (y <= -0.002) {
		tmp = (x + (y * (z / t))) / a;
	} else if (y <= -2.3e-26) {
		tmp = x / (1.0 + (b * (y / t)));
	} else if (y <= 3.4e-20) {
		tmp = x / (a + 1.0);
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if y <= -6e+92:
		tmp = z / b
	elif y <= -0.002:
		tmp = (x + (y * (z / t))) / a
	elif y <= -2.3e-26:
		tmp = x / (1.0 + (b * (y / t)))
	elif y <= 3.4e-20:
		tmp = x / (a + 1.0)
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (y <= -6e+92)
		tmp = Float64(z / b);
	elseif (y <= -0.002)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a);
	elseif (y <= -2.3e-26)
		tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t))));
	elseif (y <= 3.4e-20)
		tmp = Float64(x / Float64(a + 1.0));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (y <= -6e+92)
		tmp = z / b;
	elseif (y <= -0.002)
		tmp = (x + (y * (z / t))) / a;
	elseif (y <= -2.3e-26)
		tmp = x / (1.0 + (b * (y / t)));
	elseif (y <= 3.4e-20)
		tmp = x / (a + 1.0);
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[y, -6e+92], N[(z / b), $MachinePrecision], If[LessEqual[y, -0.002], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[y, -2.3e-26], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.4e-20], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{-26}:\\
\;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\

\mathbf{elif}\;y \leq 3.4 \cdot 10^{-20}:\\
\;\;\;\;\frac{x}{a + 1}\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b}\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.00000000000000026e92 or 3.3999999999999997e-20 < y

    1. Initial program 50.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative50.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 63.0%

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -6.00000000000000026e92 < y < -2e-3

    1. Initial program 76.9%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative76.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in a around inf 47.3%

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

    if -2e-3 < y < -2.30000000000000009e-26

    1. Initial program 99.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 72.0%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    5. Taylor expanded in a around 0 72.0%

      \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
    6. Step-by-step derivation
      1. *-commutative72.0%

        \[\leadsto \frac{x}{1 + \frac{\color{blue}{y \cdot b}}{t}} \]
      2. associate-*r/71.8%

        \[\leadsto \frac{x}{1 + \color{blue}{y \cdot \frac{b}{t}}} \]
    7. Simplified71.8%

      \[\leadsto \color{blue}{\frac{x}{1 + y \cdot \frac{b}{t}}} \]
    8. Taylor expanded in y around 0 72.0%

      \[\leadsto \frac{x}{1 + \color{blue}{\frac{b \cdot y}{t}}} \]
    9. Step-by-step derivation
      1. associate-*r/71.8%

        \[\leadsto \frac{x}{1 + \color{blue}{b \cdot \frac{y}{t}}} \]
    10. Simplified71.8%

      \[\leadsto \frac{x}{1 + \color{blue}{b \cdot \frac{y}{t}}} \]

    if -2.30000000000000009e-26 < y < 3.3999999999999997e-20

    1. Initial program 94.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative94.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around inf 70.6%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification65.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6 \cdot 10^{+92}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -0.002:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;y \leq -2.3 \cdot 10^{-26}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq 3.4 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 10: 61.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.4 \cdot 10^{+91} \lor \neg \left(y \leq 5.2 \cdot 10^{-6}\right):\\
\;\;\;\;\frac{z}{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.3999999999999999e91 or 5.20000000000000019e-6 < y

    1. Initial program 49.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 64.0%

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -1.3999999999999999e91 < y < 5.20000000000000019e-6

    1. Initial program 92.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative92.4%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 76.4%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.4 \cdot 10^{+91} \lor \neg \left(y \leq 5.2 \cdot 10^{-6}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]

Alternative 11: 41.2% accurate, 1.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+158}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq -2.02 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 62:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -1.5e+158)
   (/ x a)
   (if (<= t -2.02e-7) x (if (<= t 62.0) (/ z b) (/ x a)))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.5e+158) {
		tmp = x / a;
	} else if (t <= -2.02e-7) {
		tmp = x;
	} else if (t <= 62.0) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: tmp
    if (t <= (-1.5d+158)) then
        tmp = x / a
    else if (t <= (-2.02d-7)) then
        tmp = x
    else if (t <= 62.0d0) then
        tmp = z / b
    else
        tmp = x / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.5e+158) {
		tmp = x / a;
	} else if (t <= -2.02e-7) {
		tmp = x;
	} else if (t <= 62.0) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -1.5e+158:
		tmp = x / a
	elif t <= -2.02e-7:
		tmp = x
	elif t <= 62.0:
		tmp = z / b
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -1.5e+158)
		tmp = Float64(x / a);
	elseif (t <= -2.02e-7)
		tmp = x;
	elseif (t <= 62.0)
		tmp = Float64(z / b);
	else
		tmp = Float64(x / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -1.5e+158)
		tmp = x / a;
	elseif (t <= -2.02e-7)
		tmp = x;
	elseif (t <= 62.0)
		tmp = z / b;
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.5e+158], N[(x / a), $MachinePrecision], If[LessEqual[t, -2.02e-7], x, If[LessEqual[t, 62.0], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.5 \cdot 10^{+158}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;t \leq -2.02 \cdot 10^{-7}:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 62:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5e158 or 62 < t

    1. Initial program 83.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative83.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 75.7%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    5. Taylor expanded in a around inf 43.4%

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

    if -1.5e158 < t < -2.02000000000000009e-7

    1. Initial program 89.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative89.6%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around inf 61.1%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    5. Taylor expanded in a around 0 45.8%

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

    if -2.02000000000000009e-7 < t < 62

    1. Initial program 62.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative62.2%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 57.6%

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.5 \cdot 10^{+158}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq -2.02 \cdot 10^{-7}:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 62:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 12: 55.7% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.35 \cdot 10^{+89} \lor \neg \left(y \leq 10^{-20}\right):\\
\;\;\;\;\frac{z}{b}\\

\mathbf{else}:\\
\;\;\;\;\frac{x}{a + 1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.35000000000000011e89 or 9.99999999999999945e-21 < y

    1. Initial program 49.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative49.8%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around 0 62.5%

      \[\leadsto \color{blue}{\frac{z}{b}} \]

    if -2.35000000000000011e89 < y < 9.99999999999999945e-21

    1. Initial program 92.9%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative92.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around inf 65.1%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification63.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.35 \cdot 10^{+89} \lor \neg \left(y \leq 10^{-20}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 13: 40.6% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2 \cdot 10^{-27} \lor \neg \left(a \leq 9.5 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -2.0000000000000001e-27 or 9.50000000000000029e-24 < a

    1. Initial program 72.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative72.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around inf 54.8%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    5. Taylor expanded in a around inf 47.1%

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

    if -2.0000000000000001e-27 < a < 9.50000000000000029e-24

    1. Initial program 74.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Step-by-step derivation
      1. *-commutative74.1%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in t around inf 37.1%

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    5. Taylor expanded in a around 0 37.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2 \cdot 10^{-27} \lor \neg \left(a \leq 9.5 \cdot 10^{-24}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 14: 19.8% accurate, 17.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 73.2%

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
  2. Step-by-step derivation
    1. *-commutative73.2%

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
  4. Taylor expanded in t around inf 42.2%

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  5. Taylor expanded in a around 0 20.3%

    \[\leadsto \color{blue}{x} \]
  6. Final simplification20.3%

    \[\leadsto x \]

Developer target: 78.4% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\ \mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1
         (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))
   (if (< t -1.3659085366310088e-271)
     t_1
     (if (< t 3.036967103737246e-130) (/ z b) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
	double tmp;
	if (t < -1.3659085366310088e-271) {
		tmp = t_1;
	} else if (t < 3.036967103737246e-130) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    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), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = 1.0d0 * ((x + ((y / t) * z)) * (1.0d0 / ((a + 1.0d0) + ((y / t) * b))))
    if (t < (-1.3659085366310088d-271)) then
        tmp = t_1
    else if (t < 3.036967103737246d-130) then
        tmp = z / b
    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 b) {
	double t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
	double tmp;
	if (t < -1.3659085366310088e-271) {
		tmp = t_1;
	} else if (t < 3.036967103737246e-130) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))))
	tmp = 0
	if t < -1.3659085366310088e-271:
		tmp = t_1
	elif t < 3.036967103737246e-130:
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(1.0 * Float64(Float64(x + Float64(Float64(y / t) * z)) * Float64(1.0 / Float64(Float64(a + 1.0) + Float64(Float64(y / t) * b)))))
	tmp = 0.0
	if (t < -1.3659085366310088e-271)
		tmp = t_1;
	elseif (t < 3.036967103737246e-130)
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = 1.0 * ((x + ((y / t) * z)) * (1.0 / ((a + 1.0) + ((y / t) * b))));
	tmp = 0.0;
	if (t < -1.3659085366310088e-271)
		tmp = t_1;
	elseif (t < 3.036967103737246e-130)
		tmp = z / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 * N[(N[(x + N[(N[(y / t), $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision] * N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y / t), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[Less[t, -1.3659085366310088e-271], t$95$1, If[Less[t, 3.036967103737246e-130], N[(z / b), $MachinePrecision], t$95$1]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := 1 \cdot \left(\left(x + \frac{y}{t} \cdot z\right) \cdot \frac{1}{\left(a + 1\right) + \frac{y}{t} \cdot b}\right)\\
\mathbf{if}\;t < -1.3659085366310088 \cdot 10^{-271}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023318 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))

  (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))