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

Percentage Accurate: 75.3% → 89.5%
Time: 16.6s
Alternatives: 21
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 21 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.3% accurate, 1.0× speedup?

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

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

Alternative 1: 89.5% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_1}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


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

    1. Initial program 27.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(\frac{x}{z \cdot \left(1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\right)} + \frac{\frac{y}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, 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))) < 5.00000000000000009e305

    1. Initial program 91.6%

      \[\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. *-commutative91.6%

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

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

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

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

    1. Initial program 11.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*19.8%

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

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

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

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

Alternative 2: 89.7% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


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

    1. Initial program 27.3%

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

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

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

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

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

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

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

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

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

    1. Initial program 91.6%

      \[\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. *-commutative91.6%

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

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

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

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

    1. Initial program 11.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*19.8%

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification89.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:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(\frac{y \cdot b}{t} + \left(a + 1\right)\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)} \leq 5 \cdot 10^{+305}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 90.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+305}:\\
\;\;\;\;\frac{t\_2}{b \cdot \frac{y}{t} + \left(a + 1\right)}\\

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


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

    1. Initial program 27.3%

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

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

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

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

    1. Initial program 91.6%

      \[\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. *-commutative91.6%

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

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

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

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

    1. Initial program 11.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*19.8%

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

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

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

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

Alternative 4: 56.9% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ t_2 := y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\ t_3 := x + \frac{y \cdot z}{t}\\ \mathbf{if}\;a \leq -88000000:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-52}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-193}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-294}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-181}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;a \leq 7000000:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ (/ z b) (* t (/ x (* y b)))))
        (t_2 (+ (* y (/ (/ z a) t)) (/ x a)))
        (t_3 (+ x (/ (* y z) t))))
   (if (<= a -88000000.0)
     t_2
     (if (<= a -1e-52)
       t_1
       (if (<= a -2.2e-193)
         t_3
         (if (<= a -3.6e-294)
           t_1
           (if (<= a 4e-181) t_3 (if (<= a 7000000.0) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z / b) + (t * (x / (y * b)));
	double t_2 = (y * ((z / a) / t)) + (x / a);
	double t_3 = x + ((y * z) / t);
	double tmp;
	if (a <= -88000000.0) {
		tmp = t_2;
	} else if (a <= -1e-52) {
		tmp = t_1;
	} else if (a <= -2.2e-193) {
		tmp = t_3;
	} else if (a <= -3.6e-294) {
		tmp = t_1;
	} else if (a <= 4e-181) {
		tmp = t_3;
	} else if (a <= 7000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (z / b) + (t * (x / (y * b)))
    t_2 = (y * ((z / a) / t)) + (x / a)
    t_3 = x + ((y * z) / t)
    if (a <= (-88000000.0d0)) then
        tmp = t_2
    else if (a <= (-1d-52)) then
        tmp = t_1
    else if (a <= (-2.2d-193)) then
        tmp = t_3
    else if (a <= (-3.6d-294)) then
        tmp = t_1
    else if (a <= 4d-181) then
        tmp = t_3
    else if (a <= 7000000.0d0) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z / b) + (t * (x / (y * b)));
	double t_2 = (y * ((z / a) / t)) + (x / a);
	double t_3 = x + ((y * z) / t);
	double tmp;
	if (a <= -88000000.0) {
		tmp = t_2;
	} else if (a <= -1e-52) {
		tmp = t_1;
	} else if (a <= -2.2e-193) {
		tmp = t_3;
	} else if (a <= -3.6e-294) {
		tmp = t_1;
	} else if (a <= 4e-181) {
		tmp = t_3;
	} else if (a <= 7000000.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z / b) + (t * (x / (y * b)))
	t_2 = (y * ((z / a) / t)) + (x / a)
	t_3 = x + ((y * z) / t)
	tmp = 0
	if a <= -88000000.0:
		tmp = t_2
	elif a <= -1e-52:
		tmp = t_1
	elif a <= -2.2e-193:
		tmp = t_3
	elif a <= -3.6e-294:
		tmp = t_1
	elif a <= 4e-181:
		tmp = t_3
	elif a <= 7000000.0:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b))))
	t_2 = Float64(Float64(y * Float64(Float64(z / a) / t)) + Float64(x / a))
	t_3 = Float64(x + Float64(Float64(y * z) / t))
	tmp = 0.0
	if (a <= -88000000.0)
		tmp = t_2;
	elseif (a <= -1e-52)
		tmp = t_1;
	elseif (a <= -2.2e-193)
		tmp = t_3;
	elseif (a <= -3.6e-294)
		tmp = t_1;
	elseif (a <= 4e-181)
		tmp = t_3;
	elseif (a <= 7000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z / b) + (t * (x / (y * b)));
	t_2 = (y * ((z / a) / t)) + (x / a);
	t_3 = x + ((y * z) / t);
	tmp = 0.0;
	if (a <= -88000000.0)
		tmp = t_2;
	elseif (a <= -1e-52)
		tmp = t_1;
	elseif (a <= -2.2e-193)
		tmp = t_3;
	elseif (a <= -3.6e-294)
		tmp = t_1;
	elseif (a <= 4e-181)
		tmp = t_3;
	elseif (a <= 7000000.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(N[(z / a), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + N[(x / a), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -88000000.0], t$95$2, If[LessEqual[a, -1e-52], t$95$1, If[LessEqual[a, -2.2e-193], t$95$3, If[LessEqual[a, -3.6e-294], t$95$1, If[LessEqual[a, 4e-181], t$95$3, If[LessEqual[a, 7000000.0], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\
t_2 := y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\
t_3 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -88000000:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq -2.2 \cdot 10^{-193}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq -3.6 \cdot 10^{-294}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 4 \cdot 10^{-181}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;a \leq 7000000:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.8e7 or 7e6 < a

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{\frac{z}{a}}{t}} + \frac{x}{a} \]
    8. Simplified67.3%

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

    if -8.8e7 < a < -1e-52 or -2.19999999999999977e-193 < a < -3.6000000000000001e-294 or 4.00000000000000019e-181 < a < 7e6

    1. Initial program 68.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*68.7%

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

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

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

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

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

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

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

    if -1e-52 < a < -2.19999999999999977e-193 or -3.6000000000000001e-294 < a < 4.00000000000000019e-181

    1. Initial program 79.1%

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
      3. div-inv60.1%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -88000000:\\ \;\;\;\;y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-52}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;a \leq -2.2 \cdot 10^{-193}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq -3.6 \cdot 10^{-294}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;a \leq 4 \cdot 10^{-181}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 7000000:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 79.8% 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 -2.2 \cdot 10^{-108}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-264}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-308}:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(a + 1\right)} + \frac{y}{t \cdot \left(a + 1\right)}\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-128}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \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 -2.2e-108)
     t_1
     (if (<= t -6.5e-264)
       (+ (/ z b) (/ (/ (* x t) b) y))
       (if (<= t 8e-308)
         (* z (+ (/ x (* z (+ a 1.0))) (/ y (* t (+ a 1.0)))))
         (if (<= t 6.2e-128) (+ (/ z b) (* t (/ x (* y b)))) 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 <= -2.2e-108) {
		tmp = t_1;
	} else if (t <= -6.5e-264) {
		tmp = (z / b) + (((x * t) / b) / y);
	} else if (t <= 8e-308) {
		tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))));
	} else if (t <= 6.2e-128) {
		tmp = (z / b) + (t * (x / (y * b)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + (y * (z / t))) / ((a + 1.0d0) + (y * (b / t)))
    if (t <= (-2.2d-108)) then
        tmp = t_1
    else if (t <= (-6.5d-264)) then
        tmp = (z / b) + (((x * t) / b) / y)
    else if (t <= 8d-308) then
        tmp = z * ((x / (z * (a + 1.0d0))) + (y / (t * (a + 1.0d0))))
    else if (t <= 6.2d-128) then
        tmp = (z / b) + (t * (x / (y * b)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	double tmp;
	if (t <= -2.2e-108) {
		tmp = t_1;
	} else if (t <= -6.5e-264) {
		tmp = (z / b) + (((x * t) / b) / y);
	} else if (t <= 8e-308) {
		tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))));
	} else if (t <= 6.2e-128) {
		tmp = (z / b) + (t * (x / (y * b)));
	} 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 <= -2.2e-108:
		tmp = t_1
	elif t <= -6.5e-264:
		tmp = (z / b) + (((x * t) / b) / y)
	elif t <= 8e-308:
		tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))))
	elif t <= 6.2e-128:
		tmp = (z / b) + (t * (x / (y * b)))
	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 <= -2.2e-108)
		tmp = t_1;
	elseif (t <= -6.5e-264)
		tmp = Float64(Float64(z / b) + Float64(Float64(Float64(x * t) / b) / y));
	elseif (t <= 8e-308)
		tmp = Float64(z * Float64(Float64(x / Float64(z * Float64(a + 1.0))) + Float64(y / Float64(t * Float64(a + 1.0)))));
	elseif (t <= 6.2e-128)
		tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b))));
	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 <= -2.2e-108)
		tmp = t_1;
	elseif (t <= -6.5e-264)
		tmp = (z / b) + (((x * t) / b) / y);
	elseif (t <= 8e-308)
		tmp = z * ((x / (z * (a + 1.0))) + (y / (t * (a + 1.0))));
	elseif (t <= 6.2e-128)
		tmp = (z / b) + (t * (x / (y * b)));
	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, -2.2e-108], t$95$1, If[LessEqual[t, -6.5e-264], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-308], N[(z * N[(N[(x / N[(z * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(y / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.2e-128], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $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 -2.2 \cdot 10^{-108}:\\
\;\;\;\;t\_1\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.2000000000000001e-108 or 6.20000000000000005e-128 < t

    1. Initial program 79.4%

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

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

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

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

    if -2.2000000000000001e-108 < t < -6.5000000000000001e-264

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{\color{blue}{\frac{-x \cdot t}{b}}}{y} + \frac{z}{b} \]
      4. distribute-lft-neg-in75.4%

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

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

    if -6.5000000000000001e-264 < t < 8.00000000000000026e-308

    1. Initial program 65.0%

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

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

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

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

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

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

    if 8.00000000000000026e-308 < t < 6.20000000000000005e-128

    1. Initial program 60.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*50.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-108}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-264}:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-308}:\\ \;\;\;\;z \cdot \left(\frac{x}{z \cdot \left(a + 1\right)} + \frac{y}{t \cdot \left(a + 1\right)}\right)\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-128}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 67.6% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.05 \cdot 10^{+74}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\

\mathbf{elif}\;b \leq 1.4 \cdot 10^{-14} \lor \neg \left(b \leq 3800\right) \land b \leq 3.4 \cdot 10^{+57}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.0499999999999999e74

    1. Initial program 57.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*53.2%

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

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

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

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

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

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

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

    if -1.0499999999999999e74 < b < 1.4e-14 or 3800 < b < 3.39999999999999992e57

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if 1.4e-14 < b < 3800 or 3.39999999999999992e57 < b

    1. Initial program 63.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*61.5%

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} + \frac{z}{b} \]
      3. distribute-rgt-neg-in79.5%

        \[\leadsto -1 \cdot \frac{\color{blue}{t \cdot \left(-\frac{x}{b}\right)}}{y} + \frac{z}{b} \]
      4. distribute-neg-frac279.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.05 \cdot 10^{+74}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;b \leq 1.4 \cdot 10^{-14} \lor \neg \left(b \leq 3800\right) \land b \leq 3.4 \cdot 10^{+57}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 67.6% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq 1.45 \cdot 10^{-14}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;b \leq 1.35 \cdot 10^{+57}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -7.99999999999999986e73

    1. Initial program 57.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*53.2%

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

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

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

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

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

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

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

    if -7.99999999999999986e73 < b < 1.4500000000000001e-14 or 5e3 < b < 1.3499999999999999e57

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    if 1.4500000000000001e-14 < b < 5e3

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

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

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

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

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

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

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

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

        \[\leadsto -1 \cdot \frac{\color{blue}{\frac{-x \cdot t}{b}}}{y} + \frac{z}{b} \]
      4. distribute-lft-neg-in79.8%

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

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

    if 1.3499999999999999e57 < b

    1. Initial program 63.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*62.0%

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

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

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

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

      \[\leadsto -1 \cdot \frac{\color{blue}{-1 \cdot \frac{t \cdot x}{b}}}{y} + \frac{z}{b} \]
    7. Step-by-step derivation
      1. mul-1-neg73.5%

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

        \[\leadsto -1 \cdot \frac{-\color{blue}{t \cdot \frac{x}{b}}}{y} + \frac{z}{b} \]
      3. distribute-rgt-neg-in79.4%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{+73}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;b \leq 1.45 \cdot 10^{-14}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;b \leq 5000:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{x \cdot t}{b}}{y}\\ \mathbf{elif}\;b \leq 1.35 \cdot 10^{+57}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t \cdot \frac{x}{b}}{y}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 79.9% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.8000000000000001e239

    1. Initial program 39.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*49.2%

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

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

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

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

    if -3.8000000000000001e239 < y < 3.8000000000000002e261

    1. Initial program 79.1%

      \[\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. *-commutative79.1%

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

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

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

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

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

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

    if 3.8000000000000002e261 < y

    1. Initial program 45.3%

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

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

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

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

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

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

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

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

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

Alternative 9: 55.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 32500:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.30000000000000007e-10 or 32500 < a

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

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

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

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

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

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

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

        \[\leadsto y \cdot \color{blue}{\frac{\frac{z}{a}}{t}} + \frac{x}{a} \]
    8. Simplified65.6%

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

    if -2.30000000000000007e-10 < a < 4.2e-178

    1. Initial program 78.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*74.5%

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{1 + a} \]
      2. *-commutative50.3%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
      3. div-inv50.3%

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

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

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

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

    if 4.2e-178 < a < 32500

    1. Initial program 62.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*66.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\ \;\;\;\;y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-178}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 32500:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;y \cdot \frac{\frac{z}{a}}{t} + \frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 55.1% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -1.85 \cdot 10^{-15}:\\
