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

Percentage Accurate: 75.5% → 91.0%
Time: 20.1s
Alternatives: 19
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 75.5% accurate, 1.0× speedup?

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

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

Alternative 1: 91.0% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-299}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z \cdot t}{\frac{{b}^{2}}{a + 1}}\right)}{y}\\ \mathbf{elif}\;t\_1 \leq 10^{+303}:\\ \;\;\;\;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)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (* (/ y t) (/ z (+ (+ a 1.0) (* y (/ b t)))))
     (if (<= t_1 -1e-299)
       t_1
       (if (<= t_1 0.0)
         (-
          (/ z b)
          (/ (fma -1.0 (/ t (/ b x)) (/ (* z t) (/ (pow b 2.0) (+ a 1.0)))) y))
         (if (<= t_1 1e+303) 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)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (y / t) * (z / ((a + 1.0) + (y * (b / t))));
	} else if (t_1 <= -1e-299) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z / b) - (fma(-1.0, (t / (b / x)), ((z * t) / (pow(b, 2.0) / (a + 1.0)))) / y);
	} else if (t_1 <= 1e+303) {
		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(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))));
	elseif (t_1 <= -1e-299)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(z / b) - Float64(fma(-1.0, Float64(t / Float64(b / x)), Float64(Float64(z * t) / Float64((b ^ 2.0) / Float64(a + 1.0)))) / y));
	elseif (t_1 <= 1e+303)
		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[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-299], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] - N[(N[(-1.0 * N[(t / N[(b / x), $MachinePrecision]), $MachinePrecision] + N[(N[(z * t), $MachinePrecision] / N[(N[Power[b, 2.0], $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{z}{b} - \frac{\mathsf{fma}\left(-1, \frac{t}{\frac{b}{x}}, \frac{z \cdot t}{\frac{{b}^{2}}{a + 1}}\right)}{y}\\

\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;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 1) (/.f64 (*.f64 y b) t))) < -inf.0

    1. Initial program 34.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.99999999999999992e-300 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303

    1. Initial program 98.5%

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

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

    1. Initial program 42.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 9.7%

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

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

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

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

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

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

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

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

Alternative 2: 90.2% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-253}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t\_2}\\

\mathbf{elif}\;t\_1 \leq 10^{+303}:\\
\;\;\;\;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 1) (/.f64 (*.f64 y b) t))) < -inf.0

    1. Initial program 34.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.0000000000000002e-192 or 2.0000000000000001e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303

    1. Initial program 99.6%

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

    if -2.0000000000000002e-192 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e-253

    1. Initial program 57.5%

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

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

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

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

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

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

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

    1. Initial program 9.7%

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

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

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

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

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

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

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

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

Alternative 3: 50.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -1.02 \cdot 10^{+15}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

\mathbf{elif}\;y \leq -0.011:\\
\;\;\;\;\frac{z}{b}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.99999999999999988e166 or -1.02e15 < y < -0.010999999999999999 or 8.9999999999999998e92 < y

    1. Initial program 41.1%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < -1.02e15

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

    if -0.010999999999999999 < y < -6.59999999999999993e-100

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.59999999999999993e-100 < y < -6.9999999999999996e-150

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.9999999999999996e-150 < y < 8.9999999999999998e92

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -1.02 \cdot 10^{+15}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq -0.011:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -6.6 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \frac{y}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 51.1% accurate, 0.5× speedup?

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

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

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

\mathbf{elif}\;y \leq -0.2:\\
\;\;\;\;\frac{z}{b}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.99999999999999988e166 or -1.1e14 < y < -0.20000000000000001 or 8.9999999999999998e92 < y

    1. Initial program 41.1%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < -1.1e14

    1. Initial program 67.8%

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

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

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

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

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

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

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

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

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

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

    if -0.20000000000000001 < y < -6e-102

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -6e-102 < y < -6.0000000000000003e-150

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

    if -6.0000000000000003e-150 < y < 8.9999999999999998e92

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -1.1 \cdot 10^{+14}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq -0.2:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-102}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;y \leq -6 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 52.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -2.8 \cdot 10^{+97}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 6 regimes
  2. if y < -1.99999999999999988e166 or 1.3e93 < y

    1. Initial program 39.7%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < -2.7999999999999999e97

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

    if -2.7999999999999999e97 < y < -0.00350000000000000007

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

    if -0.00350000000000000007 < y < -7.6000000000000006e-98

    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.6000000000000006e-98 < y < -6.9999999999999996e-150

    1. Initial program 87.8%

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

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

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

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

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

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

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

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

    if -6.9999999999999996e-150 < y < 1.3e93

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -2.8 \cdot 10^{+97}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq -0.0035:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;y \leq -7.6 \cdot 10^{-98}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;y \leq -7 \cdot 10^{-150}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;y \leq 1.3 \cdot 10^{+93}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 64.1% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.99999999999999988e166 or 1.0499999999999999e93 < y

    1. Initial program 39.7%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < 9.5999999999999999e-265

    1. Initial program 87.9%

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

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

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

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

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

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

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

    if 9.5999999999999999e-265 < y < 1.65000000000000006e-91

    1. Initial program 93.5%

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

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

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

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

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

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

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

    if 1.65000000000000006e-91 < y < 1.0499999999999999e93

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 60.1% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -2.7 \cdot 10^{+102}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.99999999999999988e166 or 2.19999999999999999e91 < y

    1. Initial program 40.0%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < -2.7000000000000001e102

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

    if -2.7000000000000001e102 < y < -0.149999999999999994

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

    if -0.149999999999999994 < y < 2.19999999999999999e91

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

