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

Percentage Accurate: 75.2% → 91.2%
Time: 21.1s
Alternatives: 15
Speedup: 0.8×

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 15 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.2% accurate, 1.0× speedup?

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

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

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

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-300}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \cdot \frac{t}{y}\\

\mathbf{elif}\;t_1 \leq 10^{+303}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;t_2\\

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


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

    1. Initial program 45.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 98.6%

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

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

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b} \cdot \frac{t}{y} \]
    10. Applied egg-rr79.4%

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \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. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{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^{-300}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \cdot \frac{t}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+303}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 2: 87.3% 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 -2 \cdot 10^{-300}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \cdot \frac{t}{y}\\ \mathbf{elif}\;t_1 \leq 10^{+303}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 -2e-300)
     t_1
     (if (<= t_1 0.0)
       (* (/ (fma y (/ z t) x) b) (/ t y))
       (if (<= t_1 1e+303) t_1 (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -2e-300) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (fma(y, (z / t), x) / b) * (t / y);
	} else if (t_1 <= 1e+303) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= -2e-300)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(fma(y, Float64(z / t), x) / b) * Float64(t / y));
	elseif (t_1 <= 1e+303)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-300], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / b), $MachinePrecision] * N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 1e+303], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq 0:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \cdot \frac{t}{y}\\

