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

Percentage Accurate: 75.1% → 88.7%
Time: 14.5s
Alternatives: 16
Speedup: 0.6×

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 16 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: 88.7% accurate, 0.1× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_1}\\

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

\mathbf{elif}\;t\_2 \leq 10^{+285}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 36.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 50.6%

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

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

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

        \[\leadsto \color{blue}{\frac{z}{b} - \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y}} \]
      4. sub-neg50.6%

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

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

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{t \cdot \left(-\frac{x}{b}\right)} + \left(--1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}{y} \]
      8. mul-1-neg50.6%

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg50.6%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg68.0%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative59.6%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in59.6%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified59.6%

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg68.0%

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -9.9999999999999998e-172 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e284

    1. Initial program 99.1%

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

    if -9.9999999999999998e-172 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.999999999999985e-310

    1. Initial program 92.5%

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

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

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

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

    if -4.999999999999985e-310 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 45.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 71.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative71.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg74.4%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg75.0%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative77.7%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in77.7%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified77.7%

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

    if 9.9999999999999998e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 14.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative58.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg58.8%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg83.2%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative83.4%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified83.4%

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    9. Step-by-step derivation
      1. associate-/l*83.5%

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

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

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

Alternative 2: 90.8% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-310}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t\_2 \leq 10^{+285}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 36.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in z around inf 91.3%

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -4.999999999999985e-310 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 9.9999999999999998e284

    1. Initial program 98.3%

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

    if -4.999999999999985e-310 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 45.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 71.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative71.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg74.4%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg75.0%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative77.7%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in77.7%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified77.7%

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

    if 9.9999999999999998e284 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 14.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.8%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative58.8%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg58.8%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg83.2%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative83.4%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified83.4%

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    9. Step-by-step derivation
      1. associate-/l*83.5%

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

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

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

