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

Percentage Accurate: 74.7% → 89.2%
Time: 12.1s
Alternatives: 15
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 74.7% 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: 89.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1} + \frac{x}{a + 1}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-322} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+298}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (+ (* (/ y t) (/ z (+ a 1.0))) (/ x (+ a 1.0)))
     (if (or (<= t_1 -1e-322) (and (not (<= t_1 0.0)) (<= t_1 1e+298)))
       t_1
       (+ (/ z b) (* (/ t y) (/ x b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
	} else if ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t / y) * (x / b));
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
	} else if ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298))) {
		tmp = t_1;
	} else {
		tmp = (z / b) + ((t / y) * (x / b));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0))
	elif (t_1 <= -1e-322) or (not (t_1 <= 0.0) and (t_1 <= 1e+298)):
		tmp = t_1
	else:
		tmp = (z / b) + ((t / y) * (x / b))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(Float64(y / t) * Float64(z / Float64(a + 1.0))) + Float64(x / Float64(a + 1.0)));
	elseif ((t_1 <= -1e-322) || (!(t_1 <= 0.0) && (t_1 <= 1e+298)))
		tmp = t_1;
	else
		tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = ((y / t) * (z / (a + 1.0))) + (x / (a + 1.0));
	elseif ((t_1 <= -1e-322) || (~((t_1 <= 0.0)) && (t_1 <= 1e+298)))
		tmp = t_1;
	else
		tmp = (z / b) + ((t / y) * (x / b));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, -1e-322], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 1e+298]]], t$95$1, N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t_1 \leq -1 \cdot 10^{-322} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 10^{+298}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{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 25.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} + \frac{x}{1 + a} \]
      3. fma-def67.2%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, \frac{z}{1 + a}, \frac{x}{1 + a}\right)} \]
    8. Step-by-step derivation
      1. fma-udef67.2%

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

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

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

    1. Initial program 99.2%

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

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

    1. Initial program 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 87.3% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 10^{+298}\right):\\
\;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\

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


\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))) < -9.88131e-323

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

    1. Initial program 24.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.6%

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

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

