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

Percentage Accurate: 74.7% → 83.4%
Time: 16.0s
Alternatives: 14
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 14 alternatives:

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

Initial Program: 74.7% 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: 83.4% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;t \leq 1.85 \cdot 10^{-38}:\\
\;\;\;\;z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.5e-180 or 1.85e-38 < t

    1. Initial program 80.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. *-un-lft-identity80.7%

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

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

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

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

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

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

    if -1.5e-180 < t < 1.60000000000000007e-214

    1. Initial program 43.7%

      \[\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 inf 50.4%

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

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

    if 1.60000000000000007e-214 < t < 1.85e-38

    1. Initial program 76.2%

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

      \[\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)} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.8%

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

Alternative 2: 87.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

\mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+295}:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 83.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. *-commutative83.6%

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

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

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

    if -9.9999999999999996e-82 < (/.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 76.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. associate-/l*80.8%

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

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

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

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

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

    1. Initial program 99.8%

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

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

    1. Initial program 5.9%

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

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

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

Alternative 3: 68.7% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ t_2 := \frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-103}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-193}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-159}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{-86}:\\ \;\;\;\;t\_2\\ \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 (/ (+ x (/ y (/ t z))) (+ a 1.0)))
        (t_2 (+ (/ z b) (/ (* t x) (* y b)))))
   (if (<= t -1.6e+91)
     t_1
     (if (<= t -1.55e+73)
       (/ z b)
       (if (<= t -8.2e-103)
         t_1
         (if (<= t 1.6e-193)
           t_2
           (if (<= t 7.8e-159)
             (/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
             (if (<= t 1.52e-86) t_2 (/ (+ x (* y (/ z t))) (+ a 1.0))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y / (t / z))) / (a + 1.0);
	double t_2 = (z / b) + ((t * x) / (y * b));
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -8.2e-103) {
		tmp = t_1;
	} else if (t <= 1.6e-193) {
		tmp = t_2;
	} else if (t <= 7.8e-159) {
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	} else if (t <= 1.52e-86) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (x + (y / (t / z))) / (a + 1.0d0)
    t_2 = (z / b) + ((t * x) / (y * b))
    if (t <= (-1.6d+91)) then
        tmp = t_1
    else if (t <= (-1.55d+73)) then
        tmp = z / b
    else if (t <= (-8.2d-103)) then
        tmp = t_1
    else if (t <= 1.6d-193) then
        tmp = t_2
    else if (t <= 7.8d-159) then
        tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
    else if (t <= 1.52d-86) then
        tmp = t_2
    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 = (x + (y / (t / z))) / (a + 1.0);
	double t_2 = (z / b) + ((t * x) / (y * b));
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -8.2e-103) {
		tmp = t_1;
	} else if (t <= 1.6e-193) {
		tmp = t_2;
	} else if (t <= 7.8e-159) {
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	} else if (t <= 1.52e-86) {
		tmp = t_2;
	} else {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y / (t / z))) / (a + 1.0)
	t_2 = (z / b) + ((t * x) / (y * b))
	tmp = 0
	if t <= -1.6e+91:
		tmp = t_1
	elif t <= -1.55e+73:
		tmp = z / b
	elif t <= -8.2e-103:
		tmp = t_1
	elif t <= 1.6e-193:
		tmp = t_2
	elif t <= 7.8e-159:
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))))
	elif t <= 1.52e-86:
		tmp = t_2
	else:
		tmp = (x + (y * (z / t))) / (a + 1.0)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0))
	t_2 = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b)))
	tmp = 0.0
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = Float64(z / b);
	elseif (t <= -8.2e-103)
		tmp = t_1;
	elseif (t <= 1.6e-193)
		tmp = t_2;
	elseif (t <= 7.8e-159)
		tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))));
	elseif (t <= 1.52e-86)
		tmp = t_2;
	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 = (x + (y / (t / z))) / (a + 1.0);
	t_2 = (z / b) + ((t * x) / (y * b));
	tmp = 0.0;
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = z / b;
	elseif (t <= -8.2e-103)
		tmp = t_1;
	elseif (t <= 1.6e-193)
		tmp = t_2;
	elseif (t <= 7.8e-159)
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	elseif (t <= 1.52e-86)
		tmp = t_2;
	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[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -8.2e-103], t$95$1, If[LessEqual[t, 1.6e-193], t$95$2, If[LessEqual[t, 7.8e-159], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.52e-86], t$95$2, 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{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
t_2 := \frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq -8.2 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 1.52 \cdot 10^{-86}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.59999999999999995e91 or -1.55e73 < t < -8.19999999999999992e-103

    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*87.5%

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

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

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

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

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

    if -1.59999999999999995e91 < t < -1.55e73

    1. Initial program 21.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 100.0%

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

    if -8.19999999999999992e-103 < t < 1.60000000000000003e-193 or 7.79999999999999953e-159 < t < 1.52e-86

    1. Initial program 56.5%

      \[\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 inf 49.2%

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

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

    if 1.60000000000000003e-193 < t < 7.79999999999999953e-159

    1. Initial program 99.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 0 99.5%

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

    if 1.52e-86 < t

    1. Initial program 81.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. *-un-lft-identity81.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-103}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-193}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{elif}\;t \leq 7.8 \cdot 10^{-159}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{-86}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 81.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot b}{t}\\ t_2 := \frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{if}\;t \leq -2 \cdot 10^{-180}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{-203}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{-152}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1 + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-125}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \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 (* y (/ b t)))))))
   (if (<= t -2e-180)
     t_2
     (if (<= t 1.1e-203)
       (+ (/ z b) (/ (* t x) (* y b)))
       (if (<= t 2e-152)
         (/ (+ x (* z (/ y t))) (+ t_1 (+ a 1.0)))
         (if (<= t 7.2e-125) (/ (* y z) (* t (+ 1.0 (+ a t_1)))) t_2))))))
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 + (y * (b / t))));
	double tmp;
	if (t <= -2e-180) {
		tmp = t_2;
	} else if (t <= 1.1e-203) {
		tmp = (z / b) + ((t * x) / (y * b));
	} else if (t <= 2e-152) {
		tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0));
	} else if (t <= 7.2e-125) {
		tmp = (y * z) / (t * (1.0 + (a + t_1)));
	} else {
		tmp = t_2;
	}
	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 = (y * b) / t
    t_2 = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
    if (t <= (-2d-180)) then
        tmp = t_2
    else if (t <= 1.1d-203) then
        tmp = (z / b) + ((t * x) / (y * b))
    else if (t <= 2d-152) then
        tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0d0))
    else if (t <= 7.2d-125) then
        tmp = (y * z) / (t * (1.0d0 + (a + t_1)))
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * b) / t;
	double t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
	double tmp;
	if (t <= -2e-180) {
		tmp = t_2;
	} else if (t <= 1.1e-203) {
		tmp = (z / b) + ((t * x) / (y * b));
	} else if (t <= 2e-152) {
		tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0));
	} else if (t <= 7.2e-125) {
		tmp = (y * z) / (t * (1.0 + (a + t_1)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (y * b) / t
	t_2 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))))
	tmp = 0
	if t <= -2e-180:
		tmp = t_2
	elif t <= 1.1e-203:
		tmp = (z / b) + ((t * x) / (y * b))
	elif t <= 2e-152:
		tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0))
	elif t <= 7.2e-125:
		tmp = (y * z) / (t * (1.0 + (a + t_1)))
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * b) / t)
	t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t)))))
	tmp = 0.0
	if (t <= -2e-180)
		tmp = t_2;
	elseif (t <= 1.1e-203)
		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b)));
	elseif (t <= 2e-152)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(t_1 + Float64(a + 1.0)));
	elseif (t <= 7.2e-125)
		tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + t_1))));
	else
		tmp = t_2;
	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 + (y * (b / t))));
	tmp = 0.0;
	if (t <= -2e-180)
		tmp = t_2;
	elseif (t <= 1.1e-203)
		tmp = (z / b) + ((t * x) / (y * b));
	elseif (t <= 2e-152)
		tmp = (x + (z * (y / t))) / (t_1 + (a + 1.0));
	elseif (t <= 7.2e-125)
		tmp = (y * z) / (t * (1.0 + (a + t_1)));
	else
		tmp = t_2;
	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[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2e-180], t$95$2, If[LessEqual[t, 1.1e-203], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2e-152], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(t$95$1 + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 7.2e-125], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 7.2 \cdot 10^{-125}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2e-180 or 7.2000000000000004e-125 < t

    1. Initial program 80.3%

      \[\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. *-un-lft-identity80.3%

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

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

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

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

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

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

    if -2e-180 < t < 1.1e-203

    1. Initial program 44.1%

      \[\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 inf 48.3%

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

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

    if 1.1e-203 < t < 2.00000000000000013e-152

    1. Initial program 99.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. *-commutative99.7%

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

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

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

    if 2.00000000000000013e-152 < t < 7.2000000000000004e-125

    1. Initial program 56.3%

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

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

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

Alternative 5: 81.7% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ t_2 := \frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{if}\;t \leq -9.2 \cdot 10^{-179}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-193}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-159}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-127}:\\ \;\;\;\;t\_2\\ \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 (+ 1.0 (* y (/ b t))))))
        (t_2 (+ (/ z b) (/ (* t x) (* y b)))))
   (if (<= t -9.2e-179)
     t_1
     (if (<= t 2.15e-193)
       t_2
       (if (<= t 1.95e-159)
         (/ (* y z) (* t (+ 1.0 (+ a (/ (* y b) t)))))
         (if (<= t 1.9e-127) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))));
	double t_2 = (z / b) + ((t * x) / (y * b));
	double tmp;
	if (t <= -9.2e-179) {
		tmp = t_1;
	} else if (t <= 2.15e-193) {
		tmp = t_2;
	} else if (t <= 1.95e-159) {
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	} else if (t <= 1.9e-127) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (x + (y * (z / t))) / (a + (1.0d0 + (y * (b / t))))
    t_2 = (z / b) + ((t * x) / (y * b))
    if (t <= (-9.2d-179)) then
        tmp = t_1
    else if (t <= 2.15d-193) then
        tmp = t_2
    else if (t <= 1.95d-159) then
        tmp = (y * z) / (t * (1.0d0 + (a + ((y * b) / t))))
    else if (t <= 1.9d-127) then
        tmp = t_2
    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 + (1.0 + (y * (b / t))));
	double t_2 = (z / b) + ((t * x) / (y * b));
	double tmp;
	if (t <= -9.2e-179) {
		tmp = t_1;
	} else if (t <= 2.15e-193) {
		tmp = t_2;
	} else if (t <= 1.95e-159) {
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	} else if (t <= 1.9e-127) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y * (z / t))) / (a + (1.0 + (y * (b / t))))
	t_2 = (z / b) + ((t * x) / (y * b))
	tmp = 0
	if t <= -9.2e-179:
		tmp = t_1
	elif t <= 2.15e-193:
		tmp = t_2
	elif t <= 1.95e-159:
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))))
	elif t <= 1.9e-127:
		tmp = t_2
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + Float64(1.0 + Float64(y * Float64(b / t)))))
	t_2 = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b)))
	tmp = 0.0
	if (t <= -9.2e-179)
		tmp = t_1;
	elseif (t <= 2.15e-193)
		tmp = t_2;
	elseif (t <= 1.95e-159)
		tmp = Float64(Float64(y * z) / Float64(t * Float64(1.0 + Float64(a + Float64(Float64(y * b) / t)))));
	elseif (t <= 1.9e-127)
		tmp = t_2;
	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 + (1.0 + (y * (b / t))));
	t_2 = (z / b) + ((t * x) / (y * b));
	tmp = 0.0;
	if (t <= -9.2e-179)
		tmp = t_1;
	elseif (t <= 2.15e-193)
		tmp = t_2;
	elseif (t <= 1.95e-159)
		tmp = (y * z) / (t * (1.0 + (a + ((y * b) / t))));
	elseif (t <= 1.9e-127)
		tmp = t_2;
	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] / N[(a + N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -9.2e-179], t$95$1, If[LessEqual[t, 2.15e-193], t$95$2, If[LessEqual[t, 1.95e-159], N[(N[(y * z), $MachinePrecision] / N[(t * N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-127], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.15 \cdot 10^{-193}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-127}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.1999999999999995e-179 or 1.90000000000000001e-127 < t

    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. *-un-lft-identity80.1%

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

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

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

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

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

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

    if -9.1999999999999995e-179 < t < 2.1500000000000001e-193 or 1.94999999999999988e-159 < t < 1.90000000000000001e-127

    1. Initial program 49.1%

      \[\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 inf 52.1%

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

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

    if 2.1500000000000001e-193 < t < 1.94999999999999988e-159

    1. Initial program 99.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 0 99.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9.2 \cdot 10^{-179}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;t \leq 2.15 \cdot 10^{-193}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{elif}\;t \leq 1.95 \cdot 10^{-159}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-127}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 68.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-101} \lor \neg \left(t \leq 5 \cdot 10^{-86}\right):\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (* y (/ z t))) (+ a 1.0))))
   (if (<= t -1.6e+91)
     t_1
     (if (<= t -1.55e+73)
       (/ z b)
       (if (or (<= t -2.4e-101) (not (<= t 5e-86)))
         t_1
         (+ (/ z b) (/ (* t x) (* y b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if ((t <= -2.4e-101) || !(t <= 5e-86)) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t * x) / (y * b));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (y * (z / t))) / (a + 1.0d0)
    if (t <= (-1.6d+91)) then
        tmp = t_1
    else if (t <= (-1.55d+73)) then
        tmp = z / b
    else if ((t <= (-2.4d-101)) .or. (.not. (t <= 5d-86))) then
        tmp = t_1
    else
        tmp = (z / b) + ((t * x) / (y * b))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if ((t <= -2.4e-101) || !(t <= 5e-86)) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t * x) / (y * b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y * (z / t))) / (a + 1.0)
	tmp = 0
	if t <= -1.6e+91:
		tmp = t_1
	elif t <= -1.55e+73:
		tmp = z / b
	elif (t <= -2.4e-101) or not (t <= 5e-86):
		tmp = t_1
	else:
		tmp = (z / b) + ((t * x) / (y * b))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = Float64(z / b);
	elseif ((t <= -2.4e-101) || !(t <= 5e-86))
		tmp = t_1;
	else
		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (y * (z / t))) / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = z / b;
	elseif ((t <= -2.4e-101) || ~((t <= 5e-86)))
		tmp = t_1;
	else
		tmp = (z / b) + ((t * x) / (y * b));
	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] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[Or[LessEqual[t, -2.4e-101], N[Not[LessEqual[t, 5e-86]], $MachinePrecision]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq -2.4 \cdot 10^{-101} \lor \neg \left(t \leq 5 \cdot 10^{-86}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.59999999999999995e91 or -1.55e73 < t < -2.4e-101 or 4.9999999999999999e-86 < t

    1. Initial program 82.0%

      \[\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. *-un-lft-identity82.0%

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

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

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

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

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

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

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

    if -1.59999999999999995e91 < t < -1.55e73

    1. Initial program 21.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 100.0%

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

    if -2.4e-101 < t < 4.9999999999999999e-86

    1. Initial program 59.9%

      \[\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 inf 47.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -2.4 \cdot 10^{-101} \lor \neg \left(t \leq 5 \cdot 10^{-86}\right):\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 62.7% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.8 \cdot 10^{+68}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq -7.2 \cdot 10^{-34} \lor \neg \left(t \leq 6.2 \cdot 10^{-117}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.59999999999999995e91 or -1.7999999999999999e68 < t < -7.20000000000000016e-34 or 6.20000000000000022e-117 < t

    1. Initial program 81.4%

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

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

    if -1.59999999999999995e91 < t < -1.7999999999999999e68

    1. Initial program 34.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 84.2%

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

    if -7.20000000000000016e-34 < t < 6.20000000000000022e-117

    1. Initial program 63.4%

      \[\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 inf 47.5%

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

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

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

Alternative 8: 59.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq -4.4 \cdot 10^{-34} \lor \neg \left(t \leq 5.3 \cdot 10^{-86}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.59999999999999995e91 or -9.5000000000000002e67 < t < -4.3999999999999998e-34 or 5.2999999999999997e-86 < t

    1. Initial program 80.9%

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

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

    if -1.59999999999999995e91 < t < -9.5000000000000002e67

    1. Initial program 34.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 84.2%

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

    if -4.3999999999999998e-34 < t < 5.2999999999999997e-86

    1. Initial program 65.0%

      \[\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 inf 47.6%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -9.5 \cdot 10^{+67}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-34} \lor \neg \left(t \leq 5.3 \cdot 10^{-86}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 68.8% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-102}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-86}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot 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
 (let* ((t_1 (/ (+ x (/ y (/ t z))) (+ a 1.0))))
   (if (<= t -1.6e+91)
     t_1
     (if (<= t -1.55e+73)
       (/ z b)
       (if (<= t -1.75e-102)
         t_1
         (if (<= t 4.8e-86)
           (+ (/ z b) (/ (* t x) (* y b)))
           (/ (+ x (* y (/ z t))) (+ a 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y / (t / z))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -1.75e-102) {
		tmp = t_1;
	} else if (t <= 4.8e-86) {
		tmp = (z / b) + ((t * x) / (y * 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) :: t_1
    real(8) :: tmp
    t_1 = (x + (y / (t / z))) / (a + 1.0d0)
    if (t <= (-1.6d+91)) then
        tmp = t_1
    else if (t <= (-1.55d+73)) then
        tmp = z / b
    else if (t <= (-1.75d-102)) then
        tmp = t_1
    else if (t <= 4.8d-86) then
        tmp = (z / b) + ((t * x) / (y * 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 t_1 = (x + (y / (t / z))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -1.75e-102) {
		tmp = t_1;
	} else if (t <= 4.8e-86) {
		tmp = (z / b) + ((t * x) / (y * b));
	} else {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y / (t / z))) / (a + 1.0)
	tmp = 0
	if t <= -1.6e+91:
		tmp = t_1
	elif t <= -1.55e+73:
		tmp = z / b
	elif t <= -1.75e-102:
		tmp = t_1
	elif t <= 4.8e-86:
		tmp = (z / b) + ((t * x) / (y * b))
	else:
		tmp = (x + (y * (z / t))) / (a + 1.0)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y / Float64(t / z))) / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = Float64(z / b);
	elseif (t <= -1.75e-102)
		tmp = t_1;
	elseif (t <= 4.8e-86)
		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * 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)
	t_1 = (x + (y / (t / z))) / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = z / b;
	elseif (t <= -1.75e-102)
		tmp = t_1;
	elseif (t <= 4.8e-86)
		tmp = (z / b) + ((t * x) / (y * b));
	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[(x + N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.75e-102], t$95$1, If[LessEqual[t, 4.8e-86], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * 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}
t_1 := \frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq -1.75 \cdot 10^{-102}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 4.8 \cdot 10^{-86}:\\
\;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot 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 t < -1.59999999999999995e91 or -1.55e73 < t < -1.74999999999999993e-102

    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*87.5%

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

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

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

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

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

    if -1.59999999999999995e91 < t < -1.55e73

    1. Initial program 21.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 100.0%

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

    if -1.74999999999999993e-102 < t < 4.80000000000000026e-86

    1. Initial program 59.9%

      \[\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 inf 47.0%

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

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

    if 4.80000000000000026e-86 < t

    1. Initial program 81.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. *-un-lft-identity81.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -1.75 \cdot 10^{-102}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-86}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 69.0% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-101}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-85}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \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 1.0))))
   (if (<= t -1.6e+91)
     t_1
     (if (<= t -1.55e+73)
       (/ z b)
       (if (<= t -2.25e-101)
         (/ (+ x (* z (/ y t))) (+ a 1.0))
         (if (<= t 2.35e-85) (+ (/ z b) (/ (* t x) (* y b))) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -2.25e-101) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if (t <= 2.35e-85) {
		tmp = (z / b) + ((t * x) / (y * 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 = (x + (y * (z / t))) / (a + 1.0d0)
    if (t <= (-1.6d+91)) then
        tmp = t_1
    else if (t <= (-1.55d+73)) then
        tmp = z / b
    else if (t <= (-2.25d-101)) then
        tmp = (x + (z * (y / t))) / (a + 1.0d0)
    else if (t <= 2.35d-85) then
        tmp = (z / b) + ((t * x) / (y * 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 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (t <= -1.6e+91) {
		tmp = t_1;
	} else if (t <= -1.55e+73) {
		tmp = z / b;
	} else if (t <= -2.25e-101) {
		tmp = (x + (z * (y / t))) / (a + 1.0);
	} else if (t <= 2.35e-85) {
		tmp = (z / b) + ((t * x) / (y * b));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y * (z / t))) / (a + 1.0)
	tmp = 0
	if t <= -1.6e+91:
		tmp = t_1
	elif t <= -1.55e+73:
		tmp = z / b
	elif t <= -2.25e-101:
		tmp = (x + (z * (y / t))) / (a + 1.0)
	elif t <= 2.35e-85:
		tmp = (z / b) + ((t * x) / (y * b))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = Float64(z / b);
	elseif (t <= -2.25e-101)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + 1.0));
	elseif (t <= 2.35e-85)
		tmp = Float64(Float64(z / b) + Float64(Float64(t * x) / Float64(y * b)));
	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 + 1.0);
	tmp = 0.0;
	if (t <= -1.6e+91)
		tmp = t_1;
	elseif (t <= -1.55e+73)
		tmp = z / b;
	elseif (t <= -2.25e-101)
		tmp = (x + (z * (y / t))) / (a + 1.0);
	elseif (t <= 2.35e-85)
		tmp = (z / b) + ((t * x) / (y * b));
	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] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.6e+91], t$95$1, If[LessEqual[t, -1.55e+73], N[(z / b), $MachinePrecision], If[LessEqual[t, -2.25e-101], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 2.35e-85], N[(N[(z / b), $MachinePrecision] + N[(N[(t * x), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\
\;\;\;\;\frac{z}{b}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.59999999999999995e91 or 2.35000000000000005e-85 < t

    1. Initial program 79.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. *-un-lft-identity79.6%

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

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

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

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

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

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

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

    if -1.59999999999999995e91 < t < -1.55e73

    1. Initial program 21.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 100.0%

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

    if -1.55e73 < t < -2.2499999999999999e-101

    1. Initial program 93.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*93.2%

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

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

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

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

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

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

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

    if -2.2499999999999999e-101 < t < 2.35000000000000005e-85

    1. Initial program 59.9%

      \[\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 inf 47.0%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq -1.55 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -2.25 \cdot 10^{-101}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-85}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 54.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91} \lor \neg \left(t \leq -1.25 \cdot 10^{+68}\right) \land \left(t \leq -9 \cdot 10^{-35} \lor \neg \left(t \leq 9 \cdot 10^{-118}\right)\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 -1.6e+91)
         (and (not (<= t -1.25e+68)) (or (<= t -9e-35) (not (<= t 9e-118)))))
   (/ x (+ a 1.0))
   (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118)))) {
		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 <= (-1.6d+91)) .or. (.not. (t <= (-1.25d+68))) .and. (t <= (-9d-35)) .or. (.not. (t <= 9d-118))) 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 <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118)))) {
		tmp = x / (a + 1.0);
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -1.6e+91) or (not (t <= -1.25e+68) and ((t <= -9e-35) or not (t <= 9e-118))):
		tmp = x / (a + 1.0)
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -1.6e+91) || (!(t <= -1.25e+68) && ((t <= -9e-35) || !(t <= 9e-118))))
		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 <= -1.6e+91) || (~((t <= -1.25e+68)) && ((t <= -9e-35) || ~((t <= 9e-118)))))
		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, -1.6e+91], And[N[Not[LessEqual[t, -1.25e+68]], $MachinePrecision], Or[LessEqual[t, -9e-35], N[Not[LessEqual[t, 9e-118]], $MachinePrecision]]]], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{+91} \lor \neg \left(t \leq -1.25 \cdot 10^{+68}\right) \land \left(t \leq -9 \cdot 10^{-35} \lor \neg \left(t \leq 9 \cdot 10^{-118}\right)\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.59999999999999995e91 or -1.2500000000000001e68 < t < -9.0000000000000002e-35 or 9.0000000000000001e-118 < t

    1. Initial program 81.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 67.9%

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

    if -1.59999999999999995e91 < t < -1.2500000000000001e68 or -9.0000000000000002e-35 < t < 9.0000000000000001e-118

    1. Initial program 61.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 65.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+91} \lor \neg \left(t \leq -1.25 \cdot 10^{+68}\right) \land \left(t \leq -9 \cdot 10^{-35} \lor \neg \left(t \leq 9 \cdot 10^{-118}\right)\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 41.6% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-144}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.3500000000000002e87 or 3.4e-5 < a

    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 y around 0 63.0%

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

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

    if -3.3500000000000002e87 < a < -5.1000000000000001e-54 or 1.3e-144 < a < 3.4e-5

    1. Initial program 71.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 50.9%

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

    if -5.1000000000000001e-54 < a < 1.3e-144

    1. Initial program 72.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 46.9%

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

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

Alternative 13: 40.9% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 77.3%

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

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

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

    if -1 < a < 1

    1. Initial program 71.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 40.1%

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

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

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

Alternative 14: 19.7% 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 74.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 47.5%

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

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

Developer target: 78.8% 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 2024097 
(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))))