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

Percentage Accurate: 75.1% → 87.2%
Time: 13.5s
Alternatives: 15
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 75.1% 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: 87.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 44.3%

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

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

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

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

      \[\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. clear-num46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.1%

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

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

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

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

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

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

    1. Initial program 27.2%

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

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

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

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

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

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

Alternative 2: 86.4% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 44.3%

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

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

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

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

      \[\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. clear-num46.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 91.1%

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

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

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

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

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

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

    1. Initial program 27.2%

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

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

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

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

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

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

Alternative 3: 79.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq -1.35 \cdot 10^{-273}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.3000000000000002e-159 or 4.79999999999999974e-154 < t

    1. Initial program 83.5%

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

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

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

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

      \[\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. associate-/r/85.3%

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

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

    if -3.3000000000000002e-159 < t < -4.3e-218 or -1.34999999999999992e-273 < t < 4.79999999999999974e-154

    1. Initial program 57.1%

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

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

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

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

      \[\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 75.5%

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

    if -4.3e-218 < t < -1.34999999999999992e-273

    1. Initial program 89.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.3 \cdot 10^{-159}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{elif}\;t \leq -4.3 \cdot 10^{-218}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq -1.35 \cdot 10^{-273}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + 1}\\ \mathbf{elif}\;t \leq 4.8 \cdot 10^{-154}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \end{array} \]

Alternative 4: 55.5% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;z \leq -1.7 \cdot 10^{+212}:\\
\;\;\;\;\frac{z}{b}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.9000000000000002e266

    1. Initial program 76.3%

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

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

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

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

      \[\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 76.3%

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

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

    if -4.9000000000000002e266 < z < -1.70000000000000018e212 or 4.00000000000000018e42 < z

    1. Initial program 59.2%

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

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

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

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

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

    if -1.70000000000000018e212 < z < -3.0999999999999998e159

    1. Initial program 99.9%

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

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

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

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

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

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

    if -3.0999999999999998e159 < z < 4.00000000000000018e42

    1. Initial program 85.2%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.9 \cdot 10^{+266}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;z \leq -1.7 \cdot 10^{+212}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -3.1 \cdot 10^{+159}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;z \leq 4 \cdot 10^{+42}:\\ \;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 5: 69.6% accurate, 0.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -6.1999999999999998e-15

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.1999999999999998e-15 < a < 1750

    1. Initial program 81.5%

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

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

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

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

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

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

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

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

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

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

    if 1750 < a

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

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

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

      \[\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 69.2%

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

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

Alternative 6: 54.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.8 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -1.62 \cdot 10^{-62} \lor \neg \left(t \leq 1.5 \cdot 10^{-107} \lor \neg \left(t \leq 2.8 \cdot 10^{-76}\right) \land t \leq 13.5\right):\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -3.8e+23)
     t_1
     (if (<= t -3.8e-53)
       (* (/ y t) (/ z a))
       (if (or (<= t -1.62e-62)
               (not
                (or (<= t 1.5e-107) (and (not (<= t 2.8e-76)) (<= t 13.5)))))
         t_1
         (/ z b))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -3.8e+23) {
		tmp = t_1;
	} else if (t <= -3.8e-53) {
		tmp = (y / t) * (z / a);
	} else if ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5)))) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-3.8d+23)) then
        tmp = t_1
    else if (t <= (-3.8d-53)) then
        tmp = (y / t) * (z / a)
    else if ((t <= (-1.62d-62)) .or. (.not. (t <= 1.5d-107) .or. (.not. (t <= 2.8d-76)) .and. (t <= 13.5d0))) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -3.8e+23) {
		tmp = t_1;
	} else if (t <= -3.8e-53) {
		tmp = (y / t) * (z / a);
	} else if ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5)))) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if t <= -3.8e+23:
		tmp = t_1
	elif t <= -3.8e-53:
		tmp = (y / t) * (z / a)
	elif (t <= -1.62e-62) or not ((t <= 1.5e-107) or (not (t <= 2.8e-76) and (t <= 13.5))):
		tmp = t_1
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -3.8e+23)
		tmp = t_1;
	elseif (t <= -3.8e-53)
		tmp = Float64(Float64(y / t) * Float64(z / a));
	elseif ((t <= -1.62e-62) || !((t <= 1.5e-107) || (!(t <= 2.8e-76) && (t <= 13.5))))
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -3.8e+23)
		tmp = t_1;
	elseif (t <= -3.8e-53)
		tmp = (y / t) * (z / a);
	elseif ((t <= -1.62e-62) || ~(((t <= 1.5e-107) || (~((t <= 2.8e-76)) && (t <= 13.5)))))
		tmp = t_1;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -3.8e+23], t$95$1, If[LessEqual[t, -3.8e-53], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, -1.62e-62], N[Not[Or[LessEqual[t, 1.5e-107], And[N[Not[LessEqual[t, 2.8e-76]], $MachinePrecision], LessEqual[t, 13.5]]]], $MachinePrecision]], t$95$1, N[(z / b), $MachinePrecision]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.62 \cdot 10^{-62} \lor \neg \left(t \leq 1.5 \cdot 10^{-107} \lor \neg \left(t \leq 2.8 \cdot 10^{-76}\right) \land t \leq 13.5\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -3.79999999999999975e23 or -3.7999999999999998e-53 < t < -1.6199999999999999e-62 or 1.4999999999999999e-107 < t < 2.8000000000000001e-76 or 13.5 < t

    1. Initial program 85.7%

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

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

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

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

      \[\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 68.6%

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

    if -3.79999999999999975e23 < t < -3.7999999999999998e-53

    1. Initial program 85.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
      2. times-frac41.8%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a}} \]
    7. Simplified41.8%

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

    if -1.6199999999999999e-62 < t < 1.4999999999999999e-107 or 2.8000000000000001e-76 < t < 13.5

    1. Initial program 66.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -3.8 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -3.8 \cdot 10^{-53}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -1.62 \cdot 10^{-62} \lor \neg \left(t \leq 1.5 \cdot 10^{-107} \lor \neg \left(t \leq 2.8 \cdot 10^{-76}\right) \land t \leq 13.5\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 7: 54.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -4.4 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-107} \lor \neg \left(t \leq 1.05 \cdot 10^{-75}\right) \land t \leq 25.5:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -4.4e+23)
     t_1
     (if (<= t -4.6e-55)
       (* (/ y t) (/ z a))
       (if (<= t -7.8e-63)
         (+ x (/ (* y z) t))
         (if (or (<= t 1.6e-107) (and (not (<= t 1.05e-75)) (<= t 25.5)))
           (/ z b)
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -4.4e+23) {
		tmp = t_1;
	} else if (t <= -4.6e-55) {
		tmp = (y / t) * (z / a);
	} else if (t <= -7.8e-63) {
		tmp = x + ((y * z) / t);
	} else if ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-4.4d+23)) then
        tmp = t_1
    else if (t <= (-4.6d-55)) then
        tmp = (y / t) * (z / a)
    else if (t <= (-7.8d-63)) then
        tmp = x + ((y * z) / t)
    else if ((t <= 1.6d-107) .or. (.not. (t <= 1.05d-75)) .and. (t <= 25.5d0)) then
        tmp = z / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -4.4e+23) {
		tmp = t_1;
	} else if (t <= -4.6e-55) {
		tmp = (y / t) * (z / a);
	} else if (t <= -7.8e-63) {
		tmp = x + ((y * z) / t);
	} else if ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if t <= -4.4e+23:
		tmp = t_1
	elif t <= -4.6e-55:
		tmp = (y / t) * (z / a)
	elif t <= -7.8e-63:
		tmp = x + ((y * z) / t)
	elif (t <= 1.6e-107) or (not (t <= 1.05e-75) and (t <= 25.5)):
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -4.4e+23)
		tmp = t_1;
	elseif (t <= -4.6e-55)
		tmp = Float64(Float64(y / t) * Float64(z / a));
	elseif (t <= -7.8e-63)
		tmp = Float64(x + Float64(Float64(y * z) / t));
	elseif ((t <= 1.6e-107) || (!(t <= 1.05e-75) && (t <= 25.5)))
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -4.4e+23)
		tmp = t_1;
	elseif (t <= -4.6e-55)
		tmp = (y / t) * (z / a);
	elseif (t <= -7.8e-63)
		tmp = x + ((y * z) / t);
	elseif ((t <= 1.6e-107) || (~((t <= 1.05e-75)) && (t <= 25.5)))
		tmp = z / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -4.4e+23], t$95$1, If[LessEqual[t, -4.6e-55], N[(N[(y / t), $MachinePrecision] * N[(z / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -7.8e-63], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.6e-107], And[N[Not[LessEqual[t, 1.05e-75]], $MachinePrecision], LessEqual[t, 25.5]]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -7.8 \cdot 10^{-63}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-107} \lor \neg \left(t \leq 1.05 \cdot 10^{-75}\right) \land t \leq 25.5:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -4.40000000000000017e23 or 1.60000000000000006e-107 < t < 1.0500000000000001e-75 or 25.5 < t

    1. Initial program 86.0%

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

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

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

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

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

    if -4.40000000000000017e23 < t < -4.60000000000000023e-55

    1. Initial program 85.4%

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

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot a}} \]
      2. times-frac41.8%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{a}} \]
    7. Simplified41.8%

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

    if -4.60000000000000023e-55 < t < -7.80000000000000044e-63

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

    if -7.80000000000000044e-63 < t < 1.60000000000000006e-107 or 1.0500000000000001e-75 < t < 25.5

    1. Initial program 66.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.4 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -4.6 \cdot 10^{-55}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a}\\ \mathbf{elif}\;t \leq -7.8 \cdot 10^{-63}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 1.6 \cdot 10^{-107} \lor \neg \left(t \leq 1.05 \cdot 10^{-75}\right) \land t \leq 25.5:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 8: 54.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.05 \cdot 10^{+23}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-53}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot a}\\ \mathbf{elif}\;t \leq -1.52 \cdot 10^{-61}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-108} \lor \neg \left(t \leq 1.1 \cdot 10^{-72}\right) \land t \leq 14.5:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -1.05e+23)
     t_1
     (if (<= t -2.9e-53)
       (/ (* y z) (* t a))
       (if (<= t -1.52e-61)
         (+ x (/ (* y z) t))
         (if (or (<= t 8.6e-108) (and (not (<= t 1.1e-72)) (<= t 14.5)))
           (/ z b)
           t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.05e+23) {
		tmp = t_1;
	} else if (t <= -2.9e-53) {
		tmp = (y * z) / (t * a);
	} else if (t <= -1.52e-61) {
		tmp = x + ((y * z) / t);
	} else if ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-1.05d+23)) then
        tmp = t_1
    else if (t <= (-2.9d-53)) then
        tmp = (y * z) / (t * a)
    else if (t <= (-1.52d-61)) then
        tmp = x + ((y * z) / t)
    else if ((t <= 8.6d-108) .or. (.not. (t <= 1.1d-72)) .and. (t <= 14.5d0)) then
        tmp = z / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.05e+23) {
		tmp = t_1;
	} else if (t <= -2.9e-53) {
		tmp = (y * z) / (t * a);
	} else if (t <= -1.52e-61) {
		tmp = x + ((y * z) / t);
	} else if ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if t <= -1.05e+23:
		tmp = t_1
	elif t <= -2.9e-53:
		tmp = (y * z) / (t * a)
	elif t <= -1.52e-61:
		tmp = x + ((y * z) / t)
	elif (t <= 8.6e-108) or (not (t <= 1.1e-72) and (t <= 14.5)):
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.05e+23)
		tmp = t_1;
	elseif (t <= -2.9e-53)
		tmp = Float64(Float64(y * z) / Float64(t * a));
	elseif (t <= -1.52e-61)
		tmp = Float64(x + Float64(Float64(y * z) / t));
	elseif ((t <= 8.6e-108) || (!(t <= 1.1e-72) && (t <= 14.5)))
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.05e+23)
		tmp = t_1;
	elseif (t <= -2.9e-53)
		tmp = (y * z) / (t * a);
	elseif (t <= -1.52e-61)
		tmp = x + ((y * z) / t);
	elseif ((t <= 8.6e-108) || (~((t <= 1.1e-72)) && (t <= 14.5)))
		tmp = z / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.05e+23], t$95$1, If[LessEqual[t, -2.9e-53], N[(N[(y * z), $MachinePrecision] / N[(t * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, -1.52e-61], N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 8.6e-108], And[N[Not[LessEqual[t, 1.1e-72]], $MachinePrecision], LessEqual[t, 14.5]]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq -1.52 \cdot 10^{-61}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

\mathbf{elif}\;t \leq 8.6 \cdot 10^{-108} \lor \neg \left(t \leq 1.1 \cdot 10^{-72}\right) \land t \leq 14.5:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.0500000000000001e23 or 8.6000000000000001e-108 < t < 1.10000000000000001e-72 or 14.5 < t

    1. Initial program 86.0%

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

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

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

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

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

    if -1.0500000000000001e23 < t < -2.8999999999999998e-53

    1. Initial program 85.4%

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

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

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

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

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

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

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

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

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

    if -2.8999999999999998e-53 < t < -1.52000000000000003e-61

    1. Initial program 76.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.52000000000000003e-61 < t < 8.6000000000000001e-108 or 1.10000000000000001e-72 < t < 14.5

    1. Initial program 66.4%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.05 \cdot 10^{+23}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -2.9 \cdot 10^{-53}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot a}\\ \mathbf{elif}\;t \leq -1.52 \cdot 10^{-61}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;t \leq 8.6 \cdot 10^{-108} \lor \neg \left(t \leq 1.1 \cdot 10^{-72}\right) \land t \leq 14.5:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 9: 66.6% accurate, 1.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.2500000000000001e119 or 3.0999999999999999e106 < y

    1. Initial program 45.2%

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

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

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

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

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

    if -2.2500000000000001e119 < y < 3.0999999999999999e106

    1. Initial program 90.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 53.7% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.95 \cdot 10^{+24}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{a + 1} \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-107} \lor \neg \left(t \leq 2.9 \cdot 10^{-74}\right) \land t \leq 210:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -1.95e+24)
     t_1
     (if (<= t -7e-157)
       (* (/ z (+ a 1.0)) (/ y t))
       (if (or (<= t 1.75e-107) (and (not (<= t 2.9e-74)) (<= t 210.0)))
         (/ z b)
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.95e+24) {
		tmp = t_1;
	} else if (t <= -7e-157) {
		tmp = (z / (a + 1.0)) * (y / t);
	} else if ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-1.95d+24)) then
        tmp = t_1
    else if (t <= (-7d-157)) then
        tmp = (z / (a + 1.0d0)) * (y / t)
    else if ((t <= 1.75d-107) .or. (.not. (t <= 2.9d-74)) .and. (t <= 210.0d0)) then
        tmp = z / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.95e+24) {
		tmp = t_1;
	} else if (t <= -7e-157) {
		tmp = (z / (a + 1.0)) * (y / t);
	} else if ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if t <= -1.95e+24:
		tmp = t_1
	elif t <= -7e-157:
		tmp = (z / (a + 1.0)) * (y / t)
	elif (t <= 1.75e-107) or (not (t <= 2.9e-74) and (t <= 210.0)):
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.95e+24)
		tmp = t_1;
	elseif (t <= -7e-157)
		tmp = Float64(Float64(z / Float64(a + 1.0)) * Float64(y / t));
	elseif ((t <= 1.75e-107) || (!(t <= 2.9e-74) && (t <= 210.0)))
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.95e+24)
		tmp = t_1;
	elseif (t <= -7e-157)
		tmp = (z / (a + 1.0)) * (y / t);
	elseif ((t <= 1.75e-107) || (~((t <= 2.9e-74)) && (t <= 210.0)))
		tmp = z / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.95e+24], t$95$1, If[LessEqual[t, -7e-157], N[(N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 1.75e-107], And[N[Not[LessEqual[t, 2.9e-74]], $MachinePrecision], LessEqual[t, 210.0]]], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 1.75 \cdot 10^{-107} \lor \neg \left(t \leq 2.9 \cdot 10^{-74}\right) \land t \leq 210:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.9499999999999999e24 or 1.74999999999999993e-107 < t < 2.9e-74 or 210 < t

    1. Initial program 86.0%

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

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

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

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

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

    if -1.9499999999999999e24 < t < -7.0000000000000004e-157

    1. Initial program 79.8%

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

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

        \[\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 b around 0 61.3%

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} \]
    7. Simplified49.0%

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

    if -7.0000000000000004e-157 < t < 1.74999999999999993e-107 or 2.9e-74 < t < 210

    1. Initial program 65.5%

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

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

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

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

      \[\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 66.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.95 \cdot 10^{+24}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -7 \cdot 10^{-157}:\\ \;\;\;\;\frac{z}{a + 1} \cdot \frac{y}{t}\\ \mathbf{elif}\;t \leq 1.75 \cdot 10^{-107} \lor \neg \left(t \leq 2.9 \cdot 10^{-74}\right) \land t \leq 210:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 11: 53.6% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.1 \cdot 10^{+25}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-108} \lor \neg \left(t \leq 5 \cdot 10^{-76}\right) \land t \leq 88:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -1.1e+25)
     t_1
     (if (<= t -5.2e-155)
       (/ (* y z) (* t (+ a 1.0)))
       (if (or (<= t 2.6e-108) (and (not (<= t 5e-76)) (<= t 88.0)))
         (/ z b)
         t_1)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.1e+25) {
		tmp = t_1;
	} else if (t <= -5.2e-155) {
		tmp = (y * z) / (t * (a + 1.0));
	} else if ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-1.1d+25)) then
        tmp = t_1
    else if (t <= (-5.2d-155)) then
        tmp = (y * z) / (t * (a + 1.0d0))
    else if ((t <= 2.6d-108) .or. (.not. (t <= 5d-76)) .and. (t <= 88.0d0)) then
        tmp = z / b
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.1e+25) {
		tmp = t_1;
	} else if (t <= -5.2e-155) {
		tmp = (y * z) / (t * (a + 1.0));
	} else if ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0))) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if t <= -1.1e+25:
		tmp = t_1
	elif t <= -5.2e-155:
		tmp = (y * z) / (t * (a + 1.0))
	elif (t <= 2.6e-108) or (not (t <= 5e-76) and (t <= 88.0)):
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.1e+25)
		tmp = t_1;
	elseif (t <= -5.2e-155)
		tmp = Float64(Float64(y * z) / Float64(t * Float64(a + 1.0)));
	elseif ((t <= 2.6e-108) || (!(t <= 5e-76) && (t <= 88.0)))
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (t <= -1.1e+25)
		tmp = t_1;
	elseif (t <= -5.2e-155)
		tmp = (y * z) / (t * (a + 1.0));
	elseif ((t <= 2.6e-108) || (~((t <= 5e-76)) && (t <= 88.0)))
		tmp = z / b;
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.1e+25], t$95$1, If[LessEqual[t, -5.2e-155], N[(N[(y * z), $MachinePrecision] / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t, 2.6e-108], And[N[Not[LessEqual[t, 5e-76]], $MachinePrecision], LessEqual[t, 88.0]]], N[(z / b), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 2.6 \cdot 10^{-108} \lor \neg \left(t \leq 5 \cdot 10^{-76}\right) \land t \leq 88:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.1e25 or 2.59999999999999984e-108 < t < 4.9999999999999998e-76 or 88 < t

    1. Initial program 86.0%

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

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

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

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

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

    if -1.1e25 < t < -5.20000000000000016e-155

    1. Initial program 79.8%

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

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

        \[\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 b around 0 61.3%

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

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

    if -5.20000000000000016e-155 < t < 2.59999999999999984e-108 or 4.9999999999999998e-76 < t < 88

    1. Initial program 65.5%

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

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

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

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

      \[\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 66.8%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.1 \cdot 10^{+25}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq -5.2 \cdot 10^{-155}:\\ \;\;\;\;\frac{y \cdot z}{t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-108} \lor \neg \left(t \leq 5 \cdot 10^{-76}\right) \land t \leq 88:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 12: 61.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5.2 \cdot 10^{+109}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;b \leq 2.95 \cdot 10^{+56}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.1999999999999997e109 or 2.9500000000000001e56 < b

    1. Initial program 61.6%

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

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

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

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

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

    if -5.1999999999999997e109 < b < 2.9500000000000001e56

    1. Initial program 86.6%

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

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

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

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

      \[\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 78.3%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5.2 \cdot 10^{+109}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;b \leq 2.95 \cdot 10^{+56}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 13: 55.5% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.55 \cdot 10^{+27} \lor \neg \left(t \leq 1.75 \cdot 10^{-107}\right) \land \left(t \leq 9.6 \cdot 10^{-74} \lor \neg \left(t \leq 15.2\right)\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.55000000000000002e27 or 1.74999999999999993e-107 < t < 9.5999999999999996e-74 or 15.199999999999999 < t

    1. Initial program 86.7%

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

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

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

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

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

    if -4.55000000000000002e27 < t < 1.74999999999999993e-107 or 9.5999999999999996e-74 < t < 15.199999999999999

    1. Initial program 69.1%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -4.55 \cdot 10^{+27} \lor \neg \left(t \leq 1.75 \cdot 10^{-107}\right) \land \left(t \leq 9.6 \cdot 10^{-74} \lor \neg \left(t \leq 15.2\right)\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 14: 42.7% accurate, 2.4× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.6000000000000001e27 or 15 < t

    1. Initial program 85.4%

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

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

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

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

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

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

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

    if -4.6000000000000001e27 < t < 15

    1. Initial program 71.5%

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

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

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

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

      \[\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 52.9%

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

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

Alternative 15: 25.2% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  6. Final simplification26.0%

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

Developer target: 79.3% 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 2023171 
(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))))