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

Percentage Accurate: 74.7% → 88.2%
Time: 11.6s
Alternatives: 13
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 74.7% accurate, 1.0× speedup?

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

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

Alternative 1: 88.2% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y \cdot b}{t}\\ t_2 := x + \frac{y \cdot z}{t}\\ t_3 := \frac{t_2}{\left(a + 1\right) + t_1}\\ t_4 := 1 + \left(a + t_1\right)\\ \mathbf{if}\;t_3 \leq -1 \cdot 10^{-279}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot t_4} + \frac{x}{t_4}\\ \mathbf{elif}\;t_3 \leq 0:\\ \;\;\;\;\frac{t_2}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;t_3 \leq 5 \cdot 10^{+302}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, z, x\right)}{a + \mathsf{fma}\left(\frac{y}{t}, b, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (* y b) t))
        (t_2 (+ x (/ (* y z) t)))
        (t_3 (/ t_2 (+ (+ a 1.0) t_1)))
        (t_4 (+ 1.0 (+ a t_1))))
   (if (<= t_3 -1e-279)
     (+ (/ (* y z) (* t t_4)) (/ x t_4))
     (if (<= t_3 0.0)
       (/ t_2 (+ (+ a 1.0) (/ y (/ t b))))
       (if (<= t_3 5e+302)
         (/ (fma (/ y t) z x) (+ a (fma (/ y t) b 1.0)))
         (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (y * b) / t;
	double t_2 = x + ((y * z) / t);
	double t_3 = t_2 / ((a + 1.0) + t_1);
	double t_4 = 1.0 + (a + t_1);
	double tmp;
	if (t_3 <= -1e-279) {
		tmp = ((y * z) / (t * t_4)) + (x / t_4);
	} else if (t_3 <= 0.0) {
		tmp = t_2 / ((a + 1.0) + (y / (t / b)));
	} else if (t_3 <= 5e+302) {
		tmp = fma((y / t), z, x) / (a + fma((y / t), b, 1.0));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(y * b) / t)
	t_2 = Float64(x + Float64(Float64(y * z) / t))
	t_3 = Float64(t_2 / Float64(Float64(a + 1.0) + t_1))
	t_4 = Float64(1.0 + Float64(a + t_1))
	tmp = 0.0
	if (t_3 <= -1e-279)
		tmp = Float64(Float64(Float64(y * z) / Float64(t * t_4)) + Float64(x / t_4));
	elseif (t_3 <= 0.0)
		tmp = Float64(t_2 / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))));
	elseif (t_3 <= 5e+302)
		tmp = Float64(fma(Float64(y / t), z, x) / Float64(a + fma(Float64(y / t), b, 1.0)));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$4 = N[(1.0 + N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$3, -1e-279], N[(N[(N[(y * z), $MachinePrecision] / N[(t * t$95$4), $MachinePrecision]), $MachinePrecision] + N[(x / t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 0.0], N[(t$95$2 / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, 5e+302], N[(N[(N[(y / t), $MachinePrecision] * z + x), $MachinePrecision] / N[(a + N[(N[(y / t), $MachinePrecision] * b + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t_3 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{y}{t}, z, x\right)}{a + \mathsf{fma}\left(\frac{y}{t}, b, 1\right)}\\

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


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

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

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

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

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

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

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

    1. Initial program 69.4%

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5e302

    1. Initial program 98.7%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 10.2%

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

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

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

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

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

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

Alternative 2: 86.4% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+302}:\\
\;\;\;\;t_3\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.50000000000000005e-170 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5e302

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

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

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

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

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

    1. Initial program 77.0%

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

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

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

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

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

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

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

    1. Initial program 10.2%

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

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

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

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

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

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

Alternative 3: 88.1% accurate, 0.2× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

    1. Initial program 69.4%

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5e302

    1. Initial program 98.7%

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

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

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

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

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

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

    1. Initial program 10.2%

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

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

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

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

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

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

Alternative 4: 79.4% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.79999999999999965e259 or 3.69999999999999992e139 < y

    1. Initial program 40.6%

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

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

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

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

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

    if -8.79999999999999965e259 < y < 3.69999999999999992e139

    1. Initial program 88.9%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.8 \cdot 10^{+259}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 3.7 \cdot 10^{+139}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 5: 64.6% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 1.65 \cdot 10^{+55}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.6000000000000001e179 or 1.7500000000000001e158 < y

    1. Initial program 38.9%

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

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

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

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

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

    if -1.6000000000000001e179 < y < -7.70000000000000037e-56

    1. Initial program 81.3%

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

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

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

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

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

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

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

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

    if -7.70000000000000037e-56 < y < 1.65e55

    1. Initial program 97.2%

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

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

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

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

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

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

    if 1.65e55 < y < 1.7500000000000001e158

    1. Initial program 54.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.6 \cdot 10^{+179}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -7.7 \cdot 10^{-56}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;y \leq 1.65 \cdot 10^{+55}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 1.75 \cdot 10^{+158}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 6: 42.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-193}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-110}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-56}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+19}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.0)
   (/ x a)
   (if (<= a -1.75e-133)
     x
     (if (<= a -1.05e-246)
       (/ z b)
       (if (<= a 2.8e-193)
         x
         (if (<= a 1.6e-110)
           (/ z b)
           (if (<= a 1.1e-56) x (if (<= a 6.8e+19) (/ z b) (/ x a)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.0) {
		tmp = x / a;
	} else if (a <= -1.75e-133) {
		tmp = x;
	} else if (a <= -1.05e-246) {
		tmp = z / b;
	} else if (a <= 2.8e-193) {
		tmp = x;
	} else if (a <= 1.6e-110) {
		tmp = z / b;
	} else if (a <= 1.1e-56) {
		tmp = x;
	} else if (a <= 6.8e+19) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: tmp
    if (a <= (-1.0d0)) then
        tmp = x / a
    else if (a <= (-1.75d-133)) then
        tmp = x
    else if (a <= (-1.05d-246)) then
        tmp = z / b
    else if (a <= 2.8d-193) then
        tmp = x
    else if (a <= 1.6d-110) then
        tmp = z / b
    else if (a <= 1.1d-56) then
        tmp = x
    else if (a <= 6.8d+19) then
        tmp = z / b
    else
        tmp = x / a
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.0) {
		tmp = x / a;
	} else if (a <= -1.75e-133) {
		tmp = x;
	} else if (a <= -1.05e-246) {
		tmp = z / b;
	} else if (a <= 2.8e-193) {
		tmp = x;
	} else if (a <= 1.6e-110) {
		tmp = z / b;
	} else if (a <= 1.1e-56) {
		tmp = x;
	} else if (a <= 6.8e+19) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.0:
		tmp = x / a
	elif a <= -1.75e-133:
		tmp = x
	elif a <= -1.05e-246:
		tmp = z / b
	elif a <= 2.8e-193:
		tmp = x
	elif a <= 1.6e-110:
		tmp = z / b
	elif a <= 1.1e-56:
		tmp = x
	elif a <= 6.8e+19:
		tmp = z / b
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.0)
		tmp = Float64(x / a);
	elseif (a <= -1.75e-133)
		tmp = x;
	elseif (a <= -1.05e-246)
		tmp = Float64(z / b);
	elseif (a <= 2.8e-193)
		tmp = x;
	elseif (a <= 1.6e-110)
		tmp = Float64(z / b);
	elseif (a <= 1.1e-56)
		tmp = x;
	elseif (a <= 6.8e+19)
		tmp = Float64(z / b);
	else
		tmp = Float64(x / a);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if (a <= -1.0)
		tmp = x / a;
	elseif (a <= -1.75e-133)
		tmp = x;
	elseif (a <= -1.05e-246)
		tmp = z / b;
	elseif (a <= 2.8e-193)
		tmp = x;
	elseif (a <= 1.6e-110)
		tmp = z / b;
	elseif (a <= 1.1e-56)
		tmp = x;
	elseif (a <= 6.8e+19)
		tmp = z / b;
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.75e-133], x, If[LessEqual[a, -1.05e-246], N[(z / b), $MachinePrecision], If[LessEqual[a, 2.8e-193], x, If[LessEqual[a, 1.6e-110], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.1e-56], x, If[LessEqual[a, 6.8e+19], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq -1.75 \cdot 10^{-133}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 2.8 \cdot 10^{-193}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 1.1 \cdot 10^{-56}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 6.8 \cdot 10^{+19}:\\
\;\;\;\;\frac{z}{b}\\

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


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

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

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

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

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

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

    if -1 < a < -1.75000000000000001e-133 or -1.04999999999999997e-246 < a < 2.8000000000000002e-193 or 1.60000000000000014e-110 < a < 1.10000000000000002e-56

    1. Initial program 77.8%

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + \color{blue}{\left(\frac{y \cdot b}{t} + 1\right)}} \]
      7. associate-*r/83.5%

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

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

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

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

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

    if -1.75000000000000001e-133 < a < -1.04999999999999997e-246 or 2.8000000000000002e-193 < a < 1.60000000000000014e-110 or 1.10000000000000002e-56 < a < 6.8e19

    1. Initial program 72.9%

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

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

        \[\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 t around 0 55.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.75 \cdot 10^{-133}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq -1.05 \cdot 10^{-246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-193}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 1.6 \cdot 10^{-110}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-56}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 6.8 \cdot 10^{+19}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 7: 42.1% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq -1.45 \cdot 10^{-133}:\\
\;\;\;\;x - x \cdot a\\

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

\mathbf{elif}\;a \leq 2.05 \cdot 10^{-199}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 2.2 \cdot 10^{-55}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+18}:\\
\;\;\;\;\frac{z}{b}\\

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


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

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

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

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

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

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

    if -1 < a < -1.4499999999999999e-133

    1. Initial program 74.6%

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
      2. mul-1-neg47.1%

        \[\leadsto x + \color{blue}{\left(-a \cdot x\right)} \]
      3. unsub-neg47.1%

        \[\leadsto \color{blue}{x - a \cdot x} \]
    7. Simplified47.1%

      \[\leadsto \color{blue}{x - a \cdot x} \]

    if -1.4499999999999999e-133 < a < -4.5999999999999996e-249 or 2.05000000000000011e-199 < a < 2.29999999999999996e-108 or 2.2e-55 < a < 5.5e18

    1. Initial program 72.9%

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

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

        \[\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 t around 0 55.2%

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

    if -4.5999999999999996e-249 < a < 2.05000000000000011e-199 or 2.29999999999999996e-108 < a < 2.2e-55

    1. Initial program 79.4%

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + \color{blue}{\left(\frac{y \cdot b}{t} + 1\right)}} \]
      7. associate-*r/84.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.45 \cdot 10^{-133}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{elif}\;a \leq -4.6 \cdot 10^{-249}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.05 \cdot 10^{-199}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{-108}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 2.2 \cdot 10^{-55}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+18}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 8: 52.2% accurate, 1.1× speedup?

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

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

\mathbf{elif}\;y \leq 1.05 \cdot 10^{-73}:\\
\;\;\;\;\frac{x}{a + 1}\\

\mathbf{elif}\;y \leq 2.15 \cdot 10^{+158}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.01999999999999999e152 or 2.15e158 < y

    1. Initial program 42.1%

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

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

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

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

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

    if -1.01999999999999999e152 < y < 1.0499999999999999e-73

    1. Initial program 94.1%

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

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

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

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

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

    if 1.0499999999999999e-73 < y < 2.15e158

    1. Initial program 81.0%

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

        \[\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/87.1%

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

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

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{\frac{b}{t} \cdot y}} \]
      3. *-commutative57.3%

        \[\leadsto \frac{x}{1 + \color{blue}{y \cdot \frac{b}{t}}} \]
    8. Simplified57.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.02 \cdot 10^{+152}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.05 \cdot 10^{-73}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 2.15 \cdot 10^{+158}:\\ \;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 9: 60.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.09999999999999989e181 or 1.35e160 < y

    1. Initial program 38.9%

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

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

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

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

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

    if -3.09999999999999989e181 < y < 1.35e160

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

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

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

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

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

Alternative 10: 60.6% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1e180 or 2.50000000000000002e159 < y

    1. Initial program 38.9%

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

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

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

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

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

    if -1e180 < y < 2.50000000000000002e159

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

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

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

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

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

Alternative 11: 54.9% accurate, 1.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.2 \cdot 10^{+84}:\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.8999999999999998e152 or 1.2e84 < y

    1. Initial program 41.9%

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

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

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

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

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

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

    if -2.8999999999999998e152 < y < 1.2e84

    1. Initial program 93.9%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.9 \cdot 10^{+152}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.2 \cdot 10^{+84}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 12: 41.0% accurate, 2.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.0) (/ x a) (if (<= a 1.0) x (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.0) {
		tmp = x / a;
	} else if (a <= 1.0) {
		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 <= (-1.0d0)) then
        tmp = x / a
    else if (a <= 1.0d0) 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 <= -1.0) {
		tmp = x / a;
	} else if (a <= 1.0) {
		tmp = x;
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.0:
		tmp = x / a
	elif a <= 1.0:
		tmp = x
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.0)
		tmp = Float64(x / a);
	elseif (a <= 1.0)
		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 <= -1.0)
		tmp = x / a;
	elseif (a <= 1.0)
		tmp = x;
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.0], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.0], x, N[(x / a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\

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


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

    1. Initial program 82.3%

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 76.1%

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + \color{blue}{\left(\frac{y \cdot b}{t} + 1\right)}} \]
      7. associate-*r/79.8%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 13: 20.0% 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 79.1%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification23.3%

    \[\leadsto x \]

Developer target: 78.4% 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 2023257 
(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))))