Alternative 8: 60.8% accurate, 0.5× speedup?

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.09999999999999983e166 or 6.39999999999999974e89 < y

    1. Initial program 40.0%

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

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

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

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

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

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

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

    if -3.09999999999999983e166 < y < -6.19999999999999965e112

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

    if -6.19999999999999965e112 < y < -0.00619999999999999978

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

    if -0.00619999999999999978 < y < 6.39999999999999974e89

    1. Initial program 92.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.1 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -6.2 \cdot 10^{+112}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;y \leq -0.0062:\\ \;\;\;\;\frac{y \cdot z}{t + y \cdot b}\\ \mathbf{elif}\;y \leq 6.4 \cdot 10^{+89}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 60.4% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;y \leq -2.65 \cdot 10^{+107}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.99999999999999988e166 or 5.0000000000000004e90 < y

    1. Initial program 40.0%

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

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

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

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

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

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

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

    if -1.99999999999999988e166 < y < -2.65e107

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

    if -2.65e107 < y < -0.17999999999999999

    1. Initial program 74.1%

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

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

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

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

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

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

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

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

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

    if -0.17999999999999999 < y < 5.0000000000000004e90

    1. Initial program 92.7%

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

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

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

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

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

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

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

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

Alternative 10: 62.9% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{if}\;y \leq -4.1 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.52 \cdot 10^{-266}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 10^{+94}:\\ \;\;\;\;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)) (+ a 1.0))))
   (if (<= y -4.1e+166)
     (/ z b)
     (if (<= y 1.52e-266)
       t_1
       (if (<= y 6.2e+75)
         (/ x (+ 1.0 (+ a (/ (* y b) t))))
         (if (<= y 1e+94) 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)) / (a + 1.0);
	double tmp;
	if (y <= -4.1e+166) {
		tmp = z / b;
	} else if (y <= 1.52e-266) {
		tmp = t_1;
	} else if (y <= 6.2e+75) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 1e+94) {
		tmp = t_1;
	} 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) :: tmp
    t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
    if (y <= (-4.1d+166)) then
        tmp = z / b
    else if (y <= 1.52d-266) then
        tmp = t_1
    else if (y <= 6.2d+75) then
        tmp = x / (1.0d0 + (a + ((y * b) / t)))
    else if (y <= 1d+94) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (a + 1.0);
	double tmp;
	if (y <= -4.1e+166) {
		tmp = z / b;
	} else if (y <= 1.52e-266) {
		tmp = t_1;
	} else if (y <= 6.2e+75) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 1e+94) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (a + 1.0)
	tmp = 0
	if y <= -4.1e+166:
		tmp = z / b
	elif y <= 1.52e-266:
		tmp = t_1
	elif y <= 6.2e+75:
		tmp = x / (1.0 + (a + ((y * b) / t)))
	elif y <= 1e+94:
		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(a + 1.0))
	tmp = 0.0
	if (y <= -4.1e+166)
		tmp = Float64(z / b);
	elseif (y <= 1.52e-266)
		tmp = t_1;
	elseif (y <= 6.2e+75)
		tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))));
	elseif (y <= 1e+94)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / (a + 1.0);
	tmp = 0.0;
	if (y <= -4.1e+166)
		tmp = z / b;
	elseif (y <= 1.52e-266)
		tmp = t_1;
	elseif (y <= 6.2e+75)
		tmp = x / (1.0 + (a + ((y * b) / t)));
	elseif (y <= 1e+94)
		tmp = t_1;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -4.1e+166], N[(z / b), $MachinePrecision], If[LessEqual[y, 1.52e-266], t$95$1, If[LessEqual[y, 6.2e+75], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 1e+94], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq 1.52 \cdot 10^{-266}:\\
\;\;\;\;t\_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.1000000000000003e166 or 1e94 < y

    1. Initial program 39.7%

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

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

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

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

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

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

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

    if -4.1000000000000003e166 < y < 1.52000000000000001e-266 or 6.2000000000000002e75 < y < 1e94

    1. Initial program 87.7%

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

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

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

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

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

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

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

    if 1.52000000000000001e-266 < y < 6.2000000000000002e75

    1. Initial program 88.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -4.1 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.52 \cdot 10^{-266}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{+75}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 10^{+94}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 75.3% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.75 \cdot 10^{+231} \lor \neg \left(y \leq 1.1 \cdot 10^{+109}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.7499999999999999e231 or 1.1e109 < y

    1. Initial program 37.0%

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

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

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

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

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

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

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

    if -1.7499999999999999e231 < y < 1.1e109

    1. Initial program 84.1%

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

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

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

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

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

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

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

Alternative 12: 75.8% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.09999999999999981e230 or 1.1e109 < y

    1. Initial program 37.0%

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

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

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

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

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

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

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

    if -3.09999999999999981e230 < y < 1.1e109

    1. Initial program 84.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*84.2%

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

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

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

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

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

Alternative 13: 68.6% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -1.0999999999999999e-8 or 1.09999999999999995e-10 < a

    1. Initial program 72.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0999999999999999e-8 < a < 1.09999999999999995e-10

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

Alternative 14: 55.5% accurate, 0.7× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a 1) < -1e19 or 1.00001999999999991 < (+.f64 a 1)

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{a} \]
    10. Simplified64.6%

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

    if -1e19 < (+.f64 a 1) < 1.00001999999999991

    1. Initial program 72.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 15: 55.3% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -1 \cdot 10^{+19}:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a 1) < -1e19

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{a} \]
    10. Simplified66.3%

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

    if -1e19 < (+.f64 a 1) < 2e12

    1. Initial program 70.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 2e12 < (+.f64 a 1)

    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. *-commutative76.0%

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

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

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

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

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

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

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

