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

Percentage Accurate: 75.3% → 92.6%
Time: 12.8s
Alternatives: 14
Speedup: 0.9×

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 14 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.3% 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: 92.6% accurate, 0.2× speedup?

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-323}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 10^{+298}:\\
\;\;\;\;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 9.9999999999999996e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.88131e-324 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e297

    1. Initial program 99.2%

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

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

    1. Initial program 54.4%

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b} + \frac{\frac{t}{\frac{b}{x}} - \frac{t + t \cdot a}{b} \cdot \frac{z}{b}}{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.3%

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification95.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}{\frac{y \cdot b}{z} + t \cdot \left(\frac{a}{z} + \frac{1}{z}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{-323}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0:\\ \;\;\;\;\frac{z}{b} + \frac{\frac{t}{\frac{b}{x}} - \frac{z}{b} \cdot \frac{t + t \cdot a}{b}}{y}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 10^{+298}:\\ \;\;\;\;\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}{\frac{y \cdot b}{z} + t \cdot \left(\frac{a}{z} + \frac{1}{z}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

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

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

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

\mathbf{elif}\;t_1 \leq 10^{+298}:\\
\;\;\;\;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 9.9999999999999996e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2e-255 or 5.0000000000000002e-143 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 9.9999999999999996e297

    1. Initial program 99.8%

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

    if -2e-255 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.0000000000000002e-143

    1. Initial program 71.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    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.3%

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

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

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

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

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

Alternative 3: 90.8% accurate, 0.2× speedup?

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

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

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

\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))) < -inf.0 or 9.9999999999999996e297 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < +inf.0

    1. Initial program 27.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.3%

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

    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.3%

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

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

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

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

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

Alternative 4: 80.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.25 \cdot 10^{+168} \lor \neg \left(y \leq 7 \cdot 10^{+212}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.24999999999999992e168 or 6.99999999999999974e212 < y

    1. Initial program 36.8%

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

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

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

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

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

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

    if -1.24999999999999992e168 < y < 6.99999999999999974e212

    1. Initial program 83.5%

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

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

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

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

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

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

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

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

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

Alternative 5: 66.6% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.5e11 or 4.6999999999999999e39 < y

    1. Initial program 50.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{y}{\frac{z}{b}} + \color{blue}{\frac{t}{\frac{z}{1 + a}}}} \]
    9. Simplified60.1%

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

    if -9.5e11 < y < 4.6999999999999999e39

    1. Initial program 94.4%

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

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

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

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

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

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

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

Alternative 6: 78.4% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -4.29999999999999987e226

    1. Initial program 46.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{y}{\frac{z}{b}} + \color{blue}{\frac{t}{\frac{z}{1 + a}}}} \]
    9. Simplified87.4%

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

    if -4.29999999999999987e226 < z

    1. Initial program 77.8%

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

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

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

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

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

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

Alternative 7: 63.3% accurate, 1.0× speedup?

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if x < -9.60000000000000053e-54

    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*78.4%

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

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

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

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

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

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

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

    if -9.60000000000000053e-54 < x < 4.4999999999999999e-127

    1. Initial program 72.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.4999999999999999e-127 < x < 1.2e29

    1. Initial program 81.1%

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

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

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

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

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

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

    if 1.2e29 < x

    1. Initial program 69.8%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;x \leq -9.6 \cdot 10^{-54}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;x \leq 4.5 \cdot 10^{-127}:\\ \;\;\;\;\frac{y}{\frac{y \cdot b + t \cdot \left(a + 1\right)}{z}}\\ \mathbf{elif}\;x \leq 1.2 \cdot 10^{+29}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 8: 60.4% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.1 \cdot 10^{-110} \lor \neg \left(t \leq 1.4 \cdot 10^{-49}\right):\\
\;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.10000000000000002e-110 or 1.39999999999999999e-49 < t

    1. Initial program 81.7%

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

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

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

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

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

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

    if -2.10000000000000002e-110 < t < 1.39999999999999999e-49

    1. Initial program 61.3%

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

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

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

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

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

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

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

Alternative 9: 61.9% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -5.5 \cdot 10^{-110} \lor \neg \left(t \leq 8.2 \cdot 10^{-50}\right):\\
\;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -5.4999999999999998e-110 or 8.19999999999999971e-50 < t

    1. Initial program 81.7%

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

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

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

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

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

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

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

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

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

    if -5.4999999999999998e-110 < t < 8.19999999999999971e-50

    1. Initial program 61.3%

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

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

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

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

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

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

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

Alternative 10: 65.9% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.49999999999999992e135 or 1.5e83 < y

    1. Initial program 39.5%

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

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

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

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

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

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

    if -8.49999999999999992e135 < y < 1.5e83

    1. Initial program 90.9%

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

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

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

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

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

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

Alternative 11: 42.6% accurate, 1.5× speedup?

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

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

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

\mathbf{elif}\;a \leq 5.7 \cdot 10^{-77}:\\
\;\;\;\;x - x \cdot a\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -3.99999999999999991e38 or 2.90000000000000003e32 < a

    1. Initial program 74.2%

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

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

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

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

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

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

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

    if -3.99999999999999991e38 < a < -3.8999999999999999e-113 or 5.69999999999999981e-77 < a < 2.90000000000000003e32

    1. Initial program 66.0%

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

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

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

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

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

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

    if -3.8999999999999999e-113 < a < 5.69999999999999981e-77

    1. Initial program 78.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right) + x} \]
    6. Step-by-step derivation
      1. +-commutative45.5%

        \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
      2. mul-1-neg45.5%

        \[\leadsto x + \color{blue}{\left(-a \cdot x\right)} \]
      3. unsub-neg45.5%

        \[\leadsto \color{blue}{x - a \cdot x} \]
      4. *-commutative45.5%

        \[\leadsto x - \color{blue}{x \cdot a} \]
    7. Simplified45.5%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4 \cdot 10^{+38}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-113}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 5.7 \cdot 10^{-77}:\\ \;\;\;\;x - x \cdot a\\ \mathbf{elif}\;a \leq 2.9 \cdot 10^{+32}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 12: 56.1% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.29999999999999994e58 or 1.44999999999999996e79 < y

    1. Initial program 43.5%

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

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

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

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

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

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

    if -1.29999999999999994e58 < y < 1.44999999999999996e79

    1. Initial program 93.3%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.3 \cdot 10^{+58}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.45 \cdot 10^{+79}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 13: 42.7% accurate, 2.4× speedup?

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

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

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

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


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

    1. Initial program 74.2%

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

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

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

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

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

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

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

    if -4.3e43 < a < 1.2499999999999999e32

    1. Initial program 74.2%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.3 \cdot 10^{+43}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.25 \cdot 10^{+32}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 14: 25.7% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

Developer target: 79.9% 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 2023230 
(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))))