Alternative 3: 52.8% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+36}:\\
\;\;\;\;\frac{t\_1}{\frac{y \cdot b}{t} + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -4.99999999999999973e48

    1. Initial program 83.5%

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

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

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

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

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

    if -4.99999999999999973e48 < (+.f64 a #s(literal 1 binary64)) < 1

    1. Initial program 75.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.4%

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

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

    if 1 < (+.f64 a #s(literal 1 binary64)) < 4.99999999999999977e36

    1. Initial program 90.1%

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

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

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

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

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

    if 4.99999999999999977e36 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 81.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 75.2%

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

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

Alternative 4: 55.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+47}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-277}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+76}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= a -1.35e+47)
     (/ (+ x (* y (/ z t))) a)
     (if (<= a -1.9e-38)
       t_1
       (if (<= a -8e-136)
         (/ x (+ (* y (/ b t)) 1.0))
         (if (<= a -1.42e-277)
           (+ x (* z (/ y t)))
           (if (<= a 7e+76) t_1 (/ (+ x (/ (* y z) t)) a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (a <= -1.35e+47) {
		tmp = (x + (y * (z / t))) / a;
	} else if (a <= -1.9e-38) {
		tmp = t_1;
	} else if (a <= -8e-136) {
		tmp = x / ((y * (b / t)) + 1.0);
	} else if (a <= -1.42e-277) {
		tmp = x + (z * (y / t));
	} else if (a <= 7e+76) {
		tmp = t_1;
	} else {
		tmp = (x + ((y * z) / t)) / 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) :: t_1
    real(8) :: tmp
    t_1 = (z + (t * (x / y))) / b
    if (a <= (-1.35d+47)) then
        tmp = (x + (y * (z / t))) / a
    else if (a <= (-1.9d-38)) then
        tmp = t_1
    else if (a <= (-8d-136)) then
        tmp = x / ((y * (b / t)) + 1.0d0)
    else if (a <= (-1.42d-277)) then
        tmp = x + (z * (y / t))
    else if (a <= 7d+76) then
        tmp = t_1
    else
        tmp = (x + ((y * z) / t)) / a
    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 = (z + (t * (x / y))) / b;
	double tmp;
	if (a <= -1.35e+47) {
		tmp = (x + (y * (z / t))) / a;
	} else if (a <= -1.9e-38) {
		tmp = t_1;
	} else if (a <= -8e-136) {
		tmp = x / ((y * (b / t)) + 1.0);
	} else if (a <= -1.42e-277) {
		tmp = x + (z * (y / t));
	} else if (a <= 7e+76) {
		tmp = t_1;
	} else {
		tmp = (x + ((y * z) / t)) / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if a <= -1.35e+47:
		tmp = (x + (y * (z / t))) / a
	elif a <= -1.9e-38:
		tmp = t_1
	elif a <= -8e-136:
		tmp = x / ((y * (b / t)) + 1.0)
	elif a <= -1.42e-277:
		tmp = x + (z * (y / t))
	elif a <= 7e+76:
		tmp = t_1
	else:
		tmp = (x + ((y * z) / t)) / a
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (a <= -1.35e+47)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / a);
	elseif (a <= -1.9e-38)
		tmp = t_1;
	elseif (a <= -8e-136)
		tmp = Float64(x / Float64(Float64(y * Float64(b / t)) + 1.0));
	elseif (a <= -1.42e-277)
		tmp = Float64(x + Float64(z * Float64(y / t)));
	elseif (a <= 7e+76)
		tmp = t_1;
	else
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (a <= -1.35e+47)
		tmp = (x + (y * (z / t))) / a;
	elseif (a <= -1.9e-38)
		tmp = t_1;
	elseif (a <= -8e-136)
		tmp = x / ((y * (b / t)) + 1.0);
	elseif (a <= -1.42e-277)
		tmp = x + (z * (y / t));
	elseif (a <= 7e+76)
		tmp = t_1;
	else
		tmp = (x + ((y * z) / t)) / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[a, -1.35e+47], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[a, -1.9e-38], t$95$1, If[LessEqual[a, -8e-136], N[(x / N[(N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, -1.42e-277], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 7e+76], t$95$1, N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -1.9 \cdot 10^{-38}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq -8 \cdot 10^{-136}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\

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

\mathbf{elif}\;a \leq 7 \cdot 10^{+76}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 83.5%

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

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

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

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

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

    if -1.34999999999999998e47 < a < -1.9e-38 or -1.4199999999999999e-277 < a < 7.00000000000000001e76

    1. Initial program 73.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 51.0%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative51.0%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg51.8%

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative56.3%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified56.3%

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg57.7%

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg57.7%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*58.0%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    11. Simplified58.0%

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

    if -1.9e-38 < a < -8.00000000000000001e-136

    1. Initial program 88.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 72.8%

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{y \cdot \frac{b}{t}}} \]
    6. Simplified72.9%

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

    if -8.00000000000000001e-136 < a < -1.4199999999999999e-277

    1. Initial program 78.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 78.6%

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

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

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

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

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

    if 7.00000000000000001e76 < a

    1. Initial program 83.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 78.7%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+47}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-136}:\\ \;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\ \mathbf{elif}\;a \leq -1.42 \cdot 10^{-277}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 7 \cdot 10^{+76}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 42.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.6 \cdot 10^{+43}:\\
\;\;\;\;\frac{x}{a}\\

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

\mathbf{elif}\;a \leq 4 \cdot 10^{-281}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.2 \cdot 10^{-114}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;a \leq 6 \cdot 10^{-90}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 1.1 \cdot 10^{+77}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.60000000000000021e43 or 1.1e77 < a

    1. Initial program 83.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 61.0%

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

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

    if -2.60000000000000021e43 < a < -1.85e-38 or 4.0000000000000001e-281 < a < 6.2e-114 or 6.00000000000000041e-90 < a < 1.1e77

    1. Initial program 71.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 49.5%

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

    if -1.85e-38 < a < 4.0000000000000001e-281 or 6.2e-114 < a < 6.00000000000000041e-90

    1. Initial program 82.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 47.2%

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

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

Alternative 6: 68.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.3 \cdot 10^{+39}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\

\mathbf{elif}\;y \leq 6.8 \cdot 10^{+24}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

\mathbf{elif}\;y \leq 1.9 \cdot 10^{+52} \lor \neg \left(y \leq 3.65 \cdot 10^{+174}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x}{y} \cdot \frac{t}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.3e39

    1. Initial program 65.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 52.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg62.8%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative60.4%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified60.4%

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg63.0%

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*68.6%

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

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

    if -1.3e39 < y < 6.8000000000000001e24

    1. Initial program 92.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 78.1%

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

    if 6.8000000000000001e24 < y < 1.9e52 or 3.6500000000000002e174 < y

    1. Initial program 39.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 68.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative68.3%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \color{blue}{\left(-\frac{t \cdot x}{b \cdot y}\right)} \]
      2. times-frac89.3%

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

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

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

        \[\leadsto \frac{z}{b} - \color{blue}{\frac{-1 \cdot t}{b}} \cdot \frac{x}{y} \]
      6. neg-mul-189.3%

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

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

    if 1.9e52 < y < 3.6500000000000002e174

    1. Initial program 80.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+39}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq 6.8 \cdot 10^{+24}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+52} \lor \neg \left(y \leq 3.65 \cdot 10^{+174}\right):\\ \;\;\;\;\frac{z}{b} + \frac{x}{y} \cdot \frac{t}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 68.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{if}\;y \leq -1.3 \cdot 10^{+40}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+24}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+52} \lor \neg \left(y \leq 1.2 \cdot 10^{+177}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (* t (/ x y))) b)))
   (if (<= y -1.3e+40)
     t_1
     (if (<= y 2.7e+24)
       (/ (+ x (/ (* y z) t)) (+ a 1.0))
       (if (or (<= y 2.3e+52) (not (<= y 1.2e+177)))
         t_1
         (/ (+ x (* y (/ z t))) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -1.3e+40) {
		tmp = t_1;
	} else if (y <= 2.7e+24) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 2.3e+52) || !(y <= 1.2e+177)) {
		tmp = t_1;
	} else {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z + (t * (x / y))) / b
    if (y <= (-1.3d+40)) then
        tmp = t_1
    else if (y <= 2.7d+24) then
        tmp = (x + ((y * z) / t)) / (a + 1.0d0)
    else if ((y <= 2.3d+52) .or. (.not. (y <= 1.2d+177))) then
        tmp = t_1
    else
        tmp = (x + (y * (z / t))) / (a + 1.0d0)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t * (x / y))) / b;
	double tmp;
	if (y <= -1.3e+40) {
		tmp = t_1;
	} else if (y <= 2.7e+24) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else if ((y <= 2.3e+52) || !(y <= 1.2e+177)) {
		tmp = t_1;
	} else {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t * (x / y))) / b
	tmp = 0
	if y <= -1.3e+40:
		tmp = t_1
	elif y <= 2.7e+24:
		tmp = (x + ((y * z) / t)) / (a + 1.0)
	elif (y <= 2.3e+52) or not (y <= 1.2e+177):
		tmp = t_1
	else:
		tmp = (x + (y * (z / t))) / (a + 1.0)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t * Float64(x / y))) / b)
	tmp = 0.0
	if (y <= -1.3e+40)
		tmp = t_1;
	elseif (y <= 2.7e+24)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	elseif ((y <= 2.3e+52) || !(y <= 1.2e+177))
		tmp = t_1;
	else
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t * (x / y))) / b;
	tmp = 0.0;
	if (y <= -1.3e+40)
		tmp = t_1;
	elseif (y <= 2.7e+24)
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	elseif ((y <= 2.3e+52) || ~((y <= 1.2e+177)))
		tmp = t_1;
	else
		tmp = (x + (y * (z / t))) / (a + 1.0);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t * N[(x / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -1.3e+40], t$95$1, If[LessEqual[y, 2.7e+24], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[y, 2.3e+52], N[Not[LessEqual[y, 1.2e+177]], $MachinePrecision]], t$95$1, N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 2.7 \cdot 10^{+24}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

\mathbf{elif}\;y \leq 2.3 \cdot 10^{+52} \lor \neg \left(y \leq 1.2 \cdot 10^{+177}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.3e40 or 2.7e24 < y < 2.3e52 or 1.2e177 < y

    1. Initial program 55.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.5%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{t \cdot \left(-\frac{x}{b}\right)} + \left(--1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}{y} \]
      8. mul-1-neg59.6%

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg59.6%

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative69.1%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in69.1%

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg71.8%

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg71.8%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*75.5%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    11. Simplified75.5%

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

    if -1.3e40 < y < 2.7e24

    1. Initial program 92.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0 78.1%

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

    if 2.3e52 < y < 1.2e177

    1. Initial program 80.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+40}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq 2.7 \cdot 10^{+24}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 2.3 \cdot 10^{+52} \lor \neg \left(y \leq 1.2 \cdot 10^{+177}\right):\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 66.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{-73}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.15 \cdot 10^{-43}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8500000000000001e-117 or 2.25e-73 < t < 1.1499999999999999e-43

    1. Initial program 85.2%

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

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

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

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

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

    if -1.8500000000000001e-117 < t < 2.25e-73 or 1.1499999999999999e-43 < t < 18000

    1. Initial program 66.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 58.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg57.8%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg69.2%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative66.0%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in66.0%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified66.0%

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

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

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg69.9%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*68.0%

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

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

    if 18000 < t

    1. Initial program 89.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 74.6%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*81.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.85 \cdot 10^{-117}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{-73}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;t \leq 1.15 \cdot 10^{-43}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 18000:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + \frac{b}{\frac{t}{y}}\right) + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 49.7% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -1 \cdot 10^{+44}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\

