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

Percentage Accurate: 75.9% → 89.9%
Time: 17.7s
Alternatives: 17
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 17 alternatives:

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

Initial Program: 75.9% 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.9% accurate, 0.1× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\

\mathbf{elif}\;t\_1 \leq 10^{+301}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{z \cdot \left(\frac{\frac{x}{z}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\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))) < -1.99999999999999987e-275 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000005e301

    1. Initial program 99.7%

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

    if -1.99999999999999987e-275 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

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

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

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

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

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

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

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

    1. Initial program 18.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*29.4%

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

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

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

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

Alternative 2: 90.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-275}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\

\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 24.6%

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99999999999999987e-275 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000005e301

    1. Initial program 99.7%

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

    if -1.99999999999999987e-275 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

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

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

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

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

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

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

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

    1. Initial program 18.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*29.4%

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

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

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

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

Alternative 3: 87.7% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{x \cdot \left(\frac{t}{y} + \frac{z}{x}\right)}{b}\\

\mathbf{elif}\;t\_2 \leq 10^{+301}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 88.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. *-commutative88.6%

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

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

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

    if -1.99999999999999987e-275 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

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

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

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

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

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

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

    if -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.00000000000000005e301

    1. Initial program 99.7%

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

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

    1. Initial program 18.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*29.4%

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

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

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

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

Alternative 4: 78.2% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\ t_2 := \frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-182}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-247}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-259}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (* y (/ z t))) (+ (* y (/ b t)) (+ a 1.0))))
        (t_2 (/ (+ z (/ (* x t) y)) b)))
   (if (<= t -1.45e-21)
     t_1
     (if (<= t -2.7e-182)
       t_2
       (if (<= t -5.5e-247)
         (/ (* y z) (+ (* y b) (* t (+ a 1.0))))
         (if (<= t 1.9e-259) t_2 t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
	double t_2 = (z + ((x * t) / y)) / b;
	double tmp;
	if (t <= -1.45e-21) {
		tmp = t_1;
	} else if (t <= -2.7e-182) {
		tmp = t_2;
	} else if (t <= -5.5e-247) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (t <= 1.9e-259) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0d0))
    t_2 = (z + ((x * t) / y)) / b
    if (t <= (-1.45d-21)) then
        tmp = t_1
    else if (t <= (-2.7d-182)) then
        tmp = t_2
    else if (t <= (-5.5d-247)) then
        tmp = (y * z) / ((y * b) + (t * (a + 1.0d0)))
    else if (t <= 1.9d-259) then
        tmp = t_2
    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))) / ((y * (b / t)) + (a + 1.0));
	double t_2 = (z + ((x * t) / y)) / b;
	double tmp;
	if (t <= -1.45e-21) {
		tmp = t_1;
	} else if (t <= -2.7e-182) {
		tmp = t_2;
	} else if (t <= -5.5e-247) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (t <= 1.9e-259) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0))
	t_2 = (z + ((x * t) / y)) / b
	tmp = 0
	if t <= -1.45e-21:
		tmp = t_1
	elif t <= -2.7e-182:
		tmp = t_2
	elif t <= -5.5e-247:
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)))
	elif t <= 1.9e-259:
		tmp = t_2
	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(y * Float64(b / t)) + Float64(a + 1.0)))
	t_2 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b)
	tmp = 0.0
	if (t <= -1.45e-21)
		tmp = t_1;
	elseif (t <= -2.7e-182)
		tmp = t_2;
	elseif (t <= -5.5e-247)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))));
	elseif (t <= 1.9e-259)
		tmp = t_2;
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (y * (z / t))) / ((y * (b / t)) + (a + 1.0));
	t_2 = (z + ((x * t) / y)) / b;
	tmp = 0.0;
	if (t <= -1.45e-21)
		tmp = t_1;
	elseif (t <= -2.7e-182)
		tmp = t_2;
	elseif (t <= -5.5e-247)
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	elseif (t <= 1.9e-259)
		tmp = t_2;
	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[(y * N[(b / t), $MachinePrecision]), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[t, -1.45e-21], t$95$1, If[LessEqual[t, -2.7e-182], t$95$2, If[LessEqual[t, -5.5e-247], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.9e-259], t$95$2, t$95$1]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-182}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{-259}:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.45e-21 or 1.9e-259 < t

    1. Initial program 81.0%

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

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

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

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

    if -1.45e-21 < t < -2.69999999999999999e-182 or -5.49999999999999995e-247 < t < 1.9e-259

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

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

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

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

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

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

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

    if -2.69999999999999999e-182 < t < -5.49999999999999995e-247

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-182}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-247}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-259}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{y \cdot \frac{b}{t} + \left(a + 1\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 66.5% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-131}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.99999999999999991e-21 or 4.99999999999999961e-227 < t < 4.60000000000000044e-131 or 7.5e-73 < t

    1. Initial program 80.5%

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

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

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

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

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

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

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

    if -2.99999999999999991e-21 < t < 4.99999999999999961e-227

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

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

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

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

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

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

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

    if 4.60000000000000044e-131 < t < 1.2499999999999999e-95

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

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

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

    if 1.2499999999999999e-95 < t < 7.5e-73

    1. Initial program 99.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*99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3 \cdot 10^{-21}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-227}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-131}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-95}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 7.5 \cdot 10^{-73}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.4% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.35 \cdot 10^{-130}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t \leq 8.5 \cdot 10^{-95}:\\