\mathbf{elif}\;t_1 \leq 10^{+303}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.00000000000000005e-300 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1e303

    1. Initial program 94.1%

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

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

    1. Initial program 59.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b} \cdot \frac{t}{y} \]
    10. Applied egg-rr79.4%

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

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

    1. Initial program 22.0%

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 3 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^{-300}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{b} \cdot \frac{t}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+303}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 3: 87.0% accurate, 0.2× speedup?

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

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

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

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


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

    1. Initial program 90.5%

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

    if -4.00000000000000024e-295 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 1.0000000000000001e-114

    1. Initial program 70.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0000000000000001e-114 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 85.2%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -4 \cdot 10^{-295}:\\ \;\;\;\;\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^{-114}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + \frac{b}{\frac{t}{y}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 4: 64.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z}{b} + t \cdot \frac{\frac{x}{y}}{b}\\ t_2 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{if}\;b \leq -1.16 \cdot 10^{+134}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;b \leq 390000000000:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+88}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{+103}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+205}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+288}:\\ \;\;\;\;\frac{x}{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
 (let* ((t_1 (+ (/ z b) (* t (/ (/ x y) b))))
        (t_2 (/ (+ x (* y (/ z t))) (+ a 1.0))))
   (if (<= b -1.16e+134)
     (+ (/ z b) (* t (/ x (* y b))))
     (if (<= b 390000000000.0)
       t_2
       (if (<= b 2.35e+88)
         t_1
         (if (<= b 4.1e+103)
           t_2
           (if (<= b 6e+205)
             t_1
             (if (<= b 2.8e+288)
               (/ x (+ a (+ 1.0 (* b (/ y t)))))
               (/ z b)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z / b) + (t * ((x / y) / b));
	double t_2 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (b <= -1.16e+134) {
		tmp = (z / b) + (t * (x / (y * b)));
	} else if (b <= 390000000000.0) {
		tmp = t_2;
	} else if (b <= 2.35e+88) {
		tmp = t_1;
	} else if (b <= 4.1e+103) {
		tmp = t_2;
	} else if (b <= 6e+205) {
		tmp = t_1;
	} else if (b <= 2.8e+288) {
		tmp = x / (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) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = (z / b) + (t * ((x / y) / b))
    t_2 = (x + (y * (z / t))) / (a + 1.0d0)
    if (b <= (-1.16d+134)) then
        tmp = (z / b) + (t * (x / (y * b)))
    else if (b <= 390000000000.0d0) then
        tmp = t_2
    else if (b <= 2.35d+88) then
        tmp = t_1
    else if (b <= 4.1d+103) then
        tmp = t_2
    else if (b <= 6d+205) then
        tmp = t_1
    else if (b <= 2.8d+288) then
        tmp = x / (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 t_1 = (z / b) + (t * ((x / y) / b));
	double t_2 = (x + (y * (z / t))) / (a + 1.0);
	double tmp;
	if (b <= -1.16e+134) {
		tmp = (z / b) + (t * (x / (y * b)));
	} else if (b <= 390000000000.0) {
		tmp = t_2;
	} else if (b <= 2.35e+88) {
		tmp = t_1;
	} else if (b <= 4.1e+103) {
		tmp = t_2;
	} else if (b <= 6e+205) {
		tmp = t_1;
	} else if (b <= 2.8e+288) {
		tmp = x / (a + (1.0 + (b * (y / t))));
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z / b) + (t * ((x / y) / b))
	t_2 = (x + (y * (z / t))) / (a + 1.0)
	tmp = 0
	if b <= -1.16e+134:
		tmp = (z / b) + (t * (x / (y * b)))
	elif b <= 390000000000.0:
		tmp = t_2
	elif b <= 2.35e+88:
		tmp = t_1
	elif b <= 4.1e+103:
		tmp = t_2
	elif b <= 6e+205:
		tmp = t_1
	elif b <= 2.8e+288:
		tmp = x / (a + (1.0 + (b * (y / t))))
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z / b) + Float64(t * Float64(Float64(x / y) / b)))
	t_2 = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0))
	tmp = 0.0
	if (b <= -1.16e+134)
		tmp = Float64(Float64(z / b) + Float64(t * Float64(x / Float64(y * b))));
	elseif (b <= 390000000000.0)
		tmp = t_2;
	elseif (b <= 2.35e+88)
		tmp = t_1;
	elseif (b <= 4.1e+103)
		tmp = t_2;
	elseif (b <= 6e+205)
		tmp = t_1;
	elseif (b <= 2.8e+288)
		tmp = Float64(x / 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)
	t_1 = (z / b) + (t * ((x / y) / b));
	t_2 = (x + (y * (z / t))) / (a + 1.0);
	tmp = 0.0;
	if (b <= -1.16e+134)
		tmp = (z / b) + (t * (x / (y * b)));
	elseif (b <= 390000000000.0)
		tmp = t_2;
	elseif (b <= 2.35e+88)
		tmp = t_1;
	elseif (b <= 4.1e+103)
		tmp = t_2;
	elseif (b <= 6e+205)
		tmp = t_1;
	elseif (b <= 2.8e+288)
		tmp = x / (a + (1.0 + (b * (y / t))));
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z / b), $MachinePrecision] + N[(t * N[(N[(x / y), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[b, -1.16e+134], N[(N[(z / b), $MachinePrecision] + N[(t * N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 390000000000.0], t$95$2, If[LessEqual[b, 2.35e+88], t$95$1, If[LessEqual[b, 4.1e+103], t$95$2, If[LessEqual[b, 6e+205], t$95$1, If[LessEqual[b, 2.8e+288], N[(x / 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}
t_1 := \frac{z}{b} + t \cdot \frac{\frac{x}{y}}{b}\\
t_2 := \frac{x + y \cdot \frac{z}{t}}{a + 1}\\
\mathbf{if}\;b \leq -1.16 \cdot 10^{+134}:\\
\;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\

\mathbf{elif}\;b \leq 390000000000:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 2.35 \cdot 10^{+88}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;b \leq 4.1 \cdot 10^{+103}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;b \leq 6 \cdot 10^{+205}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.16e134

    1. Initial program 61.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.16e134 < b < 3.9e11 or 2.35000000000000004e88 < b < 4.1000000000000002e103

    1. Initial program 83.6%

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

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

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

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

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

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

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

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

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

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

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

    if 3.9e11 < b < 2.35000000000000004e88 or 4.1000000000000002e103 < b < 5.9999999999999999e205

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 5.9999999999999999e205 < b < 2.7999999999999998e288

    1. Initial program 89.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.7999999999999998e288 < b

    1. Initial program 1.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.16 \cdot 10^{+134}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{elif}\;b \leq 390000000000:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;b \leq 2.35 \cdot 10^{+88}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{y}}{b}\\ \mathbf{elif}\;b \leq 4.1 \cdot 10^{+103}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;b \leq 6 \cdot 10^{+205}:\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{y}}{b}\\ \mathbf{elif}\;b \leq 2.8 \cdot 10^{+288}:\\ \;\;\;\;\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 5: 64.9% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}} \]
    9. Step-by-step derivation
      1. clear-num63.7%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{{\left(\frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{x}\right)}^{-1}} \]
    11. Step-by-step derivation
      1. unpow-162.1%

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

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

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

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

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

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

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

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

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

    if -4e18 < (+.f64 a 1) < 1600

    1. Initial program 73.3%

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

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

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

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

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

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

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

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

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

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

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

    if 1600 < (+.f64 a 1)

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{a} + \color{blue}{\frac{y}{a} \cdot \frac{z}{t}} \]
    7. Simplified71.2%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a + 1 \leq -4 \cdot 10^{+18}:\\ \;\;\;\;\frac{1}{\frac{a}{x} + \left(\frac{\frac{b}{t}}{\frac{x}{y}} + \frac{1}{x}\right)}\\ \mathbf{elif}\;a + 1 \leq 1600:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a} + \frac{z}{t} \cdot \frac{y}{a}\\ \end{array} \]

Alternative 6: 82.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.02e-125 or 6.19999999999999996e-150 < t

    1. Initial program 81.6%

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

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

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

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

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

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

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

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

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

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

    if -1.02e-125 < t < 6.19999999999999996e-150

    1. Initial program 57.3%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.02 \cdot 10^{-125} \lor \neg \left(t \leq 6.2 \cdot 10^{-150}\right):\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \end{array} \]

Alternative 7: 81.3% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 84.7%

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

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

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

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

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

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

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

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

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

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

    if -7.4999999999999999e-229 < t < 6.9999999999999996e-150

    1. Initial program 51.6%

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

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

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

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

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

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

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

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

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

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

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

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

    if 6.9999999999999996e-150 < t

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -7.5 \cdot 10^{-229}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + \left(1 + y \cdot \frac{b}{t}\right)}\\ \mathbf{elif}\;t \leq 7 \cdot 10^{-150}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \end{array} \]

Alternative 8: 54.5% accurate, 1.0× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;t_1\\


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

    1. Initial program 77.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.32e17 < a < -6.49999999999999974e-111

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

    if -6.49999999999999974e-111 < a < -2.5e-268

    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/80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Simplified72.7%

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

    if -2.5e-268 < a < 1650

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.32 \cdot 10^{+17}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -6.5 \cdot 10^{-111}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -2.5 \cdot 10^{-268}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1650:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]

Alternative 9: 54.5% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;a \leq -9.5 \cdot 10^{-268}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{a} \]
    8. Simplified67.2%

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

    if -1.45e13 < a < -8.00000000000000071e-111

    1. Initial program 68.5%

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

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

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

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

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

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

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

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

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

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

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

    if -8.00000000000000071e-111 < a < -9.50000000000000007e-268

    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/80.8%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{\frac{t}{z}}} \]
    7. Simplified72.7%

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

    if -9.50000000000000007e-268 < a < 1650

    1. Initial program 73.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1650 < a

    1. Initial program 75.2%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -14500000000000:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\ \mathbf{elif}\;a \leq -8 \cdot 10^{-111}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -9.5 \cdot 10^{-268}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1650:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]

