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

Percentage Accurate: 69.3% → 94.5%
Time: 40.8s
Alternatives: 16
Speedup: 1.1×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 69.3% accurate, 1.0× speedup?

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

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

Alternative 1: 94.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-303}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 10^{+238}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 49.1%

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.9999999999999998e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e238

    1. Initial program 98.5%

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

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

    1. Initial program 45.8%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

Alternative 2: 85.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.55 \cdot 10^{-61}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 8.6:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.14999999999999994e24 or 8.59999999999999964 < y

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{t \cdot x}{y} + z}{b}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u77.9%

        \[\leadsto \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t \cdot x}{y}\right)\right)} + z}{b} \]
      2. expm1-udef71.2%

        \[\leadsto \frac{\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{t \cdot x}{y}\right)} - 1\right)} + z}{b} \]
      3. div-inv71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{\left(t \cdot x\right) \cdot \frac{1}{y}}\right)} - 1\right) + z}{b} \]
      4. *-commutative71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot t\right)} \cdot \frac{1}{y}\right)} - 1\right) + z}{b} \]
      5. associate-*l*71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{x \cdot \left(t \cdot \frac{1}{y}\right)}\right)} - 1\right) + z}{b} \]
      6. div-inv71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\frac{t}{y}}\right)} - 1\right) + z}{b} \]
    9. Applied egg-rr71.2%

      \[\leadsto \frac{\color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \frac{t}{y}\right)} - 1\right)} + z}{b} \]
    10. Step-by-step derivation
      1. expm1-def76.2%

        \[\leadsto \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \frac{t}{y}\right)\right)} + z}{b} \]
      2. expm1-log1p78.8%

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

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

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

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

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

    if -2.14999999999999994e24 < y < -2.54999999999999984e-61 or -3.79999999999999972e-117 < y < 8.59999999999999964

    1. Initial program 92.9%

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

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

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

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

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

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

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

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

    if -2.54999999999999984e-61 < y < -3.79999999999999972e-117

    1. Initial program 48.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.15 \cdot 10^{+24}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq -2.55 \cdot 10^{-61}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-117}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 8.6:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \end{array} \]

Alternative 3: 85.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -7 \cdot 10^{-61}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{t_1}\\

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

\mathbf{elif}\;y \leq 255000000:\\
\;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{t_1}\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.2e24 or 2.55e8 < y

    1. Initial program 47.8%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\frac{t \cdot x}{y} + z}{b}} \]
    8. Step-by-step derivation
      1. expm1-log1p-u77.9%

        \[\leadsto \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{t \cdot x}{y}\right)\right)} + z}{b} \]
      2. expm1-udef71.2%

        \[\leadsto \frac{\color{blue}{\left(e^{\mathsf{log1p}\left(\frac{t \cdot x}{y}\right)} - 1\right)} + z}{b} \]
      3. div-inv71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{\left(t \cdot x\right) \cdot \frac{1}{y}}\right)} - 1\right) + z}{b} \]
      4. *-commutative71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{\left(x \cdot t\right)} \cdot \frac{1}{y}\right)} - 1\right) + z}{b} \]
      5. associate-*l*71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(\color{blue}{x \cdot \left(t \cdot \frac{1}{y}\right)}\right)} - 1\right) + z}{b} \]
      6. div-inv71.2%

        \[\leadsto \frac{\left(e^{\mathsf{log1p}\left(x \cdot \color{blue}{\frac{t}{y}}\right)} - 1\right) + z}{b} \]
    9. Applied egg-rr71.2%

      \[\leadsto \frac{\color{blue}{\left(e^{\mathsf{log1p}\left(x \cdot \frac{t}{y}\right)} - 1\right)} + z}{b} \]
    10. Step-by-step derivation
      1. expm1-def76.2%

        \[\leadsto \frac{\color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(x \cdot \frac{t}{y}\right)\right)} + z}{b} \]
      2. expm1-log1p78.8%

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

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

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

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

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

    if -1.2e24 < y < -7.0000000000000006e-61

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

    if -7.0000000000000006e-61 < y < -3.79999999999999972e-117

    1. Initial program 48.9%

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

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

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

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

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

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

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

    if -3.79999999999999972e-117 < y < 2.55e8

    1. Initial program 95.5%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.2 \cdot 10^{+24}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-61}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;y \leq -3.8 \cdot 10^{-117}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 255000000:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + t \cdot \frac{x}{y}}{b}\\ \end{array} \]

