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

Percentage Accurate: 75.9% → 91.3%
Time: 19.5s
Alternatives: 14
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 14 alternatives:

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

Initial Program: 75.9% 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.3% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-297}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 7.2 \cdot 10^{+255}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.00000000000000004e-297 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 7.1999999999999998e255

    1. Initial program 99.0%

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

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

    1. Initial program 50.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*52.2%

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

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

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

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

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

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

    if +inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.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.4%

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

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

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

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

Alternative 2: 91.2% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-290}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 7.2 \cdot 10^{+255}:\\
\;\;\;\;t\_1\\

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

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


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

    1. Initial program 36.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.0000000000000001e-290 or 2.0000000000000001e-222 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 7.1999999999999998e255

    1. Initial program 99.6%

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

    if -1.0000000000000001e-290 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-222

    1. Initial program 57.6%

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

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

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

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

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

      \[\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 1) (/.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.4%

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

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

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

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

Alternative 3: 88.8% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+301}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 87.3%

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

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

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

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

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

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

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

    if -1.0000000000000001e-290 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-222

    1. Initial program 57.6%

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

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

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

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

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

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

    if 2.0000000000000001e-222 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.00000000000000011e301

    1. Initial program 99.6%

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

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

    1. Initial program 14.6%

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

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

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

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

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

Alternative 4: 59.0% accurate, 0.4× speedup?

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

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

