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

Percentage Accurate: 74.6% → 90.4%
Time: 14.6s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 74.6% accurate, 1.0× speedup?

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

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

Alternative 1: 90.4% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+250}:\\
\;\;\;\;t\_2\\

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

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


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

    1. Initial program 42.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*60.7%

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

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

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

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

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

    1. Initial program 92.3%

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

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

    1. Initial program 0.0%

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

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

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

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

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

Alternative 2: 86.3% accurate, 0.3× 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^{+31}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+283}:\\ \;\;\;\;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+31)
     (/ (+ x (* z (/ y t))) t_1)
     (if (<= t_2 2e+283) 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+31) {
		tmp = (x + (z * (y / t))) / t_1;
	} else if (t_2 <= 2e+283) {
		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+31)) then
        tmp = (x + (z * (y / t))) / t_1
    else if (t_2 <= 2d+283) 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+31) {
		tmp = (x + (z * (y / t))) / t_1;
	} else if (t_2 <= 2e+283) {
		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+31:
		tmp = (x + (z * (y / t))) / t_1
	elif t_2 <= 2e+283:
		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+31)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / t_1);
	elseif (t_2 <= 2e+283)
		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+31)
		tmp = (x + (z * (y / t))) / t_1;
	elseif (t_2 <= 2e+283)
		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+31], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$1), $MachinePrecision], If[LessEqual[t$95$2, 2e+283], 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^{+31}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t\_1}\\

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

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


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

    1. Initial program 75.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. *-commutative75.3%

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

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

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

    if -9.9999999999999996e30 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.99999999999999991e283

    1. Initial program 91.3%

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

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

    1. Initial program 14.8%

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

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

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

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

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