Alternative 4: 73.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.50000000000000015e-145 or 1.12000000000000006e-129 < t

    1. Initial program 89.3%

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

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

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

    if -5.50000000000000015e-145 < t < 1.12000000000000006e-129

    1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-145} \lor \neg \left(t \leq 1.12 \cdot 10^{-129}\right):\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \end{array} \]

Alternative 5: 52.4% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.02 \cdot 10^{-201}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;b \leq -4.5 \cdot 10^{-301}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\

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

\mathbf{elif}\;b \leq 1.1 \cdot 10^{-128}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.01999999999999999e-201 or 1.10000000000000005e-128 < b

    1. Initial program 62.4%

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

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

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

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

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

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

    if -1.01999999999999999e-201 < b < -4.5000000000000002e-301

    1. Initial program 80.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
    7. Simplified59.7%

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

    if -4.5000000000000002e-301 < b < 7.00000000000000013e-191

    1. Initial program 89.5%

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

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

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

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

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

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

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

    if 7.00000000000000013e-191 < b < 1.10000000000000005e-128

    1. Initial program 86.8%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} \]
    7. Simplified74.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.02 \cdot 10^{-201}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq -4.5 \cdot 10^{-301}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot a}\\ \mathbf{elif}\;b \leq 7 \cdot 10^{-191}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;b \leq 1.1 \cdot 10^{-128}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 6: 70.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.9 \cdot 10^{-22} \lor \neg \left(b \leq 1.8 \cdot 10^{-128}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.90000000000000012e-22 or 1.80000000000000012e-128 < b

    1. Initial program 59.2%

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000012e-22 < b < 1.80000000000000012e-128

    1. Initial program 82.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.9 \cdot 10^{-22} \lor \neg \left(b \leq 1.8 \cdot 10^{-128}\right):\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \end{array} \]

Alternative 7: 52.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2 \cdot 10^{-199}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;b \leq -2.55 \cdot 10^{-306}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.99999999999999996e-199 or 7.50000000000000048e-134 < b

    1. Initial program 62.3%

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

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

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

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

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

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

    if -1.99999999999999996e-199 < b < -2.54999999999999986e-306

    1. Initial program 80.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
    7. Simplified59.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t \cdot a}{z}}} \]
      2. associate-/r/56.0%

        \[\leadsto \color{blue}{\frac{y}{t \cdot a} \cdot z} \]
    9. Applied egg-rr56.0%

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

    if -2.54999999999999986e-306 < b < 7.50000000000000048e-134

    1. Initial program 91.1%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2 \cdot 10^{-199}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq -2.55 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{y}{t \cdot a}\\ \mathbf{elif}\;b \leq 7.5 \cdot 10^{-134}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 8: 52.3% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.75 \cdot 10^{-199}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\
\;\;\;\;z \cdot \frac{y}{t \cdot a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.75e-199 or 8.4999999999999997e-146 < b

    1. Initial program 62.3%

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

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

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

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

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

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

    if -2.75e-199 < b < 2.8000000000000001e-306

    1. Initial program 80.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
    7. Simplified59.7%

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

        \[\leadsto \color{blue}{\frac{y}{\frac{t \cdot a}{z}}} \]
      2. associate-/r/56.0%

        \[\leadsto \color{blue}{\frac{y}{t \cdot a} \cdot z} \]
    9. Applied egg-rr56.0%

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

    if 2.8000000000000001e-306 < b < 8.4999999999999997e-146

    1. Initial program 91.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.75 \cdot 10^{-199}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{-306}:\\ \;\;\;\;z \cdot \frac{y}{t \cdot a}\\ \mathbf{elif}\;b \leq 8.5 \cdot 10^{-146}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 9: 52.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{-201}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;b \leq -1.25 \cdot 10^{-301}:\\
\;\;\;\;\frac{y \cdot z}{t \cdot a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.19999999999999965e-201 or 1.4e-147 < b

    1. Initial program 62.3%

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

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

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

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

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

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

    if -5.19999999999999965e-201 < b < -1.25000000000000003e-301

    1. Initial program 80.1%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
    7. Simplified59.7%

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

    if -1.25000000000000003e-301 < b < 1.4e-147

    1. Initial program 91.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{-201}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq -1.25 \cdot 10^{-301}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot a}\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-147}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 10: 54.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.1 \cdot 10^{-126} \lor \neg \left(b \leq 1.85 \cdot 10^{-128}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.10000000000000002e-126 or 1.85e-128 < b

    1. Initial program 60.6%

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

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

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

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

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

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

    if -5.10000000000000002e-126 < b < 1.85e-128

    1. Initial program 85.4%

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot \left(1 + a\right)}} \]
    6. Step-by-step derivation
      1. distribute-lft-in61.6%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot 1 + t \cdot a}} \]
      2. *-rgt-identity61.6%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t} + t \cdot a} \]
    7. Simplified61.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.1 \cdot 10^{-126} \lor \neg \left(b \leq 1.85 \cdot 10^{-128}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\ \end{array} \]