Alternative 16: 50.3% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;y \leq -2 \cdot 10^{-150}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.0500000000000001e166 or 8.9999999999999998e92 < y

    1. Initial program 39.7%

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

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

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

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

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

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

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

    if -2.0500000000000001e166 < y < -2.00000000000000001e-150

    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. *-commutative80.9%

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

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

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

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

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

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

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

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

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

    if -2.00000000000000001e-150 < y < 8.9999999999999998e92

    1. Initial program 91.3%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.05 \cdot 10^{+166}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-150}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 9 \cdot 10^{+92}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 17: 54.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.7 \cdot 10^{-62} \lor \neg \left(y \leq 9 \cdot 10^{+92}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.70000000000000019e-62 or 8.9999999999999998e92 < y

    1. Initial program 51.8%

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

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

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

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

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

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

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

    if -2.70000000000000019e-62 < y < 8.9999999999999998e92

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

Alternative 18: 41.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -3.2 \cdot 10^{-65} \lor \neg \left(y \leq 1.12 \cdot 10^{+83}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.1999999999999999e-65 or 1.12e83 < y

    1. Initial program 52.6%

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

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

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

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

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

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

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

    if -3.1999999999999999e-65 < y < 1.12e83

    1. Initial program 92.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 19: 25.3% 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 72.3%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  9. Final simplification21.5%

    \[\leadsto \frac{x}{a} \]
  10. Add Preprocessing

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

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

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