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

Percentage Accurate: 74.7% → 89.9%
Time: 54.0s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 74.7% accurate, 1.0× speedup?

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

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

Alternative 1: 89.9% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_3\\

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


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

    1. Initial program 53.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 93.1%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 89.6% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_2 \leq \infty:\\
\;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + t\_1\right)\right)}\\

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


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

    1. Initial program 23.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*41.4%

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

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

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

      \[\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-frac86.2%

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

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

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

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

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

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

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

    1. Initial program 93.7%

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

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

    1. Initial program 33.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 53.0% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -2.8 \cdot 10^{-49}:\\
\;\;\;\;\frac{x}{a + b \cdot \frac{y}{t}}\\

\mathbf{elif}\;a \leq 4.1 \cdot 10^{-293}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 79.7%

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

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

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

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

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

    if -8e22 < a < -2.79999999999999997e-49

    1. Initial program 66.0%

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

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

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

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

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

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

        \[\leadsto \frac{x}{a + \color{blue}{b \cdot \frac{y}{t}}} \]
    8. Applied egg-rr52.9%

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

    if -2.79999999999999997e-49 < a < 4.09999999999999988e-293

    1. Initial program 79.8%

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

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

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

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

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

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

    if 4.09999999999999988e-293 < a < 2.60000000000000011e-227

    1. Initial program 62.3%

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

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

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

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

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

    if 2.60000000000000011e-227 < a < 0.849999999999999978

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

Alternative 4: 76.5% accurate, 0.5× speedup?

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

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

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

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

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


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

    1. Initial program 83.7%

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

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-18 < t < -1.00000000000000002e-287

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e-287 < t < 4.3999999999999998e-216

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.3999999999999998e-216 < t

    1. Initial program 76.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{-18}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;t \leq -1 \cdot 10^{-287}:\\ \;\;\;\;z \cdot \frac{y}{t \cdot \left(1 + \left(a + \frac{y \cdot b}{t}\right)\right)}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-216}:\\ \;\;\;\;\frac{z \cdot \left(1 + \frac{x \cdot t}{y \cdot z}\right)}{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 5: 76.5% accurate, 0.5× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.7999999999999998e-18 or 9e-215 < t

    1. Initial program 79.5%

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

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

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

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

    if -3.7999999999999998e-18 < t < -5.6999999999999997e-288

    1. Initial program 74.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.6999999999999997e-288 < t < 9e-215

    1. Initial program 59.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 54.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -3.5 \cdot 10^{-51}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 7.8 \cdot 10^{-295}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;a \leq 3.8 \cdot 10^{+91}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 79.7%

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

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

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

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

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

    if -420 < a < -3.4999999999999997e-51 or 7.79999999999999999e-295 < a < 3.7999999999999998e91

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{1 \cdot x}{\frac{y}{t} \cdot z}}}{b} \]
      3. *-un-lft-identity57.2%

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr57.2%

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{\frac{x}{z}}{y} \cdot t}}{b} \]
    14. Simplified54.9%

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

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

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

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

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

    if -3.4999999999999997e-51 < a < 7.79999999999999999e-295

    1. Initial program 79.8%

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

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

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

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

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

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

Alternative 7: 80.4% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 44.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr62.3%

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

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

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

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

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

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

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

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

    if -1.3000000000000001e107 < y < 5.1999999999999997e173

    1. Initial program 90.3%

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

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

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

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

    if 5.1999999999999997e173 < y

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 62.8% accurate, 0.7× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -4.40000000000000001e70 or 4.2999999999999999e136 < y

    1. Initial program 45.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{1 \cdot x}{\frac{y}{t} \cdot z}}}{b} \]
      3. *-un-lft-identity69.9%

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr69.9%

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{\frac{x}{z}}{y} \cdot t}}{b} \]
    14. Simplified70.0%

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

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

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

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

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

    if -4.40000000000000001e70 < y < -6.19999999999999992e27

    1. Initial program 86.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*86.2%

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

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

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

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

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

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

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

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

    if -6.19999999999999992e27 < y < 4.2999999999999999e136

    1. Initial program 91.9%

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

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

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

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

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

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

Alternative 9: 73.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -3.4 \lor \neg \left(a \leq 0.00017\right):\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= a -3.4) (not (<= a 0.00017)))
   (/ (+ x (/ (* y z) t)) (+ a (/ (* y b) t)))
   (/ (+ 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 <= -3.4) || !(a <= 0.00017)) {
		tmp = (x + ((y * z) / t)) / (a + ((y * b) / t));
	} 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 <= (-3.4d0)) .or. (.not. (a <= 0.00017d0))) then
        tmp = (x + ((y * z) / t)) / (a + ((y * b) / t))
    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 <= -3.4) || !(a <= 0.00017)) {
		tmp = (x + ((y * z) / t)) / (a + ((y * b) / t));
	} 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 <= -3.4) or not (a <= 0.00017):
		tmp = (x + ((y * z) / t)) / (a + ((y * b) / t))
	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 <= -3.4) || !(a <= 0.00017))
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + Float64(Float64(y * b) / t)));
	else
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(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 ((a <= -3.4) || ~((a <= 0.00017)))
		tmp = (x + ((y * z) / t)) / (a + ((y * b) / t));
	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, -3.4], N[Not[LessEqual[a, 0.00017]], $MachinePrecision]], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.4 \lor \neg \left(a \leq 0.00017\right):\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + \frac{y \cdot b}{t}}\\

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


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

    1. Initial program 79.9%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf 78.6%

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

    if -3.39999999999999991 < a < 1.7e-4

    1. Initial program 72.8%

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

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

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

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

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

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

