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

Percentage Accurate: 74.8% → 91.3%
Time: 15.3s
Alternatives: 19
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 74.8% accurate, 1.0× speedup?

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

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

Alternative 1: 91.3% accurate, 0.2× speedup?

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

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

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

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

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


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

    1. Initial program 23.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 89.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)} \]

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

    1. Initial program 89.7%

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

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

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

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

    if 9.9999999999999996e290 < (/.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 28.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*52.8%

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

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

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

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

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

      \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{\left(a + 1\right) + y \cdot \frac{b}{t}} \]
    7. Taylor expanded in z around inf 81.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)} \]
    8. Step-by-step derivation
      1. associate-+r+81.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. *-commutative81.3%

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

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

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

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

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

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

    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. +-commutative0.0%

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

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

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

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

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

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

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

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

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

Alternative 2: 91.7% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 9.9999999999999996e290 < (/.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 26.6%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}} \]
    4. Add Preprocessing
    5. Taylor expanded in z around inf 84.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)} \]

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

    1. Initial program 89.7%

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

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

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

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

    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. +-commutative0.0%

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

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

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

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

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

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

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

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

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

Alternative 3: 88.7% accurate, 0.3× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 89.8%

      \[\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. *-commutative89.8%

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

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

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

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

    1. Initial program 8.9%

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

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

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

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

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

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

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

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

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

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

Alternative 4: 69.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -4.2 \cdot 10^{-121}:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 82.8%

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

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

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

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

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

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

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

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

    if -2.39999999999999996e-23 < t < -4.1999999999999997e-121 or 7.20000000000000013e-137 < t < 5.1999999999999999e-34

    1. Initial program 86.3%

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

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

    if -4.1999999999999997e-121 < t < 7.20000000000000013e-137

    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. +-commutative44.8%

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

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

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

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

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

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

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

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

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

    if 5.1999999999999999e-34 < t

    1. Initial program 84.6%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-23}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq -4.2 \cdot 10^{-121}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{-137}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 5.2 \cdot 10^{-34}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 74.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{a + t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -4e6

    1. Initial program 84.5%

      \[\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. *-commutative84.5%

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

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

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

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

    if -4e6 < (+.f64 a #s(literal 1 binary64)) < 2

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

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

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

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

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

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

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

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

    if 2 < (+.f64 a #s(literal 1 binary64))

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

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

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

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

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

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

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

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

Alternative 6: 74.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a + 1 \leq 500:\\
\;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{1 + t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -4e6

    1. Initial program 84.5%

      \[\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. *-commutative84.5%

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

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

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

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

    if -4e6 < (+.f64 a #s(literal 1 binary64)) < 500

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

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

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

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

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

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

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

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

    if 500 < (+.f64 a #s(literal 1 binary64))

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

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

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

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

Alternative 7: 74.0% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := y \cdot \frac{b}{t}\\ t_2 := x + y \cdot \frac{z}{t}\\ \mathbf{if}\;a + 1 \leq -4000000:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;a + 1 \leq 500:\\ \;\;\;\;\frac{t\_2}{1 + t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{a + t\_1}\\ \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)))))
   (if (<= (+ a 1.0) -4000000.0)
     (/ (+ x (* z (/ y t))) (+ a (/ (* y b) t)))
     (if (<= (+ a 1.0) 500.0) (/ t_2 (+ 1.0 t_1)) (/ t_2 (+ a t_1))))))
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));
	double tmp;
	if ((a + 1.0) <= -4000000.0) {
		tmp = (x + (z * (y / t))) / (a + ((y * b) / t));
	} else if ((a + 1.0) <= 500.0) {
		tmp = t_2 / (1.0 + t_1);
	} else {
		tmp = t_2 / (a + t_1);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (b / t)
    t_2 = x + (y * (z / t))
    if ((a + 1.0d0) <= (-4000000.0d0)) then
        tmp = (x + (z * (y / t))) / (a + ((y * b) / t))
    else if ((a + 1.0d0) <= 500.0d0) then
        tmp = t_2 / (1.0d0 + t_1)
    else
        tmp = t_2 / (a + t_1)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b / t);
	double t_2 = x + (y * (z / t));
	double tmp;
	if ((a + 1.0) <= -4000000.0) {
		tmp = (x + (z * (y / t))) / (a + ((y * b) / t));
	} else if ((a + 1.0) <= 500.0) {
		tmp = t_2 / (1.0 + t_1);
	} else {
		tmp = t_2 / (a + t_1);
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = y * (b / t)
	t_2 = x + (y * (z / t))
	tmp = 0
	if (a + 1.0) <= -4000000.0:
		tmp = (x + (z * (y / t))) / (a + ((y * b) / t))
	elif (a + 1.0) <= 500.0:
		tmp = t_2 / (1.0 + t_1)
	else:
		tmp = t_2 / (a + t_1)
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(y * Float64(b / t))
	t_2 = Float64(x + Float64(y * Float64(z / t)))
	tmp = 0.0
	if (Float64(a + 1.0) <= -4000000.0)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(Float64(y * b) / t)));
	elseif (Float64(a + 1.0) <= 500.0)
		tmp = Float64(t_2 / Float64(1.0 + t_1));
	else
		tmp = Float64(t_2 / Float64(a + t_1));
	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));
	tmp = 0.0;
	if ((a + 1.0) <= -4000000.0)
		tmp = (x + (z * (y / t))) / (a + ((y * b) / t));
	elseif ((a + 1.0) <= 500.0)
		tmp = t_2 / (1.0 + t_1);
	else
		tmp = t_2 / (a + t_1);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[(a + 1.0), $MachinePrecision], -4000000.0], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 500.0], N[(t$95$2 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a + 1 \leq 500:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{a + t\_1}\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -4e6

    1. Initial program 84.5%

      \[\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. *-commutative84.5%

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

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

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

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

    if -4e6 < (+.f64 a #s(literal 1 binary64)) < 500

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

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

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

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

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

    if 500 < (+.f64 a #s(literal 1 binary64))

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

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

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

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

Alternative 8: 80.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.49999999999999998e93 or 4.99999999999999976e157 < y

    1. Initial program 35.1%

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

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

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

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

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

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

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

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

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

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

    if -3.49999999999999998e93 < y < 4.99999999999999976e157

    1. Initial program 88.8%

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

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

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

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

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

Alternative 9: 82.6% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -7.49999999999999976e-126 or 2.30000000000000022e-131 < t

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

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

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

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

    if -7.49999999999999976e-126 < t < 2.30000000000000022e-131

    1. Initial program 46.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 67.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -3.8 \cdot 10^{-66} \lor \neg \left(t \leq 2.9 \cdot 10^{-59}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.7999999999999998e-66 or 2.90000000000000016e-59 < t

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

    if -3.7999999999999998e-66 < t < 2.90000000000000016e-59

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 65.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -9.6 \cdot 10^{-73} \lor \neg \left(t \leq 8.6 \cdot 10^{-60}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -9.60000000000000022e-73 or 8.6000000000000001e-60 < t

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

    if -9.60000000000000022e-73 < t < 8.6000000000000001e-60

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 68.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.90000000000000011e-66

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

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

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

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

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

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

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

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

    if -2.90000000000000011e-66 < t < 1.02e-57

    1. Initial program 57.1%

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

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

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

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

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

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

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

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

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

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

    if 1.02e-57 < t

    1. Initial program 83.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 55.9% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.2000000000000003e-49 or 2.19999999999999999e-57 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

    if -8.2000000000000003e-49 < t < -4.1e-128

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

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

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

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

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

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

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

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

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

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

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

    if -4.1e-128 < t < 2.19999999999999999e-57

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 55.2% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.59999999999999995e-49 or 3.19999999999999986e-56 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

    if -2.59999999999999995e-49 < t < -6.00000000000000017e-127

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

    if -6.00000000000000017e-127 < t < 3.19999999999999986e-56

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

Alternative 15: 55.2% accurate, 0.8× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.59999999999999995e-49 or 2.35e-55 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

    if -2.59999999999999995e-49 < t < -6.2e-127

    1. Initial program 94.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x}{\color{blue}{y \cdot b}} \]
    9. Simplified46.2%

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

    if -6.2e-127 < t < 2.35e-55

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

Alternative 16: 61.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.05 \cdot 10^{-47} \lor \neg \left(t \leq 8.2 \cdot 10^{-58}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.05e-47 or 8.20000000000000056e-58 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

    if -1.05e-47 < t < 8.20000000000000056e-58

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 17: 56.7% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.8 \cdot 10^{-49} \lor \neg \left(t \leq 1.95 \cdot 10^{-56}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.79999999999999997e-49 or 1.95e-56 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

    if -2.79999999999999997e-49 < t < 1.95e-56

    1. Initial program 58.9%

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

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

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

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

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

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

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

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

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

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

Alternative 18: 43.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.8 \cdot 10^{-85} \lor \neg \left(y \leq 9.2 \cdot 10^{+16}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.8000000000000001e-85 or 9.2e16 < y

    1. Initial program 58.5%

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

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

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

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

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

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

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

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

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

    if -4.8000000000000001e-85 < y < 9.2e16

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

Alternative 19: 25.8% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024144 
(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))))