\mathbf{elif}\;a + 1 \leq 1:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -1.0000000000000001e44

    1. Initial program 84.1%

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

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

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

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

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

    if -1.0000000000000001e44 < (+.f64 a #s(literal 1 binary64)) < 1

    1. Initial program 75.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.0%

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

    if 1 < (+.f64 a #s(literal 1 binary64)) < 4.99999999999999977e36

    1. Initial program 90.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.6%

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

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

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

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

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

    if 4.99999999999999977e36 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 81.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 75.2%

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

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

Alternative 10: 49.7% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a + 1 \leq 1:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;a + 1 \leq 5 \cdot 10^{+36}:\\
\;\;\;\;\frac{x}{y \cdot \frac{b}{t} + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -1.0000000000000001e44 or 4.99999999999999977e36 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 82.7%

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

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

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

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

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

    if -1.0000000000000001e44 < (+.f64 a #s(literal 1 binary64)) < 1

    1. Initial program 75.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 39.0%

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

    if 1 < (+.f64 a #s(literal 1 binary64)) < 4.99999999999999977e36

    1. Initial program 90.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 71.6%

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

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

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

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

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

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

Alternative 11: 81.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+109}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2000000000000001e109

    1. Initial program 61.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 55.4%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg55.3%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg68.2%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative63.4%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified63.4%

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

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

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg68.4%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*73.5%

        \[\leadsto \frac{z + \color{blue}{t \cdot \frac{x}{y}}}{b} \]
    11. Simplified73.5%

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

    if -3.2000000000000001e109 < y < 3.9999999999999997e175

    1. Initial program 90.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 90.2%

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

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

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

    if 3.9999999999999997e175 < y

    1. Initial program 24.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 63.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg63.5%

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

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

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

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

        \[\leadsto \frac{z}{b} - \color{blue}{\left(-\frac{t \cdot x}{b \cdot y}\right)} \]
      2. times-frac86.6%

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

        \[\leadsto \frac{z}{b} - \color{blue}{\left(-\frac{t}{b}\right) \cdot \frac{x}{y}} \]
      4. mul-1-neg86.6%

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

        \[\leadsto \frac{z}{b} - \color{blue}{\frac{-1 \cdot t}{b}} \cdot \frac{x}{y} \]
      6. neg-mul-186.6%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{-t}}{b} \cdot \frac{x}{y} \]
    8. Simplified86.6%

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

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

Alternative 12: 81.4% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{+93}:\\
\;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.2000000000000001e93

    1. Initial program 62.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 52.9%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{t \cdot \left(-\frac{x}{b}\right)} + \left(--1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}{y} \]
      8. mul-1-neg55.0%

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg55.0%

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative62.4%

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

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{\frac{x}{b} \cdot \left(-t\right)}}{y} \]
    8. Simplified62.4%

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg64.8%

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg64.8%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*71.7%

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

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

    if -3.2000000000000001e93 < y < 1.15999999999999994e172

    1. Initial program 90.6%

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

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

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

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

    if 1.15999999999999994e172 < y

    1. Initial program 24.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 63.5%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg63.5%

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

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

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

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

        \[\leadsto \frac{z}{b} - \color{blue}{\left(-\frac{t \cdot x}{b \cdot y}\right)} \]
      2. times-frac86.6%

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

        \[\leadsto \frac{z}{b} - \color{blue}{\left(-\frac{t}{b}\right) \cdot \frac{x}{y}} \]
      4. mul-1-neg86.6%

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

        \[\leadsto \frac{z}{b} - \color{blue}{\frac{-1 \cdot t}{b}} \cdot \frac{x}{y} \]
      6. neg-mul-186.6%

        \[\leadsto \frac{z}{b} - \frac{\color{blue}{-t}}{b} \cdot \frac{x}{y} \]
    8. Simplified86.6%

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

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