Alternative 10: 67.0% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 49.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*55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{1 \cdot x}{\frac{y}{t} \cdot z}}}{b} \]
      3. *-un-lft-identity63.8%

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr63.8%

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{\frac{x}{z}}{y} \cdot t}}{b} \]
    14. Simplified63.9%

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

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

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

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

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

    if -7.1999999999999999e70 < y < 8.200000000000001e172

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + z \cdot \color{blue}{\frac{1}{\frac{t}{y}}}}{1 + a} \]
      2. un-div-inv74.0%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{\frac{t}{y}}}}{1 + a} \]
    9. Applied egg-rr74.0%

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

    if 8.200000000000001e172 < y

    1. Initial program 36.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 67.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.6e71 or 5.1999999999999997e173 < y

    1. Initial program 43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{1 \cdot x}{\frac{y}{t} \cdot z}}}{b} \]
      3. *-un-lft-identity70.9%

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr70.9%

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{\frac{x}{z}}{y} \cdot t}}{b} \]
    14. Simplified71.0%

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

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

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

        \[\leadsto \frac{z}{b} + t \cdot \frac{x}{\color{blue}{y \cdot b}} \]
    17. Simplified66.1%

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

    if -3.6e71 < y < 5.1999999999999997e173

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + z \cdot \color{blue}{\frac{1}{\frac{t}{y}}}}{1 + a} \]
      2. un-div-inv74.0%

        \[\leadsto \frac{x + \color{blue}{\frac{z}{\frac{t}{y}}}}{1 + a} \]
    9. Applied egg-rr74.0%

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

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

Alternative 12: 67.3% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.00000000000000025e71 or 1.25000000000000009e173 < y

    1. Initial program 43.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{1 \cdot x}{\frac{y}{t} \cdot z}}}{b} \]
      3. *-un-lft-identity70.9%

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

        \[\leadsto z \cdot \frac{1 + \frac{x}{\color{blue}{z \cdot \frac{y}{t}}}}{b} \]
    12. Applied egg-rr70.9%

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

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

        \[\leadsto z \cdot \frac{1 + \color{blue}{\frac{\frac{x}{z}}{y} \cdot t}}{b} \]
    14. Simplified71.0%

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

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

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

        \[\leadsto \frac{z}{b} + t \cdot \frac{x}{\color{blue}{y \cdot b}} \]
    17. Simplified66.1%

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

    if -6.00000000000000025e71 < y < 1.25000000000000009e173

    1. Initial program 91.0%

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

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

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

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

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

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

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

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

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

Alternative 13: 54.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -5.49999999999999986e70 or 7.00000000000000002e136 < y

    1. Initial program 45.2%

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

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

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

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

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

    if -5.49999999999999986e70 < y < -7.49999999999999993e25

    1. Initial program 86.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*86.2%

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

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

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

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

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

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

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

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

    if -7.49999999999999993e25 < y < 7.00000000000000002e136

    1. Initial program 91.9%

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

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

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

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

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

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

Alternative 14: 55.0% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.0500000000000001e72 or 2.7500000000000001e137 < y

    1. Initial program 45.2%

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

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

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

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

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

    if -1.0500000000000001e72 < y < -1.65e14

    1. Initial program 86.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*86.2%

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

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

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

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

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

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

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

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

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

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

    if -1.65e14 < y < 2.7500000000000001e137

    1. Initial program 91.9%

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

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

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

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

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

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

Alternative 15: 55.1% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.5999999999999996e70 or 2.70000000000000017e137 < y

    1. Initial program 45.2%

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

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

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

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

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

    if -7.5999999999999996e70 < y < 2.70000000000000017e137

    1. Initial program 91.4%

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

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

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

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

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

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

Alternative 16: 42.8% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -4.2 \cdot 10^{+45} \lor \neg \left(a \leq 2.9 \cdot 10^{+127}\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 78.9%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{a + \frac{b \cdot y}{t}}} \]
    7. Taylor expanded in a around inf 52.3%

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

    if -4.1999999999999999e45 < a < 2.9000000000000002e127

    1. Initial program 75.1%

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

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

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

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

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

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

Alternative 17: 24.9% accurate, 5.7× speedup?

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

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 76.6%

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a + \frac{b \cdot y}{t}}} \]
  7. Taylor expanded in a around inf 24.9%

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

Developer Target 1: 78.8% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

  :alt
  (! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))

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