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

Percentage Accurate: 75.9% → 91.6%
Time: 13.8s
Alternatives: 15
Speedup: 0.8×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 75.9% accurate, 1.0× speedup?

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

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

Alternative 1: 91.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 26.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.00000000000000028e-280 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e299

    1. Initial program 99.2%

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    12. Simplified75.4%

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq -5 \cdot 10^{-280}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+299}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 17.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.00000000000000028e-280 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e299

    1. Initial program 99.2%

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

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

    1. Initial program 50.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    12. Simplified75.4%

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

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

    1. Initial program 10.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 56.3% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\ t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\ t_3 := x + \frac{y \cdot z}{t}\\ \mathbf{if}\;a \leq -2.1 \cdot 10^{+19}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-279}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-198}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 3.55 \cdot 10^{-44}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 10^{-13}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ t (/ y x))) b))
        (t_2 (/ (+ x (* z (/ y t))) a))
        (t_3 (+ x (/ (* y z) t))))
   (if (<= a -2.1e+19)
     t_2
     (if (<= a -1.3e-279)
       t_1
       (if (<= a 9.6e-198)
         t_3
         (if (<= a 3.55e-44)
           t_1
           (if (<= a 1e-13) t_3 (if (<= a 5.5e+15) t_1 t_2))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t / (y / x))) / b;
	double t_2 = (x + (z * (y / t))) / a;
	double t_3 = x + ((y * z) / t);
	double tmp;
	if (a <= -2.1e+19) {
		tmp = t_2;
	} else if (a <= -1.3e-279) {
		tmp = t_1;
	} else if (a <= 9.6e-198) {
		tmp = t_3;
	} else if (a <= 3.55e-44) {
		tmp = t_1;
	} else if (a <= 1e-13) {
		tmp = t_3;
	} else if (a <= 5.5e+15) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = (z + (t / (y / x))) / b
    t_2 = (x + (z * (y / t))) / a
    t_3 = x + ((y * z) / t)
    if (a <= (-2.1d+19)) then
        tmp = t_2
    else if (a <= (-1.3d-279)) then
        tmp = t_1
    else if (a <= 9.6d-198) then
        tmp = t_3
    else if (a <= 3.55d-44) then
        tmp = t_1
    else if (a <= 1d-13) then
        tmp = t_3
    else if (a <= 5.5d+15) then
        tmp = t_1
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t / (y / x))) / b;
	double t_2 = (x + (z * (y / t))) / a;
	double t_3 = x + ((y * z) / t);
	double tmp;
	if (a <= -2.1e+19) {
		tmp = t_2;
	} else if (a <= -1.3e-279) {
		tmp = t_1;
	} else if (a <= 9.6e-198) {
		tmp = t_3;
	} else if (a <= 3.55e-44) {
		tmp = t_1;
	} else if (a <= 1e-13) {
		tmp = t_3;
	} else if (a <= 5.5e+15) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t / (y / x))) / b
	t_2 = (x + (z * (y / t))) / a
	t_3 = x + ((y * z) / t)
	tmp = 0
	if a <= -2.1e+19:
		tmp = t_2
	elif a <= -1.3e-279:
		tmp = t_1
	elif a <= 9.6e-198:
		tmp = t_3
	elif a <= 3.55e-44:
		tmp = t_1
	elif a <= 1e-13:
		tmp = t_3
	elif a <= 5.5e+15:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b)
	t_2 = Float64(Float64(x + Float64(z * Float64(y / t))) / a)
	t_3 = Float64(x + Float64(Float64(y * z) / t))
	tmp = 0.0
	if (a <= -2.1e+19)
		tmp = t_2;
	elseif (a <= -1.3e-279)
		tmp = t_1;
	elseif (a <= 9.6e-198)
		tmp = t_3;
	elseif (a <= 3.55e-44)
		tmp = t_1;
	elseif (a <= 1e-13)
		tmp = t_3;
	elseif (a <= 5.5e+15)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t / (y / x))) / b;
	t_2 = (x + (z * (y / t))) / a;
	t_3 = x + ((y * z) / t);
	tmp = 0.0;
	if (a <= -2.1e+19)
		tmp = t_2;
	elseif (a <= -1.3e-279)
		tmp = t_1;
	elseif (a <= 9.6e-198)
		tmp = t_3;
	elseif (a <= 3.55e-44)
		tmp = t_1;
	elseif (a <= 1e-13)
		tmp = t_3;
	elseif (a <= 5.5e+15)
		tmp = t_1;
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]}, Block[{t$95$3 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[a, -2.1e+19], t$95$2, If[LessEqual[a, -1.3e-279], t$95$1, If[LessEqual[a, 9.6e-198], t$95$3, If[LessEqual[a, 3.55e-44], t$95$1, If[LessEqual[a, 1e-13], t$95$3, If[LessEqual[a, 5.5e+15], t$95$1, t$95$2]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\
t_2 := \frac{x + z \cdot \frac{y}{t}}{a}\\
t_3 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -2.1 \cdot 10^{+19}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq -1.3 \cdot 10^{-279}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 9.6 \cdot 10^{-198}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 3.55 \cdot 10^{-44}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 10^{-13}:\\
\;\;\;\;t_3\\

\mathbf{elif}\;a \leq 5.5 \cdot 10^{+15}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_2\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.1e19 or 5.5e15 < a

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

    if -2.1e19 < a < -1.3000000000000001e-279 or 9.59999999999999946e-198 < a < 3.54999999999999983e-44 or 1e-13 < a < 5.5e15

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    12. Simplified64.8%

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

    if -1.3000000000000001e-279 < a < 9.59999999999999946e-198 or 3.54999999999999983e-44 < a < 1e-13

    1. Initial program 92.5%

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{+19}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \mathbf{elif}\;a \leq -1.3 \cdot 10^{-279}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;a \leq 9.6 \cdot 10^{-198}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 3.55 \cdot 10^{-44}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;a \leq 10^{-13}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;a \leq 5.5 \cdot 10^{+15}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\ \end{array} \]

Alternative 4: 82.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -6 \cdot 10^{-166} \lor \neg \left(t \leq 2.8 \cdot 10^{-105}\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.0000000000000005e-166 or 2.8e-105 < t

    1. Initial program 81.0%

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

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

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

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

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

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

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

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

    if -6.0000000000000005e-166 < t < 2.8e-105

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 82.6% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 82.3%

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

        \[\leadsto \frac{x + \frac{\color{blue}{z \cdot y}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. associate-/l*83.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}} \]
    4. Step-by-step derivation
      1. div-inv86.4%

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

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

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

    if -1.06e-166 < t < 2.3000000000000001e-105

    1. Initial program 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.3000000000000001e-105 < t

    1. Initial program 79.3%

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

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

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

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

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

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

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

Alternative 6: 65.8% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq -3.3 \cdot 10^{+78} \lor \neg \left(y \leq 4.1 \cdot 10^{+33}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.09999999999999996e123 or -8.00000000000000073e106 < y < -3.3e78 or 4.09999999999999995e33 < y

    1. Initial program 45.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999996e123 < y < -8.00000000000000073e106

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
    8. Simplified100.0%

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

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

    if -3.3e78 < y < 4.09999999999999995e33

    1. Initial program 91.6%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;y \leq -3.3 \cdot 10^{+78} \lor \neg \left(y \leq 4.1 \cdot 10^{+33}\right):\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]

Alternative 7: 56.3% accurate, 1.0× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq -2 \cdot 10^{+20} \lor \neg \left(a + 1 \leq 50000000000000\right):\\
\;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a 1) < -2e20 or 5e13 < (+.f64 a 1)

    1. Initial program 73.2%

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

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

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

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

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

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

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

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

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

    if -2e20 < (+.f64 a 1) < 5e13

    1. Initial program 71.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 66.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.35 \cdot 10^{-113} \lor \neg \left(t \leq 2.8 \cdot 10^{-77}\right):\\
\;\;\;\;\frac{x}{a + \left(1 + b \cdot \frac{y}{t}\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.34999999999999998e-113 or 2.7999999999999999e-77 < t

    1. Initial program 81.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.34999999999999998e-113 < t < 2.7999999999999999e-77

    1. Initial program 57.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 66.1% accurate, 1.1× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.3e70

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3e70 < b < 7.80000000000000022e92

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

    if 7.80000000000000022e92 < b

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    12. Simplified71.4%

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

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

Alternative 10: 66.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -8 \cdot 10^{+69}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -8.0000000000000006e69

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000006e69 < b < 3.05e91

    1. Initial program 79.7%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
    8. Simplified73.4%

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

    if 3.05e91 < b

    1. Initial program 55.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    12. Simplified71.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -8 \cdot 10^{+69}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;b \leq 3.05 \cdot 10^{+91}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \end{array} \]

Alternative 11: 55.8% accurate, 1.3× speedup?

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

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

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

\mathbf{elif}\;y \leq -9.6 \cdot 10^{+80}:\\
\;\;\;\;\frac{z}{b}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.09999999999999996e123 or -8.00000000000000073e106 < y < -9.59999999999999916e80 or 1.89999999999999985e29 < y

    1. Initial program 46.1%

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

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

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

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

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

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

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

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

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

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

    if -1.09999999999999996e123 < y < -8.00000000000000073e106

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
    8. Simplified100.0%

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

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

    if -9.59999999999999916e80 < y < 1.89999999999999985e29

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.1 \cdot 10^{+123}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -8 \cdot 10^{+106}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;y \leq -9.6 \cdot 10^{+80}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.9 \cdot 10^{+29}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 12: 42.3% accurate, 1.5× speedup?

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

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

\mathbf{elif}\;y \leq -4.8 \cdot 10^{-166}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;y \leq 6 \cdot 10^{-248}:\\
\;\;\;\;\frac{1}{\frac{1}{x}}\\

\mathbf{elif}\;y \leq 1.15 \cdot 10^{+18}:\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.64999999999999991e-34 or 1.15e18 < y

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

    if -1.64999999999999991e-34 < y < -4.7999999999999997e-166 or 6.00000000000000027e-248 < y < 1.15e18

    1. Initial program 94.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.7999999999999997e-166 < y < 6.00000000000000027e-248

    1. Initial program 92.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.65 \cdot 10^{-34}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -4.8 \cdot 10^{-166}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;y \leq 6 \cdot 10^{-248}:\\ \;\;\;\;\frac{1}{\frac{1}{x}}\\ \mathbf{elif}\;y \leq 1.15 \cdot 10^{+18}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 13: 56.1% accurate, 1.9× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -9.99999999999999967e78 or 5.10000000000000021e23 < y

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999967e78 < y < 5.10000000000000021e23

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

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

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

Alternative 14: 42.5% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;y \leq 2 \cdot 10^{+15}:\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.3999999999999999e-35 or 2e15 < y

    1. Initial program 54.1%

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

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

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

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

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

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

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

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

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

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

    if -8.3999999999999999e-35 < y < 2e15

    1. Initial program 94.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -8.4 \cdot 10^{-35}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 2 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 15: 25.6% accurate, 5.7× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{\frac{x}{a}} \]
  10. Final simplification23.1%

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

Developer target: 79.8% 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 2023238 
(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))))