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

Percentage Accurate: 75.1% → 90.8%
Time: 15.1s
Alternatives: 15
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 15 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.1% 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: 90.8% 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}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-318}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;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 t) (/ z (+ 1.0 (fma y (/ b t) a))))
     (if (<= t_1 -2e-318)
       (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ b (/ t y)))))
       (if (<= t_1 0.0)
         (+ (/ (* t (/ x b)) y) (/ z b))
         (if (<= t_1 5e+292) 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 / t) * (z / (1.0 + fma(y, (b / t), a)));
	} else if (t_1 <= -2e-318) {
		tmp = (x + (z * (y / t))) / (a + (1.0 + (b / (t / y))));
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) / y) + (z / b);
	} else if (t_1 <= 5e+292) {
		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 / t) * Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))));
	elseif (t_1 <= -2e-318)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(b / Float64(t / y)))));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) / y) + Float64(z / b));
	elseif (t_1 <= 5e+292)
		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 / t), $MachinePrecision] * N[(z / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-318], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+292], 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}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;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 30.6%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified59.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 49.2%

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    5. Step-by-step derivation
      1. times-frac87.2%

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. associate-/r/99.5%

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

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

    if -2.0000024e-318 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac74.4%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{t}{y}} + \frac{z}{b} \]
    7. Simplified74.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{b} \cdot t}{y}} + \frac{z}{b} \]
    9. Applied egg-rr81.6%

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e292

    1. Initial program 99.7%

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

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

    1. Initial program 6.3%

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

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

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

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

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

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

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

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

    \[\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}{t} \cdot \frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-318}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+292}:\\ \;\;\;\;\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: 90.3% 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)}\\ t_2 := \frac{b}{\frac{t}{y}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t_2\right)}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-318}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + t_2\right)}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+292}:\\ \;\;\;\;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))))
        (t_2 (/ b (/ t y))))
   (if (<= t_1 (- INFINITY))
     (* (/ y t) (/ z (+ 1.0 (+ a t_2))))
     (if (<= t_1 -2e-318)
       (/ (+ x (* z (/ y t))) (+ a (+ 1.0 t_2)))
       (if (<= t_1 0.0)
         (+ (/ (* t (/ x b)) y) (/ z b))
         (if (<= t_1 5e+292) 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 t_2 = b / (t / y);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (y / t) * (z / (1.0 + (a + t_2)));
	} else if (t_1 <= -2e-318) {
		tmp = (x + (z * (y / t))) / (a + (1.0 + t_2));
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) / y) + (z / b);
	} else if (t_1 <= 5e+292) {
		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 t_2 = b / (t / y);
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (y / t) * (z / (1.0 + (a + t_2)));
	} else if (t_1 <= -2e-318) {
		tmp = (x + (z * (y / t))) / (a + (1.0 + t_2));
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) / y) + (z / b);
	} else if (t_1 <= 5e+292) {
		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))
	t_2 = b / (t / y)
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (y / t) * (z / (1.0 + (a + t_2)))
	elif t_1 <= -2e-318:
		tmp = (x + (z * (y / t))) / (a + (1.0 + t_2))
	elif t_1 <= 0.0:
		tmp = ((t * (x / b)) / y) + (z / b)
	elif t_1 <= 5e+292:
		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)))
	t_2 = Float64(b / Float64(t / y))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(y / t) * Float64(z / Float64(1.0 + Float64(a + t_2))));
	elseif (t_1 <= -2e-318)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + t_2)));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) / y) + Float64(z / b));
	elseif (t_1 <= 5e+292)
		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));
	t_2 = b / (t / y);
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (y / t) * (z / (1.0 + (a + t_2)));
	elseif (t_1 <= -2e-318)
		tmp = (x + (z * (y / t))) / (a + (1.0 + t_2));
	elseif (t_1 <= 0.0)
		tmp = ((t * (x / b)) / y) + (z / b);
	elseif (t_1 <= 5e+292)
		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]}, Block[{t$95$2 = N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(1.0 + N[(a + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-318], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+292], 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)}\\
t_2 := \frac{b}{\frac{t}{y}}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{1 + \left(a + t_2\right)}\\

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+292}:\\
\;\;\;\;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 30.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. associate-/r/48.6%

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. associate-/r/99.5%

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

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

    if -2.0000024e-318 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 55.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac74.4%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{t}{y}} + \frac{z}{b} \]
    7. Simplified74.4%

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

        \[\leadsto \color{blue}{\frac{\frac{x}{b} \cdot t}{y}} + \frac{z}{b} \]
    9. Applied egg-rr81.6%

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999996e292

    1. Initial program 99.7%

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

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

    1. Initial program 6.3%

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

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

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

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

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

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

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

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

    \[\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}{t} \cdot \frac{z}{1 + \left(a + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -2 \cdot 10^{-318}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b}}{y} + \frac{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+292}:\\ \;\;\;\;\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: 82.2% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-156} \lor \neg \left(t \leq 2.6 \cdot 10^{-102}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.80000000000000008e-156 or 2.59999999999999986e-102 < t

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. associate-/r/92.0%

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

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

    if -3.80000000000000008e-156 < t < 2.59999999999999986e-102

    1. Initial program 59.7%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified40.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 61.6%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac71.1%

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

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

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

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

Alternative 4: 81.7% accurate, 0.8× speedup?

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-102}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


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

    1. Initial program 83.3%

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

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

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

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

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

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

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

    if -2.29999999999999989e-157 < t < 2.59999999999999986e-102

    1. Initial program 59.7%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified40.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 61.6%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac71.1%

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

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

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

    if 2.59999999999999986e-102 < t

    1. Initial program 87.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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. associate-/r/90.2%

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

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

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