Alternative 13: 63.9% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.70000000000000017e-117 or 18000 < t

    1. Initial program 86.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf 68.7%

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. associate-/l*73.3%

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

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

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

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

    if -1.70000000000000017e-117 < t < 18000

    1. Initial program 68.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around -inf 55.3%

      \[\leadsto \color{blue}{-1 \cdot \frac{-1 \cdot \frac{t \cdot x}{b} - -1 \cdot \frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}} \]
    4. Step-by-step derivation
      1. +-commutative55.3%

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

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

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

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

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

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

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

        \[\leadsto \frac{z}{b} - \frac{t \cdot \left(-\frac{x}{b}\right) + \left(-\color{blue}{\left(-\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2}}\right)}\right)}{y} \]
      9. remove-double-neg54.4%

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

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

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

      \[\leadsto \frac{z}{b} - \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} \]
    7. Step-by-step derivation
      1. mul-1-neg65.0%

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

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} \]
      3. *-commutative62.1%

        \[\leadsto \frac{z}{b} - \frac{-\color{blue}{\frac{x}{b} \cdot t}}{y} \]
      4. distribute-rgt-neg-in62.1%

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

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

      \[\leadsto \color{blue}{\frac{z - -1 \cdot \frac{t \cdot x}{y}}{b}} \]
    10. Step-by-step derivation
      1. sub-neg65.6%

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

        \[\leadsto \frac{z + \left(-\color{blue}{\left(-\frac{t \cdot x}{y}\right)}\right)}{b} \]
      3. remove-double-neg65.6%

        \[\leadsto \frac{z + \color{blue}{\frac{t \cdot x}{y}}}{b} \]
      4. associate-/l*63.9%

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

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

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