Alternative 3: 53.7% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.2 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+62}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+157}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+169}:\\ \;\;\;\;\frac{z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+201}:\\ \;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\ \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.2e-94)
     t_1
     (if (<= t 8.5e-57)
       (/ z b)
       (if (<= t 1.9e+62)
         (/ (+ x (/ (* y z) t)) a)
         (if (<= t 4.9e+89)
           (/ z b)
           (if (<= t 2.25e+157)
             t_1
             (if (<= t 7.2e+169)
               (/ (* z (/ y t)) (+ a 1.0))
               (if (<= t 4.7e+201) (/ x (+ 1.0 (* y (/ b t)))) t_1)))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.2e-94) {
		tmp = t_1;
	} else if (t <= 8.5e-57) {
		tmp = z / b;
	} else if (t <= 1.9e+62) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 4.9e+89) {
		tmp = z / b;
	} else if (t <= 2.25e+157) {
		tmp = t_1;
	} else if (t <= 7.2e+169) {
		tmp = (z * (y / t)) / (a + 1.0);
	} else if (t <= 4.7e+201) {
		tmp = x / (1.0 + (y * (b / t)));
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (t <= (-1.2d-94)) then
        tmp = t_1
    else if (t <= 8.5d-57) then
        tmp = z / b
    else if (t <= 1.9d+62) then
        tmp = (x + ((y * z) / t)) / a
    else if (t <= 4.9d+89) then
        tmp = z / b
    else if (t <= 2.25d+157) then
        tmp = t_1
    else if (t <= 7.2d+169) then
        tmp = (z * (y / t)) / (a + 1.0d0)
    else if (t <= 4.7d+201) then
        tmp = x / (1.0d0 + (y * (b / t)))
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.2e-94) {
		tmp = t_1;
	} else if (t <= 8.5e-57) {
		tmp = z / b;
	} else if (t <= 1.9e+62) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 4.9e+89) {
		tmp = z / b;
	} else if (t <= 2.25e+157) {
		tmp = t_1;
	} else if (t <= 7.2e+169) {
		tmp = (z * (y / t)) / (a + 1.0);
	} else if (t <= 4.7e+201) {
		tmp = x / (1.0 + (y * (b / t)));
	} 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.2e-94:
		tmp = t_1
	elif t <= 8.5e-57:
		tmp = z / b
	elif t <= 1.9e+62:
		tmp = (x + ((y * z) / t)) / a
	elif t <= 4.9e+89:
		tmp = z / b
	elif t <= 2.25e+157:
		tmp = t_1
	elif t <= 7.2e+169:
		tmp = (z * (y / t)) / (a + 1.0)
	elif t <= 4.7e+201:
		tmp = x / (1.0 + (y * (b / t)))
	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.2e-94)
		tmp = t_1;
	elseif (t <= 8.5e-57)
		tmp = Float64(z / b);
	elseif (t <= 1.9e+62)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (t <= 4.9e+89)
		tmp = Float64(z / b);
	elseif (t <= 2.25e+157)
		tmp = t_1;
	elseif (t <= 7.2e+169)
		tmp = Float64(Float64(z * Float64(y / t)) / Float64(a + 1.0));
	elseif (t <= 4.7e+201)
		tmp = Float64(x / Float64(1.0 + Float64(y * Float64(b / t))));
	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.2e-94)
		tmp = t_1;
	elseif (t <= 8.5e-57)
		tmp = z / b;
	elseif (t <= 1.9e+62)
		tmp = (x + ((y * z) / t)) / a;
	elseif (t <= 4.9e+89)
		tmp = z / b;
	elseif (t <= 2.25e+157)
		tmp = t_1;
	elseif (t <= 7.2e+169)
		tmp = (z * (y / t)) / (a + 1.0);
	elseif (t <= 4.7e+201)
		tmp = x / (1.0 + (y * (b / t)));
	else
		tmp = t_1;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.2e-94], t$95$1, If[LessEqual[t, 8.5e-57], N[(z / b), $MachinePrecision], If[LessEqual[t, 1.9e+62], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 4.9e+89], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.25e+157], t$95$1, If[LessEqual[t, 7.2e+169], N[(N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.7e+201], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 1.9 \cdot 10^{+62}:\\
\;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\

\mathbf{elif}\;t \leq 4.9 \cdot 10^{+89}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+157}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;t \leq 7.2 \cdot 10^{+169}:\\
\;\;\;\;\frac{z \cdot \frac{y}{t}}{a + 1}\\

\mathbf{elif}\;t \leq 4.7 \cdot 10^{+201}:\\
\;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -1.2e-94 or 4.89999999999999996e89 < t < 2.24999999999999992e157 or 4.6999999999999998e201 < t

    1. Initial program 78.1%

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e-94 < t < 8.49999999999999955e-57 or 1.89999999999999992e62 < t < 4.89999999999999996e89

    1. Initial program 54.3%

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

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

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

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

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

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

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

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

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

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

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

    if 8.49999999999999955e-57 < t < 1.89999999999999992e62

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if 2.24999999999999992e157 < t < 7.20000000000000019e169

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{y \cdot z}{t}}{1 + a}} \]
      2. associate-/l*75.9%

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
      3. associate-/r/75.9%

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

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

    if 7.20000000000000019e169 < t < 4.6999999999999998e201

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.2 \cdot 10^{-94}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-57}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{+62}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 4.9 \cdot 10^{+89}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+157}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 7.2 \cdot 10^{+169}:\\ \;\;\;\;\frac{z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 4.7 \cdot 10^{+201}:\\ \;\;\;\;\frac{x}{1 + y \cdot \frac{b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 4: 73.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{if}\;b \leq -4 \cdot 10^{+64}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -4.00000000000000009e64 or 1.45000000000000003e141 < b

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.00000000000000009e64 < b < 1.9000000000000001e-56

    1. Initial program 87.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} + \frac{x}{1 + a} \]
      3. fma-def86.8%

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a} + \frac{x}{1 + a}} \]
    9. Applied egg-rr86.8%

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

    if 1.9000000000000001e-56 < b < 1.45000000000000003e141

    1. Initial program 68.5%

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

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

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

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

      \[\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/78.0%

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

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

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

Alternative 5: 77.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\
\mathbf{if}\;b \leq -1.5 \cdot 10^{+123}:\\
\;\;\;\;t_1\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.50000000000000004e123 or 1.19999999999999999e141 < b

    1. Initial program 40.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.50000000000000004e123 < b < 5.80000000000000018e-204

    1. Initial program 85.2%

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

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

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

    if 5.80000000000000018e-204 < b < 1.19999999999999999e141

    1. Initial program 75.6%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.5 \cdot 10^{+123}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \mathbf{elif}\;b \leq 5.8 \cdot 10^{-204}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \mathbf{elif}\;b \leq 1.2 \cdot 10^{+141}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \end{array} \]

Alternative 6: 77.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.1500000000000001e72 or 1.8000000000000001e141 < b

    1. Initial program 44.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.1500000000000001e72 < b < 1.8000000000000001e141

    1. Initial program 82.7%

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

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

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

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

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

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

