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

Percentage Accurate: 75.8% → 90.8%
Time: 21.8s
Alternatives: 16
Speedup: 0.4×

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 16 alternatives:

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

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

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

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

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

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

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

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


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

    1. Initial program 17.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y} \cdot \mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}} \]
    10. Step-by-step derivation
      1. *-commutative63.0%

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-193 or 9.9999999999999996e-236 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e292

    1. Initial program 99.7%

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

    if -2.0000000000000001e-193 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e-236

    1. Initial program 71.7%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative74.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/82.8%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

Alternative 2: 90.7% accurate, 0.1× speedup?

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

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

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

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

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

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


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

    1. Initial program 17.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{\frac{t}{y} \cdot \mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}} \]
    10. Step-by-step derivation
      1. *-commutative63.0%

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.00000000000000003e-161 or 9.9999999999999996e-236 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e292

    1. Initial program 99.7%

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

    if -1.00000000000000003e-161 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e-236

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

Alternative 3: 56.3% accurate, 0.4× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.15 \cdot 10^{-225}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.02 \cdot 10^{-103}:\\
\;\;\;\;t\_2\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if a < -6e18 or 95 < a

    1. Initial program 78.7%

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

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

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

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

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

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

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

    if -6e18 < a < -1.34999999999999993e-64

    1. Initial program 62.9%

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

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

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

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

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

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

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

    if -1.34999999999999993e-64 < a < -4.2000000000000001e-298

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.2000000000000001e-298 < a < 1.1499999999999999e-225 or 1.01999999999999998e-103 < a < 95

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t}{b}}}} \]
    8. Step-by-step derivation
      1. /-rgt-identity69.1%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{t}{b}}} \]
      4. rem-3cbrt-lft69.6%

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

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
      3. associate-/r/59.1%

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

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

    if 1.1499999999999999e-225 < a < 1.01999999999999998e-103

    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. *-commutative82.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6 \cdot 10^{+18}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;a \leq -1.35 \cdot 10^{-64}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-298}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{-225}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;a \leq 1.02 \cdot 10^{-103}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 95:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 86.2% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2e292

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