Alternative 11: 60.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.3 \cdot 10^{-126} \lor \neg \left(b \leq 1.05 \cdot 10^{-236}\right):\\
\;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.30000000000000011e-126 or 1.04999999999999989e-236 < b

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    9. Simplified70.2%

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

    if -2.30000000000000011e-126 < b < 1.04999999999999989e-236

    1. Initial program 84.3%

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot \left(1 + a\right)}} \]
    6. Step-by-step derivation
      1. distribute-lft-in66.9%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot 1 + t \cdot a}} \]
      2. *-rgt-identity66.9%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t} + t \cdot a} \]
    7. Simplified66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.3 \cdot 10^{-126} \lor \neg \left(b \leq 1.05 \cdot 10^{-236}\right):\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\ \end{array} \]

Alternative 12: 63.1% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -4.5 \cdot 10^{-126} \lor \neg \left(b \leq 9 \cdot 10^{-237}\right):\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.50000000000000025e-126 or 9.00000000000000019e-237 < b

    1. Initial program 63.0%

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

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

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

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

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

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

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

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

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

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

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

    if -4.50000000000000025e-126 < b < 9.00000000000000019e-237

    1. Initial program 84.3%

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

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

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

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

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

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

      \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot \left(1 + a\right)}} \]
    6. Step-by-step derivation
      1. distribute-lft-in66.9%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot 1 + t \cdot a}} \]
      2. *-rgt-identity66.9%

        \[\leadsto \frac{y \cdot z}{\color{blue}{t} + t \cdot a} \]
    7. Simplified66.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -4.5 \cdot 10^{-126} \lor \neg \left(b \leq 9 \cdot 10^{-237}\right):\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{y \cdot z}{t + t \cdot a}\\ \end{array} \]

Alternative 13: 50.5% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6.6 \cdot 10^{-15} \lor \neg \left(t \leq 3.1 \cdot 10^{-110}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.6e-15 or 3.10000000000000007e-110 < t

    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. *-commutative91.2%

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

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

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

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

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

    if -6.6e-15 < t < 3.10000000000000007e-110

    1. Initial program 61.0%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.6 \cdot 10^{-15} \lor \neg \left(t \leq 3.1 \cdot 10^{-110}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 14: 24.1% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-8}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.4000000000000001e28 or 1.15e-8 < a

    1. Initial program 72.2%

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

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

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

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

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

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

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

    if -6.4000000000000001e28 < a < 1.15e-8

    1. Initial program 63.9%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + \frac{y \cdot b}{t}}} \]
    6. Taylor expanded in y around 0 14.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.4 \cdot 10^{+28}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-8}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 15: 50.5% accurate, 3.4× speedup?

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

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

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


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

    1. Initial program 93.8%

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

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

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

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

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

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

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

    if -4.0999999999999999e191 < a

    1. Initial program 65.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.1 \cdot 10^{+191}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 16: 11.1% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 67.6%

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{1 + \frac{y \cdot b}{t}}} \]
  6. Taylor expanded in y around 0 9.5%

    \[\leadsto \color{blue}{x} \]
  7. Final simplification9.5%

    \[\leadsto x \]

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

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

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