\;\;\;\;\frac{z}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.45e-21 or 4.99999999999999961e-227 < t < 2.34999999999999984e-130 or 1.3500000000000001e-70 < t

    1. Initial program 80.5%

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

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

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

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

    if -1.45e-21 < t < 4.99999999999999961e-227

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

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

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

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

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

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

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

    if 2.34999999999999984e-130 < t < 8.4999999999999995e-95

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

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

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

    if 8.4999999999999995e-95 < t < 1.3500000000000001e-70

    1. Initial program 99.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*99.7%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{-227}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 2.35 \cdot 10^{-130}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-95}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-70}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 50.5% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + y \cdot \frac{z}{t}}{a}\\ t_2 := x + \frac{y \cdot z}{t}\\ \mathbf{if}\;a \leq -1.16 \cdot 10^{+166}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq -7.8 \cdot 10^{-46}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -5 \cdot 10^{-88}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -5.1 \cdot 10^{-232}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.65:\\ \;\;\;\;t\_2\\ \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)) (t_2 (+ x (/ (* y z) t))))
   (if (<= a -1.16e+166)
     t_1
     (if (<= a -7.8e-46)
       (/ z b)
       (if (<= a -5e-88)
         t_2
         (if (<= a -5.1e-232) (/ z b) (if (<= a 1.65) t_2 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 t_2 = x + ((y * z) / t);
	double tmp;
	if (a <= -1.16e+166) {
		tmp = t_1;
	} else if (a <= -7.8e-46) {
		tmp = z / b;
	} else if (a <= -5e-88) {
		tmp = t_2;
	} else if (a <= -5.1e-232) {
		tmp = z / b;
	} else if (a <= 1.65) {
		tmp = t_2;
	} 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) :: t_2
    real(8) :: tmp
    t_1 = (x + (y * (z / t))) / a
    t_2 = x + ((y * z) / t)
    if (a <= (-1.16d+166)) then
        tmp = t_1
    else if (a <= (-7.8d-46)) then
        tmp = z / b
    else if (a <= (-5d-88)) then
        tmp = t_2
    else if (a <= (-5.1d-232)) then
        tmp = z / b
    else if (a <= 1.65d0) then
        tmp = t_2
    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 t_2 = x + ((y * z) / t);
	double tmp;
	if (a <= -1.16e+166) {
		tmp = t_1;
	} else if (a <= -7.8e-46) {
		tmp = z / b;
	} else if (a <= -5e-88) {
		tmp = t_2;
	} else if (a <= -5.1e-232) {
		tmp = z / b;
	} else if (a <= 1.65) {
		tmp = t_2;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (y * (z / t))) / a
	t_2 = x + ((y * z) / t)
	tmp = 0
	if a <= -1.16e+166:
		tmp = t_1
	elif a <= -7.8e-46:
		tmp = z / b
	elif a <= -5e-88:
		tmp = t_2
	elif a <= -5.1e-232:
		tmp = z / b
	elif a <= 1.65:
		tmp = t_2
	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)
	t_2 = Float64(x + Float64(Float64(y * z) / t))
	tmp = 0.0
	if (a <= -1.16e+166)
		tmp = t_1;
	elseif (a <= -7.8e-46)
		tmp = Float64(z / b);
	elseif (a <= -5e-88)
		tmp = t_2;
	elseif (a <= -5.1e-232)
		tmp = Float64(z / b);
	elseif (a <= 1.65)
		tmp = t_2;
	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;
	t_2 = x + ((y * z) / t);
	tmp = 0.0;
	if (a <= -1.16e+166)
		tmp = t_1;
	elseif (a <= -7.8e-46)
		tmp = z / b;
	elseif (a <= -5e-88)
		tmp = t_2;
	elseif (a <= -5.1e-232)
		tmp = z / b;
	elseif (a <= 1.65)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -1.16e+166], t$95$1, If[LessEqual[a, -7.8e-46], N[(z / b), $MachinePrecision], If[LessEqual[a, -5e-88], t$95$2, If[LessEqual[a, -5.1e-232], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.65], t$95$2, t$95$1]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;a \leq -5 \cdot 10^{-88}:\\
\;\;\;\;t\_2\\

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

\mathbf{elif}\;a \leq 1.65:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 76.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*80.8%

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

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

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

    if -1.16000000000000002e166 < a < -7.8000000000000005e-46 or -5.00000000000000009e-88 < a < -5.10000000000000029e-232

    1. Initial program 70.1%

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

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

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

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

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

    if -7.8000000000000005e-46 < a < -5.00000000000000009e-88 or -5.10000000000000029e-232 < a < 1.6499999999999999

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

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

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

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

      \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 81.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -4.6e68

    1. Initial program 54.8%

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

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

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

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

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

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

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

    if -4.6e68 < y < 2.99999999999999995e24

    1. Initial program 94.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. *-commutative94.1%

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

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

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

    if 2.99999999999999995e24 < y < 1.5999999999999999e229

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

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

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

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

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

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

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

    if 1.5999999999999999e229 < y

    1. Initial program 15.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*27.9%

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

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

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

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

Alternative 9: 81.8% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.15000000000000008e69

    1. Initial program 54.8%

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

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

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

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

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

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

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

    if -1.15000000000000008e69 < y < 5.0000000000000001e26

    1. Initial program 94.2%

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

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

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

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

    if 5.0000000000000001e26 < y < 9.9999999999999999e228

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

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

    if 9.9999999999999999e228 < y

    1. Initial program 15.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*27.9%

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

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

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

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

Alternative 10: 65.8% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;b \leq 4.4 \cdot 10^{+36} \lor \neg \left(b \leq 2 \cdot 10^{+94}\right):\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.07999999999999993e86 or 2.60000000000000013e-19 < b < 4.40000000000000001e36 or 2e94 < b

    1. Initial program 56.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*54.1%

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

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

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

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

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

    if -1.07999999999999993e86 < b < 2.60000000000000013e-19

    1. Initial program 86.0%

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

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

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

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

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

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

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

    if 4.40000000000000001e36 < b < 2e94

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

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

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

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

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

Alternative 11: 65.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{if}\;t \leq -3.1 \cdot 10^{-21}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-34}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ (* x t) y)) b))
        (t_2 (/ x (+ (+ a 1.0) (/ y (/ t b))))))
   (if (<= t -3.1e-21)
     t_2
     (if (<= t 4.5e-231)
       t_1
       (if (<= t 2.9e-195)
         (/ (+ x (/ (* y z) t)) a)
         (if (<= t 1.35e-34) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + ((x * t) / y)) / b;
	double t_2 = x / ((a + 1.0) + (y / (t / b)));
	double tmp;
	if (t <= -3.1e-21) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 2.9e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 1.35e-34) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + ((x * t) / y)) / b
    t_2 = x / ((a + 1.0d0) + (y / (t / b)))
    if (t <= (-3.1d-21)) then
        tmp = t_2
    else if (t <= 4.5d-231) then
        tmp = t_1
    else if (t <= 2.9d-195) then
        tmp = (x + ((y * z) / t)) / a
    else if (t <= 1.35d-34) 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 + ((x * t) / y)) / b;
	double t_2 = x / ((a + 1.0) + (y / (t / b)));
	double tmp;
	if (t <= -3.1e-21) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 2.9e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 1.35e-34) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + ((x * t) / y)) / b
	t_2 = x / ((a + 1.0) + (y / (t / b)))
	tmp = 0
	if t <= -3.1e-21:
		tmp = t_2
	elif t <= 4.5e-231:
		tmp = t_1
	elif t <= 2.9e-195:
		tmp = (x + ((y * z) / t)) / a
	elif t <= 1.35e-34:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b)
	t_2 = Float64(x / Float64(Float64(a + 1.0) + Float64(y / Float64(t / b))))
	tmp = 0.0
	if (t <= -3.1e-21)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 2.9e-195)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (t <= 1.35e-34)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + ((x * t) / y)) / b;
	t_2 = x / ((a + 1.0) + (y / (t / b)));
	tmp = 0.0;
	if (t <= -3.1e-21)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 2.9e-195)
		tmp = (x + ((y * z) / t)) / a;
	elseif (t <= 1.35e-34)
		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 + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(N[(a + 1.0), $MachinePrecision] + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.1e-21], t$95$2, If[LessEqual[t, 4.5e-231], t$95$1, If[LessEqual[t, 2.9e-195], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 1.35e-34], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 1.35 \cdot 10^{-34}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.0999999999999998e-21 or 1.35000000000000008e-34 < t

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

    if -3.0999999999999998e-21 < t < 4.4999999999999998e-231 or 2.9000000000000002e-195 < t < 1.35000000000000008e-34

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

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

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

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

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

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

    if 4.4999999999999998e-231 < t < 2.9000000000000002e-195

    1. Initial program 99.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*90.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.1 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 1.35 \cdot 10^{-34}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 63.1% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-95}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ (* x t) y)) b))
        (t_2 (/ x (+ 1.0 (+ a (/ (* y b) t))))))
   (if (<= t -1.45e-21)
     t_2
     (if (<= t 4.5e-231)
       t_1
       (if (<= t 3.25e-195)
         (/ (+ x (/ (* y z) t)) a)
         (if (<= t 4.6e-95) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + ((x * t) / y)) / b;
	double t_2 = x / (1.0 + (a + ((y * b) / t)));
	double tmp;
	if (t <= -1.45e-21) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 3.25e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 4.6e-95) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + ((x * t) / y)) / b
    t_2 = x / (1.0d0 + (a + ((y * b) / t)))
    if (t <= (-1.45d-21)) then
        tmp = t_2
    else if (t <= 4.5d-231) then
        tmp = t_1
    else if (t <= 3.25d-195) then
        tmp = (x + ((y * z) / t)) / a
    else if (t <= 4.6d-95) 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 + ((x * t) / y)) / b;
	double t_2 = x / (1.0 + (a + ((y * b) / t)));
	double tmp;
	if (t <= -1.45e-21) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 3.25e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 4.6e-95) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + ((x * t) / y)) / b
	t_2 = x / (1.0 + (a + ((y * b) / t)))
	tmp = 0
	if t <= -1.45e-21:
		tmp = t_2
	elif t <= 4.5e-231:
		tmp = t_1
	elif t <= 3.25e-195:
		tmp = (x + ((y * z) / t)) / a
	elif t <= 4.6e-95:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b)
	t_2 = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))))
	tmp = 0.0
	if (t <= -1.45e-21)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 3.25e-195)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (t <= 4.6e-95)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + ((x * t) / y)) / b;
	t_2 = x / (1.0 + (a + ((y * b) / t)));
	tmp = 0.0;
	if (t <= -1.45e-21)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 3.25e-195)
		tmp = (x + ((y * z) / t)) / a;
	elseif (t <= 4.6e-95)
		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 + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.45e-21], t$95$2, If[LessEqual[t, 4.5e-231], t$95$1, If[LessEqual[t, 3.25e-195], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 4.6e-95], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-95}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.45e-21 or 4.59999999999999998e-95 < t

    1. Initial program 80.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.9%

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

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

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

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

    if -1.45e-21 < t < 4.4999999999999998e-231 or 3.25000000000000002e-195 < t < 4.59999999999999998e-95

    1. Initial program 67.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.3%

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

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

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

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

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

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

    if 4.4999999999999998e-231 < t < 3.25000000000000002e-195

    1. Initial program 99.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*90.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 3.25 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-95}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 67.5% accurate, 0.6× speedup?

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

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

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

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

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


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

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

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

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

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

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

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

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

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

    if -1.3e124 < a < -3.4e12

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

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

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

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

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

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

    if -3.4e12 < a < 0.00115

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

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

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

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

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

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

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

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