Alternative 5: 43.4% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+34}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-64}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-169}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -1.25e+34)
   (/ x a)
   (if (<= a -1.1e-64)
     (/ z b)
     (if (<= a -3.3e-266)
       x
       (if (<= a 5.2e-169)
         (/ z b)
         (if (<= a 1.5e-138) x (if (<= a 5.5e+16) (/ z b) (/ x a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -1.25e+34) {
		tmp = x / a;
	} else if (a <= -1.1e-64) {
		tmp = z / b;
	} else if (a <= -3.3e-266) {
		tmp = x;
	} else if (a <= 5.2e-169) {
		tmp = z / b;
	} else if (a <= 1.5e-138) {
		tmp = x;
	} else if (a <= 5.5e+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 (a <= (-1.25d+34)) then
        tmp = x / a
    else if (a <= (-1.1d-64)) then
        tmp = z / b
    else if (a <= (-3.3d-266)) then
        tmp = x
    else if (a <= 5.2d-169) then
        tmp = z / b
    else if (a <= 1.5d-138) then
        tmp = x
    else if (a <= 5.5d+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 (a <= -1.25e+34) {
		tmp = x / a;
	} else if (a <= -1.1e-64) {
		tmp = z / b;
	} else if (a <= -3.3e-266) {
		tmp = x;
	} else if (a <= 5.2e-169) {
		tmp = z / b;
	} else if (a <= 1.5e-138) {
		tmp = x;
	} else if (a <= 5.5e+16) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -1.25e+34:
		tmp = x / a
	elif a <= -1.1e-64:
		tmp = z / b
	elif a <= -3.3e-266:
		tmp = x
	elif a <= 5.2e-169:
		tmp = z / b
	elif a <= 1.5e-138:
		tmp = x
	elif a <= 5.5e+16:
		tmp = z / b
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -1.25e+34)
		tmp = Float64(x / a);
	elseif (a <= -1.1e-64)
		tmp = Float64(z / b);
	elseif (a <= -3.3e-266)
		tmp = x;
	elseif (a <= 5.2e-169)
		tmp = Float64(z / b);
	elseif (a <= 1.5e-138)
		tmp = x;
	elseif (a <= 5.5e+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 (a <= -1.25e+34)
		tmp = x / a;
	elseif (a <= -1.1e-64)
		tmp = z / b;
	elseif (a <= -3.3e-266)
		tmp = x;
	elseif (a <= 5.2e-169)
		tmp = z / b;
	elseif (a <= 1.5e-138)
		tmp = x;
	elseif (a <= 5.5e+16)
		tmp = z / b;
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.25e+34], N[(x / a), $MachinePrecision], If[LessEqual[a, -1.1e-64], N[(z / b), $MachinePrecision], If[LessEqual[a, -3.3e-266], x, If[LessEqual[a, 5.2e-169], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.5e-138], x, If[LessEqual[a, 5.5e+16], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1.25 \cdot 10^{+34}:\\
\;\;\;\;\frac{x}{a}\\

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

\mathbf{elif}\;a \leq -3.3 \cdot 10^{-266}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 1.5 \cdot 10^{-138}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+16}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -1.25e34 or 5.5e16 < a

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

    if -1.25e34 < a < -1.1e-64 or -3.3000000000000003e-266 < a < 5.20000000000000028e-169 or 1.5e-138 < a < 5.5e16

    1. Initial program 68.6%

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

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

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

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

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

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

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

    if -1.1e-64 < a < -3.3000000000000003e-266 or 5.20000000000000028e-169 < a < 1.5e-138

    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{x + \frac{\color{blue}{z \cdot y}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. associate-*l/87.4%

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

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

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

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

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

      \[\leadsto \color{blue}{x} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification51.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.25 \cdot 10^{+34}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -1.1 \cdot 10^{-64}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -3.3 \cdot 10^{-266}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.2 \cdot 10^{-169}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{-138}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+16}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 65.5% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;t \leq -2.7 \cdot 10^{-103}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 3.9 \cdot 10^{-16}:\\
\;\;\;\;t\_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -6.09999999999999981e-30 or 3.89999999999999977e-16 < t

    1. Initial program 85.0%

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

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

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

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

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

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

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

    if -6.09999999999999981e-30 < t < -2.7000000000000001e-103 or -4.40000000000000004e-161 < t < 3.89999999999999977e-16

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b} \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{y} \]
    11. Simplified33.3%

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

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

    if -2.7000000000000001e-103 < t < -4.40000000000000004e-161

    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. *-commutative82.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.1 \cdot 10^{-30}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t \leq -2.7 \cdot 10^{-103}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -4.4 \cdot 10^{-161}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;t \leq 3.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 54.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -6.2 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-58}:\\ \;\;\;\;\frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-135}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot a}\\ \mathbf{elif}\;t \leq 10^{-15}:\\ \;\;\;\;\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 -6.2e-18)
     t_1
     (if (<= t -3.2e-58)
       (/ (* x t) (* y b))
       (if (<= t -2.2e-135)
         (* y (/ z (* t a)))
         (if (<= t 1e-15) (/ 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 <= -6.2e-18) {
		tmp = t_1;
	} else if (t <= -3.2e-58) {
		tmp = (x * t) / (y * b);
	} else if (t <= -2.2e-135) {
		tmp = y * (z / (t * a));
	} else if (t <= 1e-15) {
		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 <= (-6.2d-18)) then
        tmp = t_1
    else if (t <= (-3.2d-58)) then
        tmp = (x * t) / (y * b)
    else if (t <= (-2.2d-135)) then
        tmp = y * (z / (t * a))
    else if (t <= 1d-15) 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 <= -6.2e-18) {
		tmp = t_1;
	} else if (t <= -3.2e-58) {
		tmp = (x * t) / (y * b);
	} else if (t <= -2.2e-135) {
		tmp = y * (z / (t * a));
	} else if (t <= 1e-15) {
		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 <= -6.2e-18:
		tmp = t_1
	elif t <= -3.2e-58:
		tmp = (x * t) / (y * b)
	elif t <= -2.2e-135:
		tmp = y * (z / (t * a))
	elif t <= 1e-15:
		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 <= -6.2e-18)
		tmp = t_1;
	elseif (t <= -3.2e-58)
		tmp = Float64(Float64(x * t) / Float64(y * b));
	elseif (t <= -2.2e-135)
		tmp = Float64(y * Float64(z / Float64(t * a)));
	elseif (t <= 1e-15)
		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 <= -6.2e-18)
		tmp = t_1;
	elseif (t <= -3.2e-58)
		tmp = (x * t) / (y * b);
	elseif (t <= -2.2e-135)
		tmp = y * (z / (t * a));
	elseif (t <= 1e-15)
		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, -6.2e-18], t$95$1, If[LessEqual[t, -3.2e-58], N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -2.2e-135], N[(y * N[(z / N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-15], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -2.2 \cdot 10^{-135}:\\
\;\;\;\;y \cdot \frac{z}{t \cdot a}\\

\mathbf{elif}\;t \leq 10^{-15}:\\
\;\;\;\;\frac{z}{b}\\

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


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

    1. Initial program 84.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. 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/90.5%

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

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

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

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

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

    if -6.20000000000000014e-18 < t < -3.2000000000000001e-58

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

    if -3.2000000000000001e-58 < t < -2.2e-135

    1. Initial program 62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{a \cdot t}} \]
    9. Step-by-step derivation
      1. expm1-log1p-u17.3%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y \cdot z}{a \cdot t}\right)\right)} \]
      2. expm1-udef4.1%

        \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y \cdot z}{a \cdot t}\right)} - 1} \]
      3. *-commutative4.1%

        \[\leadsto e^{\mathsf{log1p}\left(\frac{y \cdot z}{\color{blue}{t \cdot a}}\right)} - 1 \]
      4. times-frac4.1%

        \[\leadsto e^{\mathsf{log1p}\left(\color{blue}{\frac{y}{t} \cdot \frac{z}{a}}\right)} - 1 \]
    10. Applied egg-rr4.1%

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{y}{t} \cdot \frac{z}{a}\right)} - 1} \]
    11. Step-by-step derivation
      1. expm1-def17.2%

        \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{y}{t} \cdot \frac{z}{a}\right)\right)} \]
      2. expm1-log1p32.7%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a}} \]
      3. times-frac33.1%

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot a}} \]
      4. associate-*r/40.4%

        \[\leadsto \color{blue}{y \cdot \frac{z}{t \cdot a}} \]
    12. Simplified40.4%

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

    if -2.2e-135 < t < 1.0000000000000001e-15

    1. Initial program 62.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.2 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-58}:\\ \;\;\;\;\frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-135}:\\ \;\;\;\;y \cdot \frac{z}{t \cdot a}\\ \mathbf{elif}\;t \leq 10^{-15}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 54.5% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -5.5 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-150}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-13}:\\ \;\;\;\;\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 -5.5e-18)
     t_1
     (if (<= t -3.2e-62)
       (/ (* x t) (* y b))
       (if (<= t -8.2e-150)
         (* (/ y t) (/ z (+ a 1.0)))
         (if (<= t 1.65e-13) (/ 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 <= -5.5e-18) {
		tmp = t_1;
	} else if (t <= -3.2e-62) {
		tmp = (x * t) / (y * b);
	} else if (t <= -8.2e-150) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 1.65e-13) {
		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 <= (-5.5d-18)) then
        tmp = t_1
    else if (t <= (-3.2d-62)) then
        tmp = (x * t) / (y * b)
    else if (t <= (-8.2d-150)) then
        tmp = (y / t) * (z / (a + 1.0d0))
    else if (t <= 1.65d-13) 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 <= -5.5e-18) {
		tmp = t_1;
	} else if (t <= -3.2e-62) {
		tmp = (x * t) / (y * b);
	} else if (t <= -8.2e-150) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 1.65e-13) {
		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 <= -5.5e-18:
		tmp = t_1
	elif t <= -3.2e-62:
		tmp = (x * t) / (y * b)
	elif t <= -8.2e-150:
		tmp = (y / t) * (z / (a + 1.0))
	elif t <= 1.65e-13:
		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 <= -5.5e-18)
		tmp = t_1;
	elseif (t <= -3.2e-62)
		tmp = Float64(Float64(x * t) / Float64(y * b));
	elseif (t <= -8.2e-150)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)));
	elseif (t <= 1.65e-13)
		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 <= -5.5e-18)
		tmp = t_1;
	elseif (t <= -3.2e-62)
		tmp = (x * t) / (y * b);
	elseif (t <= -8.2e-150)
		tmp = (y / t) * (z / (a + 1.0));
	elseif (t <= 1.65e-13)
		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, -5.5e-18], t$95$1, If[LessEqual[t, -3.2e-62], N[(N[(x * t), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -8.2e-150], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-13], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


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

    1. Initial program 84.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. 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/90.5%

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

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

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

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

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

    if -5.5e-18 < t < -3.20000000000000021e-62

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

    if -3.20000000000000021e-62 < t < -8.1999999999999997e-150

    1. Initial program 65.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.1999999999999997e-150 < t < 1.65e-13

    1. Initial program 62.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -5.5 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -3.2 \cdot 10^{-62}:\\ \;\;\;\;\frac{x \cdot t}{y \cdot b}\\ \mathbf{elif}\;t \leq -8.2 \cdot 10^{-150}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-13}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 54.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-183}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{-15}:\\ \;\;\;\;\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 -1.45e-16)
     t_1
     (if (<= t -9.2e-63)
       (/ x (+ 1.0 (* b (/ y t))))
       (if (<= t -5.5e-183)
         (* (/ y t) (/ z (+ a 1.0)))
         (if (<= t 1.06e-15) (/ 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 <= -1.45e-16) {
		tmp = t_1;
	} else if (t <= -9.2e-63) {
		tmp = x / (1.0 + (b * (y / t)));
	} else if (t <= -5.5e-183) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 1.06e-15) {
		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 <= (-1.45d-16)) then
        tmp = t_1
    else if (t <= (-9.2d-63)) then
        tmp = x / (1.0d0 + (b * (y / t)))
    else if (t <= (-5.5d-183)) then
        tmp = (y / t) * (z / (a + 1.0d0))
    else if (t <= 1.06d-15) 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 <= -1.45e-16) {
		tmp = t_1;
	} else if (t <= -9.2e-63) {
		tmp = x / (1.0 + (b * (y / t)));
	} else if (t <= -5.5e-183) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 1.06e-15) {
		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 <= -1.45e-16:
		tmp = t_1
	elif t <= -9.2e-63:
		tmp = x / (1.0 + (b * (y / t)))
	elif t <= -5.5e-183:
		tmp = (y / t) * (z / (a + 1.0))
	elif t <= 1.06e-15:
		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 <= -1.45e-16)
		tmp = t_1;
	elseif (t <= -9.2e-63)
		tmp = Float64(x / Float64(1.0 + Float64(b * Float64(y / t))));
	elseif (t <= -5.5e-183)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)));
	elseif (t <= 1.06e-15)
		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 <= -1.45e-16)
		tmp = t_1;
	elseif (t <= -9.2e-63)
		tmp = x / (1.0 + (b * (y / t)));
	elseif (t <= -5.5e-183)
		tmp = (y / t) * (z / (a + 1.0));
	elseif (t <= 1.06e-15)
		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, -1.45e-16], t$95$1, If[LessEqual[t, -9.2e-63], N[(x / N[(1.0 + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -5.5e-183], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.06e-15], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.4499999999999999e-16 or 1.06000000000000007e-15 < t

    1. Initial program 84.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. 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/90.5%

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

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

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

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

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

    if -1.4499999999999999e-16 < t < -9.2e-63

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
      5. add-cube-cbrt78.9%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\frac{t}{b}}} \]
      6. *-un-lft-identity78.9%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \frac{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}{\color{blue}{1 \cdot \frac{t}{b}}}} \]
      7. times-frac79.0%

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

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

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \color{blue}{\frac{{\left(\sqrt[3]{y}\right)}^{2}}{1} \cdot \frac{\sqrt[3]{y}}{\frac{t}{b}}}} \]
    8. Step-by-step derivation
      1. /-rgt-identity79.0%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{1 + \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right)} \cdot \sqrt[3]{y}}{\frac{t}{b}}} \]
      4. rem-3cbrt-lft79.1%

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

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

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

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

        \[\leadsto \frac{x}{1 + \color{blue}{\frac{y}{\frac{t}{b}}}} \]
      3. associate-/r/57.2%

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

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

    if -9.2e-63 < t < -5.4999999999999999e-183

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4999999999999999e-183 < t < 1.06000000000000007e-15

    1. Initial program 62.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.45 \cdot 10^{-16}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-63}:\\ \;\;\;\;\frac{x}{1 + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;t \leq -5.5 \cdot 10^{-183}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.06 \cdot 10^{-15}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 54.3% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -6 \cdot 10^{-17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-183}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-14}:\\ \;\;\;\;\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 -6e-17)
     t_1
     (if (<= t -1.1e-66)
       (/ x (+ 1.0 (/ (* y b) t)))
       (if (<= t -9.2e-183)
         (* (/ y t) (/ z (+ a 1.0)))
         (if (<= t 3.2e-14) (/ 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 <= -6e-17) {
		tmp = t_1;
	} else if (t <= -1.1e-66) {
		tmp = x / (1.0 + ((y * b) / t));
	} else if (t <= -9.2e-183) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 3.2e-14) {
		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 <= (-6d-17)) then
        tmp = t_1
    else if (t <= (-1.1d-66)) then
        tmp = x / (1.0d0 + ((y * b) / t))
    else if (t <= (-9.2d-183)) then
        tmp = (y / t) * (z / (a + 1.0d0))
    else if (t <= 3.2d-14) 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 <= -6e-17) {
		tmp = t_1;
	} else if (t <= -1.1e-66) {
		tmp = x / (1.0 + ((y * b) / t));
	} else if (t <= -9.2e-183) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t <= 3.2e-14) {
		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 <= -6e-17:
		tmp = t_1
	elif t <= -1.1e-66:
		tmp = x / (1.0 + ((y * b) / t))
	elif t <= -9.2e-183:
		tmp = (y / t) * (z / (a + 1.0))
	elif t <= 3.2e-14:
		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 <= -6e-17)
		tmp = t_1;
	elseif (t <= -1.1e-66)
		tmp = Float64(x / Float64(1.0 + Float64(Float64(y * b) / t)));
	elseif (t <= -9.2e-183)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)));
	elseif (t <= 3.2e-14)
		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 <= -6e-17)
		tmp = t_1;
	elseif (t <= -1.1e-66)
		tmp = x / (1.0 + ((y * b) / t));
	elseif (t <= -9.2e-183)
		tmp = (y / t) * (z / (a + 1.0));
	elseif (t <= 3.2e-14)
		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, -6e-17], t$95$1, If[LessEqual[t, -1.1e-66], N[(x / N[(1.0 + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -9.2e-183], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 3.2e-14], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.00000000000000012e-17 or 3.2000000000000002e-14 < t

    1. Initial program 84.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. 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/90.5%

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

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

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

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

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

    if -6.00000000000000012e-17 < t < -1.1000000000000001e-66

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

    if -1.1000000000000001e-66 < t < -9.20000000000000064e-183

    1. Initial program 61.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.20000000000000064e-183 < t < 3.2000000000000002e-14

    1. Initial program 62.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6 \cdot 10^{-17}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -1.1 \cdot 10^{-66}:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;t \leq -9.2 \cdot 10^{-183}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 3.2 \cdot 10^{-14}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 61.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.05 \cdot 10^{+20} \lor \neg \left(y \leq 7.5 \cdot 10^{+18}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.05e20 or 7.5e18 < y

    1. Initial program 55.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.05e20 < y < 7.5e18

    1. Initial program 93.0%

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

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

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

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

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

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

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

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

Alternative 12: 65.8% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.69999999999999989e32 or 1.6999999999999999e-41 < y

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    10. Step-by-step derivation
      1. times-frac36.3%

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

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

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

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

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

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

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

    if -1.69999999999999989e32 < y < 1.6999999999999999e-41

    1. Initial program 93.3%

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

        \[\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}{\frac{z}{t} \cdot y}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      3. *-commutative88.2%

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

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

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

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

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

Alternative 13: 69.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.4 \cdot 10^{+137} \lor \neg \left(y \leq 1.18 \cdot 10^{+26}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{b} \cdot \frac{x}{y}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -4.40000000000000031e137 or 1.18e26 < y

    1. Initial program 48.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*54.7%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{t}{b} \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{y} \]
    11. Simplified38.3%

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

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

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

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

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

    if -4.40000000000000031e137 < y < 1.18e26

    1. Initial program 89.4%

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

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

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

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

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

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

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

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

Alternative 14: 56.5% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-31} \lor \neg \left(t \leq 6.2 \cdot 10^{-15}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.49999999999999958e-31 or 6.1999999999999998e-15 < t

    1. Initial program 85.0%

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

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

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

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

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

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

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

    if -5.49999999999999958e-31 < t < 6.1999999999999998e-15

    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. *-commutative64.8%

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

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

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

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

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

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

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

Alternative 15: 42.2% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 72.9%

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

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

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

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

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

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

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

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

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

Alternative 16: 19.9% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 76.1%

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

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

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

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

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

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

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

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

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 79.8% accurate, 0.5× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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

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

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