Alternative 7: 62.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{if}\;t \leq -6.4 \cdot 10^{-156}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+61}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ 1.0 (+ a (* b (/ y t)))))))
   (if (<= t -6.4e-156)
     t_1
     (if (<= t 1.9e-36)
       (+ (/ z b) (* (/ t y) (/ x b)))
       (if (<= t 5e+61)
         (/ (+ x (/ (* y z) t)) a)
         (if (<= t 2e+69) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (1.0 + (a + (b * (y / t))));
	double tmp;
	if (t <= -6.4e-156) {
		tmp = t_1;
	} else if (t <= 1.9e-36) {
		tmp = (z / b) + ((t / y) * (x / b));
	} else if (t <= 5e+61) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 2e+69) {
		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 / (1.0d0 + (a + (b * (y / t))))
    if (t <= (-6.4d-156)) then
        tmp = t_1
    else if (t <= 1.9d-36) then
        tmp = (z / b) + ((t / y) * (x / b))
    else if (t <= 5d+61) then
        tmp = (x + ((y * z) / t)) / a
    else if (t <= 2d+69) 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 / (1.0 + (a + (b * (y / t))));
	double tmp;
	if (t <= -6.4e-156) {
		tmp = t_1;
	} else if (t <= 1.9e-36) {
		tmp = (z / b) + ((t / y) * (x / b));
	} else if (t <= 5e+61) {
		tmp = (x + ((y * z) / t)) / a;
	} else if (t <= 2e+69) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (1.0 + (a + (b * (y / t))))
	tmp = 0
	if t <= -6.4e-156:
		tmp = t_1
	elif t <= 1.9e-36:
		tmp = (z / b) + ((t / y) * (x / b))
	elif t <= 5e+61:
		tmp = (x + ((y * z) / t)) / a
	elif t <= 2e+69:
		tmp = z / b
	else:
		tmp = t_1
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(1.0 + Float64(a + Float64(b * Float64(y / t)))))
	tmp = 0.0
	if (t <= -6.4e-156)
		tmp = t_1;
	elseif (t <= 1.9e-36)
		tmp = Float64(Float64(z / b) + Float64(Float64(t / y) * Float64(x / b)));
	elseif (t <= 5e+61)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / a);
	elseif (t <= 2e+69)
		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 / (1.0 + (a + (b * (y / t))));
	tmp = 0.0;
	if (t <= -6.4e-156)
		tmp = t_1;
	elseif (t <= 1.9e-36)
		tmp = (z / b) + ((t / y) * (x / b));
	elseif (t <= 5e+61)
		tmp = (x + ((y * z) / t)) / a;
	elseif (t <= 2e+69)
		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[(1.0 + N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -6.4e-156], t$95$1, If[LessEqual[t, 1.9e-36], N[(N[(z / b), $MachinePrecision] + N[(N[(t / y), $MachinePrecision] * N[(x / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 5e+61], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[t, 2e+69], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -6.39999999999999964e-156 or 2.0000000000000001e69 < t

    1. Initial program 76.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -6.39999999999999964e-156 < t < 1.89999999999999985e-36

    1. Initial program 53.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.89999999999999985e-36 < t < 5.00000000000000018e61

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

    if 5.00000000000000018e61 < t < 2.0000000000000001e69

    1. Initial program 50.0%

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -6.4 \cdot 10^{-156}:\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-36}:\\ \;\;\;\;\frac{z}{b} + \frac{t}{y} \cdot \frac{x}{b}\\ \mathbf{elif}\;t \leq 5 \cdot 10^{+61}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \mathbf{elif}\;t \leq 2 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + b \cdot \frac{y}{t}\right)}\\ \end{array} \]

Alternative 8: 70.1% accurate, 0.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.40000000000000004e64 or 1.8e12 < b

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.40000000000000004e64 < b < 1.8e12

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a}} + \frac{x}{1 + a} \]
      3. fma-def84.4%

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{y}{t}, \frac{z}{1 + a}, \frac{x}{1 + a}\right)} \]
    8. Step-by-step derivation
      1. fma-udef84.4%

        \[\leadsto \color{blue}{\frac{y}{t} \cdot \frac{z}{1 + a} + \frac{x}{1 + a}} \]
    9. Applied egg-rr84.4%

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

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

