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

Percentage Accurate: 75.3% → 91.4%
Time: 14.3s
Alternatives: 13
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 75.3% 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: 91.4% 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}\\ t_4 := z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+279}:\\ \;\;\;\;t\_4\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+278}:\\ \;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;t\_4\\ \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))
        (t_4 (* z (+ (/ x (* z t_1)) (/ y (* t t_1))))))
   (if (<= t_3 -5e+279)
     t_4
     (if (<= t_3 5e+278)
       (/ t_2 (+ (+ a 1.0) (* b (/ y t))))
       (if (<= t_3 INFINITY) t_4 (/ 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 t_4 = z * ((x / (z * t_1)) + (y / (t * t_1)));
	double tmp;
	if (t_3 <= -5e+279) {
		tmp = t_4;
	} else if (t_3 <= 5e+278) {
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = t_4;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((y * b) / t) + (a + 1.0);
	double t_2 = x + ((y * z) / t);
	double t_3 = t_2 / t_1;
	double t_4 = z * ((x / (z * t_1)) + (y / (t * t_1)));
	double tmp;
	if (t_3 <= -5e+279) {
		tmp = t_4;
	} else if (t_3 <= 5e+278) {
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = t_4;
	} 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
	t_4 = z * ((x / (z * t_1)) + (y / (t * t_1)))
	tmp = 0
	if t_3 <= -5e+279:
		tmp = t_4
	elif t_3 <= 5e+278:
		tmp = t_2 / ((a + 1.0) + (b * (y / t)))
	elif t_3 <= math.inf:
		tmp = t_4
	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)
	t_4 = Float64(z * Float64(Float64(x / Float64(z * t_1)) + Float64(y / Float64(t * t_1))))
	tmp = 0.0
	if (t_3 <= -5e+279)
		tmp = t_4;
	elseif (t_3 <= 5e+278)
		tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))));
	elseif (t_3 <= Inf)
		tmp = t_4;
	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;
	t_4 = z * ((x / (z * t_1)) + (y / (t * t_1)));
	tmp = 0.0;
	if (t_3 <= -5e+279)
		tmp = t_4;
	elseif (t_3 <= 5e+278)
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	elseif (t_3 <= Inf)
		tmp = t_4;
	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]}, Block[{t$95$4 = N[(z * N[(N[(x / N[(z * t$95$1), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+279], t$95$4, If[LessEqual[t$95$3, 5e+278], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], t$95$4, 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}\\
t_4 := z \cdot \left(\frac{x}{z \cdot t\_1} + \frac{y}{t \cdot t\_1}\right)\\
\mathbf{if}\;t\_3 \leq -5 \cdot 10^{+279}:\\
\;\;\;\;t\_4\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+278}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;t\_4\\

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


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

    1. Initial program 35.3%

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

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

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

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

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

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

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

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

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

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

    if -5.0000000000000002e279 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e278

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

Alternative 2: 89.2% 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 -\infty:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+278}:\\ \;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;t\_3 \leq \infty:\\ \;\;\;\;y \cdot \frac{z}{t \cdot t\_1}\\ \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 (- INFINITY))
     (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (/ y (/ t b))))
     (if (<= t_3 5e+278)
       (/ t_2 (+ (+ a 1.0) (* b (/ y t))))
       (if (<= t_3 INFINITY) (* y (/ z (* t t_1))) (/ 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 <= -((double) INFINITY)) {
		tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
	} else if (t_3 <= 5e+278) {
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	} else if (t_3 <= ((double) INFINITY)) {
		tmp = y * (z / (t * t_1));
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = ((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 <= -Double.POSITIVE_INFINITY) {
		tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
	} else if (t_3 <= 5e+278) {
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	} else if (t_3 <= Double.POSITIVE_INFINITY) {
		tmp = y * (z / (t * t_1));
	} 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 <= -math.inf:
		tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)))
	elif t_3 <= 5e+278:
		tmp = t_2 / ((a + 1.0) + (b * (y / t)))
	elif t_3 <= math.inf:
		tmp = y * (z / (t * t_1))
	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 <= Float64(-Inf))
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	elseif (t_3 <= 5e+278)
		tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(b * Float64(y / t))));
	elseif (t_3 <= Inf)
		tmp = Float64(y * Float64(z / Float64(t * t_1)));
	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 <= -Inf)
		tmp = (x + (y * (z / t))) / ((a + 1.0) + (y / (t / b)));
	elseif (t_3 <= 5e+278)
		tmp = t_2 / ((a + 1.0) + (b * (y / t)));
	elseif (t_3 <= Inf)
		tmp = y * (z / (t * t_1));
	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, (-Infinity)], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+278], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, Infinity], N[(y * N[(z / N[(t * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 -\infty:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+278}:\\
\;\;\;\;\frac{t\_2}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;y \cdot \frac{z}{t \cdot t\_1}\\

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


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

    1. Initial program 26.2%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e278

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

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

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

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

    if 5.00000000000000029e278 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 33.1%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq -\infty:\\ \;\;\;\;\frac{x + y \cdot \frac{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 5 \cdot 10^{+278}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq \infty:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(\frac{y \cdot b}{t} + \left(a + 1\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 79.9% accurate, 0.4× speedup?

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

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

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

\mathbf{elif}\;y \leq -1.4 \cdot 10^{+101}:\\
\;\;\;\;\frac{z}{b}\\

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

\mathbf{elif}\;y \leq 3.9 \cdot 10^{+245}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.70000000000000016e200 or -6.19999999999999965e112 < y < -1.39999999999999991e101 or 1.60000000000000012e192 < y < 3.8999999999999998e245

    1. Initial program 23.9%

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

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

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

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

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

    if -2.70000000000000016e200 < y < -6.19999999999999965e112

    1. Initial program 61.9%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.8%

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

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

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

    if -1.39999999999999991e101 < y < 1.60000000000000012e192

    1. Initial program 90.4%

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

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

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

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

    if 3.8999999999999998e245 < y

    1. Initial program 64.5%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num81.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.7 \cdot 10^{+200}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{+112}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;y \leq -1.4 \cdot 10^{+101}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.6 \cdot 10^{+192}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 3.9 \cdot 10^{+245}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 80.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;y \leq -1.15 \cdot 10^{+113}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

\mathbf{elif}\;y \leq -1.5 \cdot 10^{+101}:\\
\;\;\;\;\frac{z}{b}\\

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

\mathbf{elif}\;y \leq 2.5 \cdot 10^{+249}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -8.9999999999999994e199 or -1.14999999999999998e113 < y < -1.49999999999999997e101 or 8.80000000000000001e191 < y < 2.4999999999999998e249

    1. Initial program 23.9%

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

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

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

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

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

    if -8.9999999999999994e199 < y < -1.14999999999999998e113

    1. Initial program 61.9%

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

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

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

      \[\leadsto \color{blue}{\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. clear-num77.8%

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

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

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

    if -1.49999999999999997e101 < y < 8.80000000000000001e191

    1. Initial program 90.4%

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

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

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

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

    if 2.4999999999999998e249 < y

    1. Initial program 64.5%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+199}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -1.15 \cdot 10^{+113}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;y \leq -1.5 \cdot 10^{+101}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 8.8 \cdot 10^{+191}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 2.5 \cdot 10^{+249}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 61.0% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{z}{t + y \cdot b}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-149}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-91}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 620:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ (+ a 1.0) (* y (/ b t))))))
   (if (<= t -1.45e-39)
     t_1
     (if (<= t -2.7e-66)
       (* y (/ z (+ t (* y b))))
       (if (<= t -1.6e-149)
         t_1
         (if (<= t 3.6e-91)
           (/ z b)
           (if (<= t 6.3e-21)
             (/ x (+ (/ (* y b) t) (+ a 1.0)))
             (if (<= t 620.0) (* y (/ z (* t (+ a 1.0)))) t_1))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / ((a + 1.0) + (y * (b / t)));
	double tmp;
	if (t <= -1.45e-39) {
		tmp = t_1;
	} else if (t <= -2.7e-66) {
		tmp = y * (z / (t + (y * b)));
	} else if (t <= -1.6e-149) {
		tmp = t_1;
	} else if (t <= 3.6e-91) {
		tmp = z / b;
	} else if (t <= 6.3e-21) {
		tmp = x / (((y * b) / t) + (a + 1.0));
	} else if (t <= 620.0) {
		tmp = y * (z / (t * (a + 1.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / ((a + 1.0d0) + (y * (b / t)))
    if (t <= (-1.45d-39)) then
        tmp = t_1
    else if (t <= (-2.7d-66)) then
        tmp = y * (z / (t + (y * b)))
    else if (t <= (-1.6d-149)) then
        tmp = t_1
    else if (t <= 3.6d-91) then
        tmp = z / b
    else if (t <= 6.3d-21) then
        tmp = x / (((y * b) / t) + (a + 1.0d0))
    else if (t <= 620.0d0) then
        tmp = y * (z / (t * (a + 1.0d0)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / ((a + 1.0) + (y * (b / t)));
	double tmp;
	if (t <= -1.45e-39) {
		tmp = t_1;
	} else if (t <= -2.7e-66) {
		tmp = y * (z / (t + (y * b)));
	} else if (t <= -1.6e-149) {
		tmp = t_1;
	} else if (t <= 3.6e-91) {
		tmp = z / b;
	} else if (t <= 6.3e-21) {
		tmp = x / (((y * b) / t) + (a + 1.0));
	} else if (t <= 620.0) {
		tmp = y * (z / (t * (a + 1.0)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / ((a + 1.0) + (y * (b / t)))
	tmp = 0
	if t <= -1.45e-39:
		tmp = t_1
	elif t <= -2.7e-66:
		tmp = y * (z / (t + (y * b)))
	elif t <= -1.6e-149:
		tmp = t_1
	elif t <= 3.6e-91:
		tmp = z / b
	elif t <= 6.3e-21:
		tmp = x / (((y * b) / t) + (a + 1.0))
	elif t <= 620.0:
		tmp = y * (z / (t * (a + 1.0)))
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))))
	tmp = 0.0
	if (t <= -1.45e-39)
		tmp = t_1;
	elseif (t <= -2.7e-66)
		tmp = Float64(y * Float64(z / Float64(t + Float64(y * b))));
	elseif (t <= -1.6e-149)
		tmp = t_1;
	elseif (t <= 3.6e-91)
		tmp = Float64(z / b);
	elseif (t <= 6.3e-21)
		tmp = Float64(x / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)));
	elseif (t <= 620.0)
		tmp = Float64(y * Float64(z / Float64(t * Float64(a + 1.0))));
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / ((a + 1.0) + (y * (b / t)));
	tmp = 0.0;
	if (t <= -1.45e-39)
		tmp = t_1;
	elseif (t <= -2.7e-66)
		tmp = y * (z / (t + (y * b)));
	elseif (t <= -1.6e-149)
		tmp = t_1;
	elseif (t <= 3.6e-91)
		tmp = z / b;
	elseif (t <= 6.3e-21)
		tmp = x / (((y * b) / t) + (a + 1.0));
	elseif (t <= 620.0)
		tmp = y * (z / (t * (a + 1.0)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-39], t$95$1, If[LessEqual[t, -2.7e-66], N[(y * N[(z / N[(t + N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.6e-149], t$95$1, If[LessEqual[t, 3.6e-91], N[(z / b), $MachinePrecision], If[LessEqual[t, 6.3e-21], N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 620.0], N[(y * N[(z / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-66}:\\
\;\;\;\;y \cdot \frac{z}{t + y \cdot b}\\

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-149}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.44999999999999994e-39 or -2.69999999999999996e-66 < t < -1.60000000000000001e-149 or 620 < t

    1. Initial program 84.9%

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

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

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

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

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

    if -1.44999999999999994e-39 < t < -2.69999999999999996e-66

    1. Initial program 99.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t + b \cdot y}} \]
      2. *-commutative73.6%

        \[\leadsto y \cdot \frac{z}{t + \color{blue}{y \cdot b}} \]
    9. Simplified73.6%

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

    if -1.60000000000000001e-149 < t < 3.6e-91

    1. Initial program 61.2%

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

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

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

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

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

    if 3.6e-91 < t < 6.3e-21

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

    if 6.3e-21 < t < 620

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-66}:\\ \;\;\;\;y \cdot \frac{z}{t + y \cdot b}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-149}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-91}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 6.3 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 620:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 79.5% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.7 \cdot 10^{-145} \lor \neg \left(t \leq 2.2 \cdot 10^{-91}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.7e-145 or 2.2000000000000001e-91 < t

    1. Initial program 84.4%

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

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

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

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

    if -2.7e-145 < t < 2.2000000000000001e-91

    1. Initial program 61.2%

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

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

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

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

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

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

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

Alternative 7: 79.6% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 86.8%

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

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

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

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

    if -9.6000000000000005e-149 < t < 2.2000000000000001e-91

    1. Initial program 61.2%

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

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

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

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

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

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

    if 2.2000000000000001e-91 < t

    1. Initial program 82.0%

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

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

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

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

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

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

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

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

Alternative 8: 64.8% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.29999999999999985e-39 or 2.79999999999999981e-59 < t < 0.92000000000000004

    1. Initial program 82.5%

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

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

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

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

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

    if -3.29999999999999985e-39 < t < 2.79999999999999981e-59

    1. Initial program 70.1%

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

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

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

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

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

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

    if 0.92000000000000004 < t

    1. Initial program 82.8%

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

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

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

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

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

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

Alternative 9: 63.4% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.8000000000000001e-150 or 6.50000000000000034e-89 < t < 3.14999999999999991

    1. Initial program 85.2%

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

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

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

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

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

    if -1.8000000000000001e-150 < t < 6.50000000000000034e-89

    1. Initial program 61.7%

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

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

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

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

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

    if 3.14999999999999991 < t

    1. Initial program 82.8%

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

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

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

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

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

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

Alternative 10: 61.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -7.2 \cdot 10^{+100} \lor \neg \left(y \leq 6.6 \cdot 10^{+35}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.2e100 or 6.6000000000000003e35 < y

    1. Initial program 47.5%

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

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

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

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

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

    if -7.2e100 < y < 6.6000000000000003e35

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

Alternative 11: 55.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.8 \cdot 10^{+98} \lor \neg \left(y \leq 2.85 \cdot 10^{+32}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.8000000000000002e98 or 2.85e32 < y

    1. Initial program 47.5%

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

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

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

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

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

    if -5.8000000000000002e98 < y < 2.85e32

    1. Initial program 95.4%

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

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

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

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

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

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

Alternative 12: 42.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -0.000125 \lor \neg \left(t \leq 2.05 \cdot 10^{+25}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25e-4 or 2.04999999999999983e25 < t

    1. Initial program 84.8%

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

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

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

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

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

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

    if -1.25e-4 < t < 2.04999999999999983e25

    1. Initial program 71.0%

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

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

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

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

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

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

Alternative 13: 25.1% accurate, 5.7× speedup?

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

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 77.4%

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  7. Add Preprocessing

Developer target: 79.5% 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 2024106 
(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))))