\mathbf{elif}\;t \leq -8 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t \leq 4.3 \cdot 10^{+71}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t \leq 4.5 \cdot 10^{+83}:\\
\;\;\;\;\frac{x}{b} \cdot \frac{t}{y}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -5.4999999999999997e95 or 1.6e-13 < t < 4.29999999999999984e71 or 1.59999999999999988e127 < t

    1. Initial program 74.0%

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

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

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

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

    if -5.4999999999999997e95 < t < -7.99999999999999967e28 or -3.7999999999999999e-40 < t < 1.6e-13

    1. Initial program 66.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*58.9%

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

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

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

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

    if -7.99999999999999967e28 < t < -3.7999999999999999e-40

    1. Initial program 92.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*84.9%

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

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

      \[\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 a around inf 78.3%

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

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

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

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

    if 4.29999999999999984e71 < t < 4.4999999999999999e83

    1. Initial program 67.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*67.2%

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

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t}}{b \cdot y} \]
      2. times-frac99.5%

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

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

    if 4.4999999999999999e83 < t < 1.59999999999999988e127

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{+95}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -8 \cdot 10^{+28}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-40}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-13}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq 4.3 \cdot 10^{+71}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{+83}:\\ \;\;\;\;\frac{x}{b} \cdot \frac{t}{y}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{+127}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 62.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -3.7 \cdot 10^{+28}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.55 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2999999999999998e77 or 1.55e-16 < t

    1. Initial program 76.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*86.7%

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

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

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

    if -3.2999999999999998e77 < t < -3.6999999999999999e28 or -9.00000000000000018e-38 < t < 1.55e-16

    1. Initial program 65.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*57.4%

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

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

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

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

    if -3.6999999999999999e28 < t < -9.00000000000000018e-38

    1. Initial program 92.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*84.9%

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

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

      \[\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 a around inf 78.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;t \leq -3.7 \cdot 10^{+28}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -9 \cdot 10^{-38}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{elif}\;t \leq 1.55 \cdot 10^{-16}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.65 \cdot 10^{+40}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.45 \cdot 10^{-17}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2999999999999998e77 or 2.45000000000000006e-17 < t

    1. Initial program 76.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*86.7%

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

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

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

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

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

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

    if -3.2999999999999998e77 < t < -1.6499999999999999e40 or -8.20000000000000025e-36 < t < 2.45000000000000006e-17

    1. Initial program 65.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*57.4%

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

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

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

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

    if -1.6499999999999999e40 < t < -8.20000000000000025e-36

    1. Initial program 92.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*84.9%

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

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

      \[\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 a around inf 78.3%

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

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

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

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

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

Alternative 7: 66.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -1.25 \cdot 10^{+43}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.2999999999999998e77 or 2.40000000000000005e-16 < t

    1. Initial program 76.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*86.7%

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

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

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

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

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

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

    if -3.2999999999999998e77 < t < -1.2500000000000001e43 or -7.19999999999999956e-56 < t < 2.40000000000000005e-16

    1. Initial program 63.6%

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

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

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

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

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

    if -1.2500000000000001e43 < t < -7.19999999999999956e-56

    1. Initial program 94.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*88.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{+77}:\\ \;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq -1.25 \cdot 10^{+43}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -7.2 \cdot 10^{-56}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{-16}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 41.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+98}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+27}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+58}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+190}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -1.9e+98)
   (/ x a)
   (if (<= t -3.3e+27)
     (/ z b)
     (if (<= t -1.6e-41)
       (/ x a)
       (if (<= t 1.3e+58)
         (/ z b)
         (if (<= t 2.1e+190) (- x (* x a)) (/ x a)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.9e+98) {
		tmp = x / a;
	} else if (t <= -3.3e+27) {
		tmp = z / b;
	} else if (t <= -1.6e-41) {
		tmp = x / a;
	} else if (t <= 1.3e+58) {
		tmp = z / b;
	} else if (t <= 2.1e+190) {
		tmp = x - (x * a);
	} else {
		tmp = x / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (t <= (-1.9d+98)) then
        tmp = x / a
    else if (t <= (-3.3d+27)) then
        tmp = z / b
    else if (t <= (-1.6d-41)) then
        tmp = x / a
    else if (t <= 1.3d+58) then
        tmp = z / b
    else if (t <= 2.1d+190) then
        tmp = x - (x * a)
    else
        tmp = x / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.9e+98) {
		tmp = x / a;
	} else if (t <= -3.3e+27) {
		tmp = z / b;
	} else if (t <= -1.6e-41) {
		tmp = x / a;
	} else if (t <= 1.3e+58) {
		tmp = z / b;
	} else if (t <= 2.1e+190) {
		tmp = x - (x * a);
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if t <= -1.9e+98:
		tmp = x / a
	elif t <= -3.3e+27:
		tmp = z / b
	elif t <= -1.6e-41:
		tmp = x / a
	elif t <= 1.3e+58:
		tmp = z / b
	elif t <= 2.1e+190:
		tmp = x - (x * a)
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -1.9e+98)
		tmp = Float64(x / a);
	elseif (t <= -3.3e+27)
		tmp = Float64(z / b);
	elseif (t <= -1.6e-41)
		tmp = Float64(x / a);
	elseif (t <= 1.3e+58)
		tmp = Float64(z / b);
	elseif (t <= 2.1e+190)
		tmp = Float64(x - Float64(x * a));
	else
		tmp = Float64(x / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (t <= -1.9e+98)
		tmp = x / a;
	elseif (t <= -3.3e+27)
		tmp = z / b;
	elseif (t <= -1.6e-41)
		tmp = x / a;
	elseif (t <= 1.3e+58)
		tmp = z / b;
	elseif (t <= 2.1e+190)
		tmp = x - (x * a);
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.9e+98], N[(x / a), $MachinePrecision], If[LessEqual[t, -3.3e+27], N[(z / b), $MachinePrecision], If[LessEqual[t, -1.6e-41], N[(x / a), $MachinePrecision], If[LessEqual[t, 1.3e+58], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.1e+190], N[(x - N[(x * a), $MachinePrecision]), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.6 \cdot 10^{-41}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;t \leq 1.3 \cdot 10^{+58}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq 2.1 \cdot 10^{+190}:\\
\;\;\;\;x - x \cdot a\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.89999999999999995e98 or -3.2999999999999998e27 < t < -1.60000000000000006e-41 or 2.1000000000000001e190 < t

    1. Initial program 74.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.3%

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

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

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

    if -1.89999999999999995e98 < t < -3.2999999999999998e27 or -1.60000000000000006e-41 < t < 1.29999999999999994e58

    1. Initial program 66.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*59.9%

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

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

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

    if 1.29999999999999994e58 < t < 2.1000000000000001e190

    1. Initial program 87.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*91.2%

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{1}{\frac{\mathsf{fma}\left(y, \frac{b}{t}, 1 + a\right)}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}} \]
    9. Taylor expanded in y around 0 53.7%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
    11. Step-by-step derivation
      1. mul-1-neg41.4%

        \[\leadsto x + \color{blue}{\left(-a \cdot x\right)} \]
      2. unsub-neg41.4%

        \[\leadsto \color{blue}{x - a \cdot x} \]
      3. *-commutative41.4%

        \[\leadsto x - \color{blue}{x \cdot a} \]
    12. Simplified41.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.9 \cdot 10^{+98}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq -3.3 \cdot 10^{+27}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -1.6 \cdot 10^{-41}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 1.3 \cdot 10^{+58}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.1 \cdot 10^{+190}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 82.8% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.9 \cdot 10^{-86} \lor \neg \left(t \leq 7 \cdot 10^{-88}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9e-86 or 7.0000000000000002e-88 < t

    1. Initial program 76.6%

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

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

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

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

    if -1.9e-86 < t < 7.0000000000000002e-88

    1. Initial program 62.6%

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

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

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

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

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

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

Alternative 10: 82.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.6 \cdot 10^{-89} \lor \neg \left(t \leq 4.2 \cdot 10^{-180}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.59999999999999999e-89 or 4.1999999999999997e-180 < t

    1. Initial program 76.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*82.0%

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

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

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

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

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

    if -1.59999999999999999e-89 < t < 4.1999999999999997e-180

    1. Initial program 59.7%

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

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

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

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

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

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

Alternative 11: 55.0% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -9.6 \cdot 10^{-39}:\\
\;\;\;\;\frac{x}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.59999999999999994e89 or 2.6000000000000001e-11 < t

    1. Initial program 75.6%

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

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

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

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

    if -1.59999999999999994e89 < t < -7.4999999999999999e35 or -9.60000000000000063e-39 < t < 2.6000000000000001e-11

    1. Initial program 65.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*58.6%

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

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

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

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

    if -7.4999999999999999e35 < t < -9.60000000000000063e-39

    1. Initial program 92.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*84.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.6 \cdot 10^{+89}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -7.5 \cdot 10^{+35}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -9.6 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-11}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 55.6% accurate, 0.7× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.8000000000000004e89 or 3.2000000000000001e-12 < t

    1. Initial program 75.6%

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

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

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

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

    if -6.8000000000000004e89 < t < -1.79999999999999999e37 or -6.6000000000000005e-38 < t < 3.2000000000000001e-12

    1. Initial program 65.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*58.6%

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

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

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

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

    if -1.79999999999999999e37 < t < -6.6000000000000005e-38

    1. Initial program 92.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*84.9%

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

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

      \[\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 a around inf 78.3%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.8 \cdot 10^{+89}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -1.8 \cdot 10^{+37}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -6.6 \cdot 10^{-38}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 40.8% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{+95} \lor \neg \left(t \leq -7.2 \cdot 10^{+36} \lor \neg \left(t \leq -2 \cdot 10^{-40}\right) \land t \leq 2.05 \cdot 10^{+206}\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 -8.2e+95)
         (not (or (<= t -7.2e+36) (and (not (<= t -2e-40)) (<= t 2.05e+206)))))
   (/ x a)
   (/ z b)))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((t <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206)))) {
		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 <= (-8.2d+95)) .or. (.not. (t <= (-7.2d+36)) .or. (.not. (t <= (-2d-40))) .and. (t <= 2.05d+206))) 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 <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206)))) {
		tmp = x / a;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (t <= -8.2e+95) or not ((t <= -7.2e+36) or (not (t <= -2e-40) and (t <= 2.05e+206))):
		tmp = x / a
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((t <= -8.2e+95) || !((t <= -7.2e+36) || (!(t <= -2e-40) && (t <= 2.05e+206))))
		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 <= -8.2e+95) || ~(((t <= -7.2e+36) || (~((t <= -2e-40)) && (t <= 2.05e+206)))))
		tmp = x / a;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[Or[LessEqual[t, -8.2e+95], N[Not[Or[LessEqual[t, -7.2e+36], And[N[Not[LessEqual[t, -2e-40]], $MachinePrecision], LessEqual[t, 2.05e+206]]]], $MachinePrecision]], N[(x / a), $MachinePrecision], N[(z / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{+95} \lor \neg \left(t \leq -7.2 \cdot 10^{+36} \lor \neg \left(t \leq -2 \cdot 10^{-40}\right) \land t \leq 2.05 \cdot 10^{+206}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.19999999999999972e95 or -7.1999999999999995e36 < t < -1.9999999999999999e-40 or 2.0500000000000002e206 < t

    1. Initial program 74.0%

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

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

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

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

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

    if -8.19999999999999972e95 < t < -7.1999999999999995e36 or -1.9999999999999999e-40 < t < 2.0500000000000002e206

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.2 \cdot 10^{+95} \lor \neg \left(t \leq -7.2 \cdot 10^{+36} \lor \neg \left(t \leq -2 \cdot 10^{-40}\right) \land t \leq 2.05 \cdot 10^{+206}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 25.9% 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 71.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*72.2%

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  7. Final simplification25.5%

    \[\leadsto \frac{x}{a} \]
  8. Add Preprocessing

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

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

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