Alternative 10: 59.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.79999999999999978e-30 or 3.20000000000000012e-24 < y

    1. Initial program 59.0%

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

        \[\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. +-rgt-identity62.8%

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.79999999999999978e-30 < y < 3.20000000000000012e-24

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -5.8 \cdot 10^{-30} \lor \neg \left(y \leq 3.2 \cdot 10^{-24}\right):\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{x}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 11: 60.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -6.8000000000000001e-28 or 3.80000000000000015e-26 < y

    1. Initial program 59.0%

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

        \[\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. +-rgt-identity62.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.8000000000000001e-28 < y < 3.80000000000000015e-26

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -6.8 \cdot 10^{-28} \lor \neg \left(y \leq 3.8 \cdot 10^{-26}\right):\\ \;\;\;\;\frac{z}{b} + t \cdot \frac{\frac{x}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 12: 65.5% accurate, 1.1× speedup?

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

\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 < -3e19 or 1.1999999999999999e51 < y

    1. Initial program 54.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3e19 < y < 1.1999999999999999e51

    1. Initial program 90.3%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 56.1% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -2.1 \cdot 10^{-25} \lor \neg \left(y \leq 5.3 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.10000000000000002e-25 or 5.29999999999999969e-24 < y

    1. Initial program 59.0%

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

        \[\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. +-rgt-identity62.8%

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

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

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

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

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

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

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

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

    if -2.10000000000000002e-25 < y < 5.29999999999999969e-24

    1. Initial program 91.7%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.1 \cdot 10^{-25} \lor \neg \left(y \leq 5.3 \cdot 10^{-24}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 14: 43.4% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6.8 \cdot 10^{+16} \lor \neg \left(a \leq 2.4 \cdot 10^{+68}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if a < -6.8e16 or 2.40000000000000008e68 < 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/80.2%

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    5. Taylor expanded in a around inf 50.2%

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

    if -6.8e16 < a < 2.40000000000000008e68

    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. *-commutative73.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6.8 \cdot 10^{+16} \lor \neg \left(a \leq 2.4 \cdot 10^{+68}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 15: 25.2% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  5. Taylor expanded in a around inf 25.2%

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  6. Final simplification25.2%

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

Developer target: 79.6% accurate, 0.7× 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 2023301 
(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))))