\;\;\;\;t \cdot \frac{x}{y \cdot b}\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-21} \lor \neg \left(y \leq 5.8 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.39999999999999991e69 or -1.85000000000000008e-15 < y < -3.59999999999999989e-21 or 5.79999999999999955e96 < y

    1. Initial program 51.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*60.4%

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

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

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

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

    if -1.39999999999999991e69 < y < -1.85000000000000008e-15

    1. Initial program 76.1%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{y \cdot b}} \]
    8. Simplified51.5%

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

    if -3.59999999999999989e-21 < y < 5.79999999999999955e96

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

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

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

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

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

Alternative 11: 56.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -5 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{b \cdot \frac{y}{t} + 1}\\

\mathbf{elif}\;y \leq -3.5 \cdot 10^{-21} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.5000000000000003e68 or -5.0000000000000004e-16 < y < -3.5000000000000003e-21 or 5.5000000000000002e96 < y

    1. Initial program 51.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*60.4%

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

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

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

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

    if -4.5000000000000003e68 < y < -5.0000000000000004e-16

    1. Initial program 76.1%

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

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

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

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

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

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

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

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

    if -3.5000000000000003e-21 < y < 5.5000000000000002e96

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

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

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

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

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

Alternative 12: 56.0% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -4.25 \cdot 10^{-16}:\\
\;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-21} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.50000000000000018e69 or -4.25e-16 < y < -3.59999999999999989e-21 or 5.5000000000000002e96 < y

    1. Initial program 51.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*60.4%

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

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

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

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

    if -2.50000000000000018e69 < y < -4.25e-16

    1. Initial program 76.1%

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

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

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

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

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

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

    if -3.59999999999999989e-21 < y < 5.5000000000000002e96

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -4.25 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-21} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.9% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.30000000000000007e-10 or 3.1e5 < a

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{a} \]
      2. *-commutative60.2%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{a} \]
    7. Applied egg-rr60.2%

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

    if -2.30000000000000007e-10 < a < 4.2e-178

    1. Initial program 78.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*74.5%

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{1 + a} \]
      2. *-commutative50.3%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
      3. div-inv50.3%

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

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

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

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

    if 4.2e-178 < a < 3.1e5

    1. Initial program 62.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*66.2%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq 4.2 \cdot 10^{-178}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 310000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 53.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-179}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 220000:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -2.30000000000000007e-10

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

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

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

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

    if -2.30000000000000007e-10 < a < 1.80000000000000004e-179

    1. Initial program 78.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*74.5%

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{1 + a} \]
      2. *-commutative50.3%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
      3. div-inv50.3%

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

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

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

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

    if 1.80000000000000004e-179 < a < 2.2e5

    1. Initial program 62.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*66.2%

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

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

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

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

    if 2.2e5 < a

    1. Initial program 73.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*79.2%

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{a} \]
    7. Applied egg-rr62.0%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-10}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-179}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 220000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 64.7% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -5.1 \cdot 10^{+32} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \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 -5.1e+32) (not (<= y 5.5e+96)))
   (+ (/ z b) (* t (/ x (* y b))))
   (/ 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 <= -5.1e+32) || !(y <= 5.5e+96)) {
		tmp = (z / b) + (t * (x / (y * b)));
	} 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 <= (-5.1d+32)) .or. (.not. (y <= 5.5d+96))) then
        tmp = (z / b) + (t * (x / (y * b)))
    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 <= -5.1e+32) || !(y <= 5.5e+96)) {
		tmp = (z / b) + (t * (x / (y * b)));
	} else {
		tmp = x / (((y * b) / t) + (a + 1.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -5.1e+32) or not (y <= 5.5e+96):
		tmp = (z / b) + (t * (x / (y * b)))
	else:
		tmp = x / (((y * b) / t) + (a + 1.0))
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -5.1e+32) || !(y <= 5.5e+96))
		tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b))));
	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 <= -5.1e+32) || ~((y <= 5.5e+96)))
		tmp = (z / b) + (t * (x / (y * b)));
	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, -5.1e+32], N[Not[LessEqual[y, 5.5e+96]], $MachinePrecision]], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $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 -5.1 \cdot 10^{+32} \lor \neg \left(y \leq 5.5 \cdot 10^{+96}\right):\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\