Alternative 5: 59.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.88 \lor \neg \left(t \leq 3.8 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.880000000000000004 or 3.8e-38 < t

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 62.8%

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

    if -0.880000000000000004 < t < 3.8e-38

    1. Initial program 69.8%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified57.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 53.1%

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{y \cdot b}} + \frac{z}{b} \]
    7. Simplified67.9%

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

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

Alternative 6: 60.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.8 \lor \neg \left(t \leq 7 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.8000000000000007 or 7.0000000000000003e-38 < t

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 62.8%

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

    if -9.8000000000000007 < t < 7.0000000000000003e-38

    1. Initial program 69.8%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified57.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 53.1%

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

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

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

Alternative 7: 64.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-70} \lor \neg \left(t \leq 4 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.7999999999999998e-70 or 3.9999999999999998e-38 < t

    1. Initial program 86.4%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 inf 68.7%

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

    if -3.7999999999999998e-70 < t < 3.9999999999999998e-38

    1. Initial program 66.2%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified52.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 55.4%

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

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

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

Alternative 8: 65.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.2 \cdot 10^{-71} \lor \neg \left(t \leq 1.4 \cdot 10^{-39}\right):\\
\;\;\;\;\frac{x}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.20000000000000004e-71 or 1.4000000000000001e-39 < t

    1. Initial program 86.4%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 inf 69.4%

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

    if -6.20000000000000004e-71 < t < 1.4000000000000001e-39

    1. Initial program 66.2%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified52.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 55.4%

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

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

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

Alternative 9: 69.4% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.9999999999999997e-71 or 2.4e-102 < t

    1. Initial program 84.9%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{t} \cdot z}}{1 + a} \]
    6. Applied egg-rr77.3%

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

    if -3.9999999999999997e-71 < t < 2.4e-102

    1. Initial program 65.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac68.1%

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

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

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

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

Alternative 10: 60.0% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.37 \lor \neg \left(t \leq 5 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.37 or 5.00000000000000033e-38 < t

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 62.8%

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

    if -0.37 < t < 5.00000000000000033e-38

    1. Initial program 69.8%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified57.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 53.1%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac61.2%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{t}{y}} + \frac{z}{b} \]
    7. Simplified61.2%

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

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

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

        \[\leadsto \frac{z + \color{blue}{x \cdot \frac{t}{y}}}{b} \]
    10. Simplified65.4%

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

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

Alternative 11: 60.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9 \lor \neg \left(t \leq 3.4 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9 or 3.4000000000000002e-38 < t

    1. Initial program 85.5%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified96.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 62.8%

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

    if -9 < t < 3.4000000000000002e-38

    1. Initial program 69.8%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified57.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 53.1%

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} + \frac{z}{b} \]
      2. times-frac61.2%

        \[\leadsto \color{blue}{\frac{x}{b} \cdot \frac{t}{y}} + \frac{z}{b} \]
    7. Simplified61.2%

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

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

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

Alternative 12: 41.6% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;t \leq -9.8:\\
\;\;\;\;x\\

\mathbf{elif}\;t \leq 7.5 \cdot 10^{-38}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -5.0000000000000002e151 or 7.5e-38 < t

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e151 < t < -9.8000000000000007

    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/95.3%

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified95.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 59.0%

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

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

    if -9.8000000000000007 < t < 7.5e-38

    1. Initial program 69.8%

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

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

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

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

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

        \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
    3. Simplified57.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 54.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{+151}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq -9.8:\\ \;\;\;\;x\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-38}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 13: 56.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -7.4 \cdot 10^{-34} \lor \neg \left(t \leq 2.1 \cdot 10^{-38}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.39999999999999976e-34 or 2.10000000000000013e-38 < t

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

    if -7.39999999999999976e-34 < t < 2.10000000000000013e-38

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

Alternative 14: 41.1% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 76.7%

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

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

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

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 79.4%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 1\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 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 78.0%

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

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

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

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

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

      \[\leadsto \frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \color{blue}{\frac{b}{t} \cdot y}\right)} \]
  3. Simplified77.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 inf 40.6%

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification17.8%

    \[\leadsto x \]

Developer target: 78.9% 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 2023310 
(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))))