Alternative 9: 55.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.22000000000000004e67 or 7.6e11 < b

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22000000000000004e67 < b < 7.6e11

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 67.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.8000000000000001e65 or 6.6e13 < b

    1. Initial program 48.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.8000000000000001e65 < b < 6.6e13

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 53.1% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.06 \cdot 10^{-94}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t \leq 3.55 \cdot 10^{-106}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{z}{a}}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+72}:\\ \;\;\;\;\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.06e-94)
     t_1
     (if (<= t 3.55e-106)
       (/ z b)
       (if (<= t 2.55e+29)
         (/ (/ z a) (/ t y))
         (if (<= t 1.1e+72) (/ 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.06e-94) {
		tmp = t_1;
	} else if (t <= 3.55e-106) {
		tmp = z / b;
	} else if (t <= 2.55e+29) {
		tmp = (z / a) / (t / y);
	} else if (t <= 1.1e+72) {
		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.06d-94)) then
        tmp = t_1
    else if (t <= 3.55d-106) then
        tmp = z / b
    else if (t <= 2.55d+29) then
        tmp = (z / a) / (t / y)
    else if (t <= 1.1d+72) 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.06e-94) {
		tmp = t_1;
	} else if (t <= 3.55e-106) {
		tmp = z / b;
	} else if (t <= 2.55e+29) {
		tmp = (z / a) / (t / y);
	} else if (t <= 1.1e+72) {
		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.06e-94:
		tmp = t_1
	elif t <= 3.55e-106:
		tmp = z / b
	elif t <= 2.55e+29:
		tmp = (z / a) / (t / y)
	elif t <= 1.1e+72:
		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.06e-94)
		tmp = t_1;
	elseif (t <= 3.55e-106)
		tmp = Float64(z / b);
	elseif (t <= 2.55e+29)
		tmp = Float64(Float64(z / a) / Float64(t / y));
	elseif (t <= 1.1e+72)
		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.06e-94)
		tmp = t_1;
	elseif (t <= 3.55e-106)
		tmp = z / b;
	elseif (t <= 2.55e+29)
		tmp = (z / a) / (t / y);
	elseif (t <= 1.1e+72)
		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.06e-94], t$95$1, If[LessEqual[t, 3.55e-106], N[(z / b), $MachinePrecision], If[LessEqual[t, 2.55e+29], N[(N[(z / a), $MachinePrecision] / N[(t / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.1e+72], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

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

\mathbf{elif}\;t \leq 1.1 \cdot 10^{+72}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.06e-94 or 1.1e72 < t

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

    if -1.06e-94 < t < 3.5499999999999998e-106 or 2.55e29 < t < 1.1e72

    1. Initial program 55.4%

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

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

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

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

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

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

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

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

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

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

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

    if 3.5499999999999998e-106 < t < 2.55e29

    1. Initial program 88.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
      3. associate-/r/38.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{a} \cdot \frac{y}{t}} \]
    11. Step-by-step derivation
      1. clear-num42.8%

        \[\leadsto \frac{z}{a} \cdot \color{blue}{\frac{1}{\frac{t}{y}}} \]
      2. un-div-inv48.7%

        \[\leadsto \color{blue}{\frac{\frac{z}{a}}{\frac{t}{y}}} \]
    12. Applied egg-rr48.7%

      \[\leadsto \color{blue}{\frac{\frac{z}{a}}{\frac{t}{y}}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification60.6%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.06 \cdot 10^{-94}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 3.55 \cdot 10^{-106}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 2.55 \cdot 10^{+29}:\\ \;\;\;\;\frac{\frac{z}{a}}{\frac{t}{y}}\\ \mathbf{elif}\;t \leq 1.1 \cdot 10^{+72}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 12: 54.9% accurate, 1.9× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.79999999999999986e-95 or 2.5999999999999998e68 < t

    1. Initial program 76.8%

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

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

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

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

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

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

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

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

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

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

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

    if -6.79999999999999986e-95 < t < 2.5999999999999998e68

    1. Initial program 60.4%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 41.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -1:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 1:\\
\;\;\;\;x\\

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


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

    1. Initial program 66.2%

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

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

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

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

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

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

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 73.0%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 14: 41.0% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.62 \cdot 10^{-65}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;y \leq 5.1 \cdot 10^{-23}:\\
\;\;\;\;x\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.6200000000000001e-65 or 5.10000000000000011e-23 < y

    1. Initial program 52.5%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6200000000000001e-65 < y < 5.10000000000000011e-23

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.62 \cdot 10^{-65}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 5.1 \cdot 10^{-23}:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 15: 19.8% accurate, 17.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification21.5%

    \[\leadsto x \]

Developer target: 79.0% 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 2023258 
(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))))