Alternative 14: 56.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -5 \cdot 10^{-51} \lor \neg \left(t \leq 480000\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 -5e-51) (not (<= t 480000.0))) (/ x (+ a 1.0)) (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -5e-51) || !(t <= 480000.0)) {
		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 <= (-5d-51)) .or. (.not. (t <= 480000.0d0))) 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 <= -5e-51) || !(t <= 480000.0)) {
		tmp = x / (a + 1.0);
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -5e-51) or not (t <= 480000.0):
		tmp = x / (a + 1.0)
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -5e-51) || !(t <= 480000.0))
		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 <= -5e-51) || ~((t <= 480000.0)))
		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, -5e-51], N[Not[LessEqual[t, 480000.0]], $MachinePrecision]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.00000000000000004e-51 or 4.8e5 < t

    1. Initial program 87.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 65.1%

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

    if -5.00000000000000004e-51 < t < 4.8e5

    1. Initial program 70.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf 52.5%

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

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

Alternative 15: 41.6% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 79.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 54.1%

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

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

    if -1.5 < a < 5.19999999999999954e-4

    1. Initial program 78.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0 35.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.5 \lor \neg \left(a \leq 0.00052\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 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.7%

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0 44.4%

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

    \[\leadsto \color{blue}{x} \]
  5. Add Preprocessing

Developer target: 79.0% accurate, 0.5× 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 2024096 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :alt
  (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))))