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

Percentage Accurate: 75.5% → 88.3%
Time: 15.7s
Alternatives: 15
Speedup: 0.5×

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 15 alternatives:

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

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

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

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

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

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


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

    1. Initial program 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.6%

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

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

    1. Initial program 5.1%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative6.0%

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

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

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative8.4%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified8.4%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac90.3%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified90.3%

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

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

Alternative 2: 87.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+280}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 43.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.6%

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

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

    1. Initial program 5.1%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative6.0%

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

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

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative8.4%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified8.4%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac90.3%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified90.3%

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

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

Alternative 3: 86.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+280}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 43.7%

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

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

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

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

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

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

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

    1. Initial program 93.6%

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

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

    1. Initial program 5.1%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative6.0%

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

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

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative8.4%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified8.4%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac90.3%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified90.3%

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

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

Alternative 4: 82.1% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -6.20000000000000014e100 or 9.9999999999999993e111 < y

    1. Initial program 37.7%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative19.8%

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

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

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative22.4%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified22.4%

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

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

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

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

    if -6.20000000000000014e100 < y < -4.60000000000000004e49

    1. Initial program 61.2%

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

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

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

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

    if -4.60000000000000004e49 < y < -4.1999999999999999e41

    1. Initial program 4.7%

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

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

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

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

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

    if -4.1999999999999999e41 < y < 9.9999999999999993e111

    1. Initial program 93.4%

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

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

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

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

Alternative 5: 79.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -5.1 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{y \cdot b}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.35e-122

    1. Initial program 83.6%

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

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

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

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

    if -2.35e-122 < t < -5.09999999999999972e-306

    1. Initial program 49.5%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative35.7%

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine30.1%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{y \cdot b}} \]
    8. Taylor expanded in x around inf 56.1%

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

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

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

        \[\leadsto x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{\color{blue}{y \cdot b}}\right) \]
    10. Simplified70.0%

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

    if -5.09999999999999972e-306 < t < 3.00000000000000017e-188

    1. Initial program 58.8%

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

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

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

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

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

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

    if 3.00000000000000017e-188 < t

    1. Initial program 78.9%

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

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

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

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

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

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

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

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

Alternative 6: 79.7% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-306}:\\
\;\;\;\;x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{y \cdot b}\right)\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.89999999999999976e-123 or 1.2e-191 < t

    1. Initial program 80.9%

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

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

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

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

    if -3.89999999999999976e-123 < t < -7.799999999999999e-306

    1. Initial program 49.5%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative35.7%

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine30.1%

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

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

      \[\leadsto \color{blue}{t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{y \cdot b}} \]
    8. Taylor expanded in x around inf 56.1%

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

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

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

        \[\leadsto x \cdot \left(\frac{\frac{z}{b}}{x} + \frac{t}{\color{blue}{y \cdot b}}\right) \]
    10. Simplified70.0%

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

    if -7.799999999999999e-306 < t < 1.2e-191

    1. Initial program 58.8%

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

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

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

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

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

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

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

Alternative 7: 68.8% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq -3000000 \lor \neg \left(y \leq 1.4 \cdot 10^{+111}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.39999999999999997e100 or -6.9999999999999995e49 < y < -3e6 or 1.4e111 < y

    1. Initial program 40.9%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative21.0%

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine23.3%

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative23.3%

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

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

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

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified72.6%

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

    if -5.39999999999999997e100 < y < -6.9999999999999995e49

    1. Initial program 61.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e6 < y < 1.4e111

    1. Initial program 93.7%

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

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

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

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

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

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

Alternative 8: 41.0% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -0.00285:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;y \leq -1.14 \cdot 10^{-225}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;y \leq 4.7 \cdot 10^{-254}:\\
\;\;\;\;x\\

\mathbf{elif}\;y \leq 6.5 \cdot 10^{-112}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;y \leq 2.4 \cdot 10^{+14}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -0.0028500000000000001 or 2.4e14 < y

    1. Initial program 47.5%

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

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

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

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

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

    if -0.0028500000000000001 < y < -1.14e-225 or 4.70000000000000027e-254 < y < 6.49999999999999956e-112

    1. Initial program 95.4%

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

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

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

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

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

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

    if -1.14e-225 < y < 4.70000000000000027e-254 or 6.49999999999999956e-112 < y < 2.4e14

    1. Initial program 94.8%

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

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 9: 69.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.2 \cdot 10^{+94} \lor \neg \left(y \leq 2.6 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.1999999999999998e94 or 2.5999999999999998e109 < y

    1. Initial program 38.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*40.5%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine21.9%

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative21.9%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified21.9%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac73.0%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified73.0%

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

    if -5.1999999999999998e94 < y < 2.5999999999999998e109

    1. Initial program 90.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*84.6%

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

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

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

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

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

Alternative 10: 65.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8.5 \cdot 10^{+39} \lor \neg \left(y \leq 2 \cdot 10^{+113}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.49999999999999971e39 or 2e113 < y

    1. Initial program 39.1%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine20.8%

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

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified20.8%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac69.0%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified69.0%

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

    if -8.49999999999999971e39 < y < 2e113

    1. Initial program 93.4%

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

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

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

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

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

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

Alternative 11: 65.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+40} \lor \neg \left(y \leq 1.3 \cdot 10^{+111}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.3999999999999998e40 or 1.2999999999999999e111 < y

    1. Initial program 39.1%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine20.8%

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

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified20.8%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac69.0%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified69.0%

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

    if -4.3999999999999998e40 < y < 1.2999999999999999e111

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

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

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

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

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

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

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

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

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

Alternative 12: 60.5% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -15.5999999999999996 or 6.5e15 < y

    1. Initial program 47.5%

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

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

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

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

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

        \[\leadsto \color{blue}{t \cdot \frac{x + \frac{y \cdot z}{t}}{b \cdot y}} \]
      2. +-commutative22.8%

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{b \cdot y} \]
      4. fma-undefine24.6%

        \[\leadsto t \cdot \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      5. *-commutative24.6%

        \[\leadsto t \cdot \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot b}} \]
    7. Simplified24.6%

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{t \cdot x}{b \cdot y}} \]
    9. Step-by-step derivation
      1. times-frac65.2%

        \[\leadsto \frac{z}{b} + \color{blue}{\frac{t}{b} \cdot \frac{x}{y}} \]
    10. Simplified65.2%

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

    if -15.5999999999999996 < y < 6.5e15

    1. Initial program 95.2%

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

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

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

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

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

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

Alternative 13: 56.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.06 \cdot 10^{+40} \lor \neg \left(y \leq 1.5 \cdot 10^{+30}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05999999999999996e40 or 1.49999999999999989e30 < y

    1. Initial program 43.6%

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

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

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

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

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

    if -1.05999999999999996e40 < y < 1.49999999999999989e30

    1. Initial program 94.8%

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

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

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

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

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

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

Alternative 14: 41.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 8400000000000\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 71.8%

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

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

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

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

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

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

    if -1 < a < 8.4e12

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 8400000000000\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 20.4% 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 73.0%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  8. Add Preprocessing

Developer target: 79.8% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024089 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

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

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