\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 < -5.10000000000000004e32 or 5.5000000000000002e96 < y

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

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

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

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

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

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

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

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

    if -5.10000000000000004e32 < y < 5.5000000000000002e96

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

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

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

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

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

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

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

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

Alternative 16: 63.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.19999999999999986e32 or 2.25000000000000011e170 < y

    1. Initial program 51.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*58.2%

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

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

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

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

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

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

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

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

    if -6.19999999999999986e32 < y < 2.25000000000000011e170

    1. Initial program 85.0%

      \[\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. *-commutative85.0%

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

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

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

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

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

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

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

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

Alternative 17: 67.1% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -9.199999999999999e72 or 8.00000000000000074e56 < b

    1. Initial program 60.9%

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

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

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

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

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

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

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

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

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

    if -9.199999999999999e72 < b < 8.00000000000000074e56

    1. Initial program 82.2%

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

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

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

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

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

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

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

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

Alternative 18: 42.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;a \leq -2.5 \cdot 10^{-201}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 310000:\\
\;\;\;\;\frac{z}{b}\\

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


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

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

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

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

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

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

    if -1 < a < -2.5e-201

    1. Initial program 82.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*82.5%

        \[\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 y around 0 40.7%

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

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

    if -2.5e-201 < a < 3.1e5

    1. Initial program 69.3%

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

        \[\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 y around inf 44.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-201}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 310000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 19: 56.5% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -4 \cdot 10^{+33} \lor \neg \left(y \leq 6.5 \cdot 10^{+96}\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 -4e+33) (not (<= y 6.5e+96))) (/ z b) (/ x (+ a 1.0))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((y <= -4e+33) || !(y <= 6.5e+96)) {
		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 <= (-4d+33)) .or. (.not. (y <= 6.5d+96))) 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 <= -4e+33) || !(y <= 6.5e+96)) {
		tmp = z / b;
	} else {
		tmp = x / (a + 1.0);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -4e+33) or not (y <= 6.5e+96):
		tmp = z / b
	else:
		tmp = x / (a + 1.0)
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if ((y <= -4e+33) || !(y <= 6.5e+96))
		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 <= -4e+33) || ~((y <= 6.5e+96)))
		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, -4e+33], N[Not[LessEqual[y, 6.5e+96]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.9999999999999998e33 or 6.5e96 < y

    1. Initial program 51.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*60.3%

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

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

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

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

    if -3.9999999999999998e33 < y < 6.5e96

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

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

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

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

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

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

Alternative 20: 42.3% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1 \lor \neg \left(a \leq 660000\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 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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 <= 660000.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, 660000.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}

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

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


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

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

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

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

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

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

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

    if -1 < a < 6.6e5

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

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

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

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

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

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

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

Alternative 21: 20.0% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 74.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*73.9%

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 79.7% 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 2024076 
(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))))