Alternative 14: 59.5% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{x \cdot t}{y}}{b}\\ t_2 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{-20}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-33}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ (* x t) y)) b)) (t_2 (/ x (+ a 1.0))))
   (if (<= t -3.5e-20)
     t_2
     (if (<= t 4.5e-231)
       t_1
       (if (<= t 2.9e-195)
         (/ (+ x (/ (* y z) t)) a)
         (if (<= t 6.2e-33) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + ((x * t) / y)) / b;
	double t_2 = x / (a + 1.0);
	double tmp;
	if (t <= -3.5e-20) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 2.9e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 6.2e-33) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z + ((x * t) / y)) / b
    t_2 = x / (a + 1.0d0)
    if (t <= (-3.5d-20)) then
        tmp = t_2
    else if (t <= 4.5d-231) then
        tmp = t_1
    else if (t <= 2.9d-195) then
        tmp = (x + ((y * z) / t)) / a
    else if (t <= 6.2d-33) 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 + ((x * t) / y)) / b;
	double t_2 = x / (a + 1.0);
	double tmp;
	if (t <= -3.5e-20) {
		tmp = t_2;
	} else if (t <= 4.5e-231) {
		tmp = t_1;
	} else if (t <= 2.9e-195) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 6.2e-33) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + ((x * t) / y)) / b
	t_2 = x / (a + 1.0)
	tmp = 0
	if t <= -3.5e-20:
		tmp = t_2
	elif t <= 4.5e-231:
		tmp = t_1
	elif t <= 2.9e-195:
		tmp = (x + ((y * z) / t)) / a
	elif t <= 6.2e-33:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(Float64(x * t) / y)) / b)
	t_2 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -3.5e-20)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 2.9e-195)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (t <= 6.2e-33)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + ((x * t) / y)) / b;
	t_2 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -3.5e-20)
		tmp = t_2;
	elseif (t <= 4.5e-231)
		tmp = t_1;
	elseif (t <= 2.9e-195)
		tmp = (x + ((y * z) / t)) / a;
	elseif (t <= 6.2e-33)
		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 + N[(N[(x * t), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.5e-20], t$95$2, If[LessEqual[t, 4.5e-231], t$95$1, If[LessEqual[t, 2.9e-195], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 6.2e-33], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-33}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.50000000000000003e-20 or 6.19999999999999994e-33 < t

    1. Initial program 80.1%

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

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

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

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

    if -3.50000000000000003e-20 < t < 4.4999999999999998e-231 or 2.9000000000000002e-195 < t < 6.19999999999999994e-33

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

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

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

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

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

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

    if 4.4999999999999998e-231 < t < 2.9000000000000002e-195

    1. Initial program 99.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*90.2%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 4.5 \cdot 10^{-231}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-195}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 54.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.2 \cdot 10^{-21} \lor \neg \left(t \leq 5 \cdot 10^{-227} \lor \neg \left(t \leq 1.25 \cdot 10^{-181}\right) \land t \leq 4.6 \cdot 10^{-29}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.2000000000000001e-21 or 4.99999999999999961e-227 < t < 1.25e-181 or 4.59999999999999982e-29 < t

    1. Initial program 80.9%

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

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

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

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

    if -2.2000000000000001e-21 < t < 4.99999999999999961e-227 or 1.25e-181 < t < 4.59999999999999982e-29

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.2 \cdot 10^{-21} \lor \neg \left(t \leq 5 \cdot 10^{-227} \lor \neg \left(t \leq 1.25 \cdot 10^{-181}\right) \land t \leq 4.6 \cdot 10^{-29}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 16: 42.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6 \cdot 10^{+123} \lor \neg \left(a \leq 5.8 \cdot 10^{+33}\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 77.6%

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

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

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

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

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

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

    if -6.00000000000000016e123 < a < 5.80000000000000049e33

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

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

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

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

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

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

Alternative 17: 25.8% accurate, 5.7× speedup?

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

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

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

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

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

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

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

Developer target: 79.4% 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 2024110 
(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))))