Alternative 3: 79.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.65 \cdot 10^{-112} \lor \neg \left(t \leq 2.15 \cdot 10^{-97}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.6500000000000002e-112 or 2.15e-97 < t

    1. Initial program 83.4%

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

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

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

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

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

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

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

    if -2.6500000000000002e-112 < t < 2.15e-97

    1. Initial program 64.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*54.0%

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

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

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

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

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

Alternative 4: 79.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.80000000000000023e-112 or 1.8999999999999999e-95 < t

    1. Initial program 83.4%

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

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

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

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

    if -2.80000000000000023e-112 < t < 1.8999999999999999e-95

    1. Initial program 64.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*54.0%

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

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

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

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

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

Alternative 5: 79.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 81.2%

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

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

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

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

    if -9.50000000000000063e-204 < t < 9.4999999999999993e-96

    1. Initial program 61.5%

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

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

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

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

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

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

    if 9.4999999999999993e-96 < t

    1. Initial program 84.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*86.3%

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

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

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

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

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

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

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

Alternative 6: 68.8% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 100000000:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\

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


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

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

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

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

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

    if -1.65e9 < a < 1e8

    1. Initial program 78.0%

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

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

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

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

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

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

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

    if 1e8 < a

    1. Initial program 70.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*70.0%

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

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

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

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

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

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

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

Alternative 7: 56.3% accurate, 0.7× speedup?

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

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

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

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

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


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

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

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

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

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

    if -1.02e9 < a < -3.80000000000000009e-289

    1. Initial program 76.5%

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

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

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

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

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

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

    if -3.80000000000000009e-289 < a < 1.25e-15

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified58.7%

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

    if 1.25e-15 < a

    1. Initial program 69.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*69.3%

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

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

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

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

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

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

      \[\leadsto \frac{x + \color{blue}{z \cdot \frac{y}{t}}}{1 + a} \]
    8. Taylor expanded in a around inf 65.1%

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

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

Alternative 8: 56.6% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -9.8e8 or 1.25e-15 < a

    1. Initial program 75.9%

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

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

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

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

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

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

      \[\leadsto \frac{x + \color{blue}{z \cdot \frac{y}{t}}}{1 + a} \]
    8. Taylor expanded in a around inf 64.8%

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

    if -9.8e8 < a < -4.6000000000000004e-289

    1. Initial program 76.5%

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

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

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

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

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

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

    if -4.6000000000000004e-289 < a < 1.25e-15

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    10. Simplified58.7%

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

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

Alternative 9: 68.6% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.56 \cdot 10^{-78} \lor \neg \left(t \leq 6.5 \cdot 10^{-73}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.56000000000000002e-78 or 6.4999999999999999e-73 < t

    1. Initial program 83.4%

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

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

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

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

    if -1.56000000000000002e-78 < t < 6.4999999999999999e-73

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

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

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

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

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

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

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

Alternative 10: 66.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.3 \cdot 10^{+36} \lor \neg \left(y \leq 1.65 \cdot 10^{+184}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.29999999999999996e36 or 1.6499999999999999e184 < y

    1. Initial program 55.5%

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

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

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

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

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

    if -2.29999999999999996e36 < y < 1.6499999999999999e184

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

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

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

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

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

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

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

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

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

Alternative 11: 64.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+34} \lor \neg \left(y \leq 5.5 \cdot 10^{+183}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.0000000000000001e34 or 5.5e183 < y

    1. Initial program 55.5%

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

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

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

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

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

    if -9.0000000000000001e34 < y < 5.5e183

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

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

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

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

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

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

Alternative 12: 61.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.1 \cdot 10^{+34} \lor \neg \left(y \leq 2.4 \cdot 10^{+144}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.09999999999999977e34 or 2.4000000000000001e144 < y

    1. Initial program 55.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.6%

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

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

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

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

    if -3.09999999999999977e34 < y < 2.4000000000000001e144

    1. Initial program 89.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*84.4%

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

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

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

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

Alternative 13: 62.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.55 \cdot 10^{+36} \lor \neg \left(y \leq 4 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.54999999999999986e36 or 4.0000000000000001e94 < y

    1. Initial program 54.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*61.4%

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

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

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

    if -2.54999999999999986e36 < y < 4.0000000000000001e94

    1. Initial program 91.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*85.5%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x}{1 + \left(a + \color{blue}{\frac{1}{\frac{\frac{t}{y}}{b}}}\right)} \]
    10. Step-by-step derivation
      1. clear-num63.2%

        \[\leadsto \frac{x}{1 + \left(a + \color{blue}{\frac{b}{\frac{t}{y}}}\right)} \]
      2. add-cube-cbrt63.1%

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

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

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

        \[\leadsto \frac{x}{1 + \left(a + \frac{\color{blue}{{\left(\sqrt[3]{b}\right)}^{2}}}{1} \cdot \frac{\sqrt[3]{b}}{\frac{t}{y}}\right)} \]
    11. Applied egg-rr63.1%

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

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

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

        \[\leadsto \frac{x}{1 + \left(a + \frac{\color{blue}{\left(\sqrt[3]{b} \cdot \sqrt[3]{b}\right)} \cdot \sqrt[3]{b}}{\frac{t}{y}}\right)} \]
      4. rem-3cbrt-lft63.2%

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

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

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

Alternative 14: 62.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.99999999999999981e35 or 4.49999999999999972e94 < y

    1. Initial program 54.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*61.4%

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

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

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

    if -5.99999999999999981e35 < y < 4.49999999999999972e94

    1. Initial program 91.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*85.5%

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

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

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

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

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

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

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

Alternative 15: 55.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-55} \lor \neg \left(y \leq 4.7 \cdot 10^{+94}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.1000000000000002e-55 or 4.70000000000000017e94 < y

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

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

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

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

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

    if -2.1000000000000002e-55 < y < 4.70000000000000017e94

    1. Initial program 91.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*85.0%

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

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

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

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

Alternative 16: 43.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3 \cdot 10^{-56} \lor \neg \left(y \leq 1.2 \cdot 10^{+78}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.99999999999999989e-56 or 1.1999999999999999e78 < y

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

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

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

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

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

    if -2.99999999999999989e-56 < y < 1.1999999999999999e78

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

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

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

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

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

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

Alternative 17: 25.8% accurate, 5.7× speedup?

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

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 77.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*76.0%

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

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

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

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

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

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

  :alt
  (! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))

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