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

Percentage Accurate: 74.6% → 87.9%
Time: 20.5s
Alternatives: 15
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 74.6% accurate, 1.0× speedup?

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

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

Alternative 1: 87.9% accurate, 0.1× speedup?

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

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

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

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

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


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

    1. Initial program 85.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000002e-216 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.49999999999999996e66

    1. Initial program 84.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity84.5%

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -4 \cdot 10^{-216}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}, \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 2.5 \cdot 10^{+66}:\\ \;\;\;\;\frac{x + \frac{1}{t} \cdot \frac{y}{\frac{1}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}, \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 87.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t_1 \leq -1 \cdot 10^{-185}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{-308}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\ \;\;\;\;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))
     (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
     (if (<= t_1 -1e-185)
       t_1
       (if (<= t_1 4e-308)
         (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b)))))
         (if (<= t_1 2e+300) 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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	} else if (t_1 <= -1e-185) {
		tmp = t_1;
	} else if (t_1 <= 4e-308) {
		tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	} else if (t_1 <= 2e+300) {
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	} else if (t_1 <= -1e-185) {
		tmp = t_1;
	} else if (t_1 <= 4e-308) {
		tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	} else if (t_1 <= 2e+300) {
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)))
	elif t_1 <= -1e-185:
		tmp = t_1
	elif t_1 <= 4e-308:
		tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))))
	elif t_1 <= 2e+300:
		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(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))));
	elseif (t_1 <= -1e-185)
		tmp = t_1;
	elseif (t_1 <= 4e-308)
		tmp = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))));
	elseif (t_1 <= 2e+300)
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	elseif (t_1 <= -1e-185)
		tmp = t_1;
	elseif (t_1 <= 4e-308)
		tmp = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	elseif (t_1 <= 2e+300)
		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[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -1e-185], t$95$1, If[LessEqual[t$95$1, 4e-308], N[(N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], 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{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;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 34.0%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -9.9999999999999999e-186 or 4.00000000000000013e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e300

    1. Initial program 99.3%

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

    if -9.9999999999999999e-186 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.00000000000000013e-308

    1. Initial program 66.9%

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

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

Alternative 3: 88.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 := \left(a + 1\right) + y \cdot \frac{b}{t}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t_2}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{x + \frac{1}{\frac{t}{y \cdot z}}}{t_2}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\ \;\;\;\;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))))
        (t_2 (+ (+ a 1.0) (* y (/ b t)))))
   (if (<= t_1 (- INFINITY))
     (/ (+ x (* y (/ z t))) t_2)
     (if (<= t_1 -2e-253)
       t_1
       (if (<= t_1 0.0)
         (/ (+ x (/ 1.0 (/ t (* y z)))) t_2)
         (if (<= t_1 2e+300) 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 t_2 = (a + 1.0) + (y * (b / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x + (y * (z / t))) / t_2;
	} else if (t_1 <= -2e-253) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (x + (1.0 / (t / (y * z)))) / t_2;
	} else if (t_1 <= 2e+300) {
		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 t_2 = (a + 1.0) + (y * (b / t));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x + (y * (z / t))) / t_2;
	} else if (t_1 <= -2e-253) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (x + (1.0 / (t / (y * z)))) / t_2;
	} else if (t_1 <= 2e+300) {
		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))
	t_2 = (a + 1.0) + (y * (b / t))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x + (y * (z / t))) / t_2
	elif t_1 <= -2e-253:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = (x + (1.0 / (t / (y * z)))) / t_2
	elif t_1 <= 2e+300:
		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)))
	t_2 = Float64(Float64(a + 1.0) + Float64(y * Float64(b / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / t_2);
	elseif (t_1 <= -2e-253)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(x + Float64(1.0 / Float64(t / Float64(y * z)))) / t_2);
	elseif (t_1 <= 2e+300)
		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));
	t_2 = (a + 1.0) + (y * (b / t));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x + (y * (z / t))) / t_2;
	elseif (t_1 <= -2e-253)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = (x + (1.0 / (t / (y * z)))) / t_2;
	elseif (t_1 <= 2e+300)
		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]}, Block[{t$95$2 = N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, -2e-253], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(x + N[(1.0 / N[(t / N[(y * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / t$95$2), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], 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}}\\
t_2 := \left(a + 1\right) + y \cdot \frac{b}{t}\\
\mathbf{if}\;t_1 \leq -\infty:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{t_2}\\

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;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 34.0%

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

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

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

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

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

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

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

    1. Initial program 98.8%

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

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

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

Alternative 4: 88.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}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-253}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 4 \cdot 10^{-308}:\\ \;\;\;\;\frac{x + \frac{1}{t} \cdot \frac{y}{\frac{1}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\ \;\;\;\;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))
     (/ (+ x (* y (/ z t))) (+ (+ a 1.0) (* y (/ b t))))
     (if (<= t_1 -2e-253)
       t_1
       (if (<= t_1 4e-308)
         (/ (+ x (* (/ 1.0 t) (/ y (/ 1.0 z)))) (+ a (+ 1.0 (/ y (/ t b)))))
         (if (<= t_1 2e+300) 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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	} else if (t_1 <= -2e-253) {
		tmp = t_1;
	} else if (t_1 <= 4e-308) {
		tmp = (x + ((1.0 / t) * (y / (1.0 / z)))) / (a + (1.0 + (y / (t / b))));
	} else if (t_1 <= 2e+300) {
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	} else if (t_1 <= -2e-253) {
		tmp = t_1;
	} else if (t_1 <= 4e-308) {
		tmp = (x + ((1.0 / t) * (y / (1.0 / z)))) / (a + (1.0 + (y / (t / b))));
	} else if (t_1 <= 2e+300) {
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)))
	elif t_1 <= -2e-253:
		tmp = t_1
	elif t_1 <= 4e-308:
		tmp = (x + ((1.0 / t) * (y / (1.0 / z)))) / (a + (1.0 + (y / (t / b))))
	elif t_1 <= 2e+300:
		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(Float64(x + Float64(y * Float64(z / t))) / Float64(Float64(a + 1.0) + Float64(y * Float64(b / t))));
	elseif (t_1 <= -2e-253)
		tmp = t_1;
	elseif (t_1 <= 4e-308)
		tmp = Float64(Float64(x + Float64(Float64(1.0 / t) * Float64(y / Float64(1.0 / z)))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))));
	elseif (t_1 <= 2e+300)
		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 = (x + (y * (z / t))) / ((a + 1.0) + (y * (b / t)));
	elseif (t_1 <= -2e-253)
		tmp = t_1;
	elseif (t_1 <= 4e-308)
		tmp = (x + ((1.0 / t) * (y / (1.0 / z)))) / (a + (1.0 + (y / (t / b))));
	elseif (t_1 <= 2e+300)
		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[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-253], t$95$1, If[LessEqual[t$95$1, 4e-308], N[(N[(x + N[(N[(1.0 / t), $MachinePrecision] * N[(y / N[(1.0 / z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+300], 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{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\

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

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

\mathbf{elif}\;t_1 \leq 2 \cdot 10^{+300}:\\
\;\;\;\;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 34.0%

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -2.0000000000000001e-253 or 4.00000000000000013e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 2.0000000000000001e300

    1. Initial program 98.8%

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

    if -2.0000000000000001e-253 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.00000000000000013e-308

    1. Initial program 64.3%

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{y}{\frac{t}{z}}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}} \]
    4. Add Preprocessing
    5. Step-by-step derivation
      1. *-un-lft-identity74.0%

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

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

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

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

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

    1. Initial program 4.4%

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

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

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

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

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

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

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

Alternative 5: 78.2% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ t_2 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{if}\;y \leq -9.5 \cdot 10^{+76}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-246}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-297}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+199}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (* z (/ y t))) (+ a (+ 1.0 (/ y (/ t b))))))
        (t_2 (/ (+ z (/ t (/ y x))) b)))
   (if (<= y -9.5e+76)
     t_2
     (if (<= y -2.15e-246)
       t_1
       (if (<= y 4.7e-297)
         (/ x (+ 1.0 (+ a (/ (* y b) t))))
         (if (<= y 3.3e+199) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	double t_2 = (z + (t / (y / x))) / b;
	double tmp;
	if (y <= -9.5e+76) {
		tmp = t_2;
	} else if (y <= -2.15e-246) {
		tmp = t_1;
	} else if (y <= 4.7e-297) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 3.3e+199) {
		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) :: tmp
    t_1 = (x + (z * (y / t))) / (a + (1.0d0 + (y / (t / b))))
    t_2 = (z + (t / (y / x))) / b
    if (y <= (-9.5d+76)) then
        tmp = t_2
    else if (y <= (-2.15d-246)) then
        tmp = t_1
    else if (y <= 4.7d-297) then
        tmp = x / (1.0d0 + (a + ((y * b) / t)))
    else if (y <= 3.3d+199) 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 = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	double t_2 = (z + (t / (y / x))) / b;
	double tmp;
	if (y <= -9.5e+76) {
		tmp = t_2;
	} else if (y <= -2.15e-246) {
		tmp = t_1;
	} else if (y <= 4.7e-297) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 3.3e+199) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))))
	t_2 = (z + (t / (y / x))) / b
	tmp = 0
	if y <= -9.5e+76:
		tmp = t_2
	elif y <= -2.15e-246:
		tmp = t_1
	elif y <= 4.7e-297:
		tmp = x / (1.0 + (a + ((y * b) / t)))
	elif y <= 3.3e+199:
		tmp = t_1
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(z * Float64(y / t))) / Float64(a + Float64(1.0 + Float64(y / Float64(t / b)))))
	t_2 = Float64(Float64(z + Float64(t / Float64(y / x))) / b)
	tmp = 0.0
	if (y <= -9.5e+76)
		tmp = t_2;
	elseif (y <= -2.15e-246)
		tmp = t_1;
	elseif (y <= 4.7e-297)
		tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))));
	elseif (y <= 3.3e+199)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + (z * (y / t))) / (a + (1.0 + (y / (t / b))));
	t_2 = (z + (t / (y / x))) / b;
	tmp = 0.0;
	if (y <= -9.5e+76)
		tmp = t_2;
	elseif (y <= -2.15e-246)
		tmp = t_1;
	elseif (y <= 4.7e-297)
		tmp = x / (1.0 + (a + ((y * b) / t)));
	elseif (y <= 3.3e+199)
		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[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + N[(1.0 + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, If[LessEqual[y, -9.5e+76], t$95$2, If[LessEqual[y, -2.15e-246], t$95$1, If[LessEqual[y, 4.7e-297], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+199], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -2.15 \cdot 10^{-246}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+199}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -9.5000000000000003e76 or 3.2999999999999998e199 < y

    1. Initial program 31.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{\frac{t}{\frac{y}{x}}}}{b} \]
    10. Simplified73.6%

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

    if -9.5000000000000003e76 < y < -2.14999999999999996e-246 or 4.69999999999999986e-297 < y < 3.2999999999999998e199

    1. Initial program 91.2%

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

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

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

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

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

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

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

    if -2.14999999999999996e-246 < y < 4.69999999999999986e-297

    1. Initial program 99.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9.5 \cdot 10^{+76}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq -2.15 \cdot 10^{-246}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{elif}\;y \leq 4.7 \cdot 10^{-297}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+199}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + \left(1 + \frac{y}{\frac{t}{b}}\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 66.2% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := x + \frac{y \cdot z}{t}\\ t_2 := \frac{t_1}{a + 1}\\ t_3 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\ t_4 := \frac{y \cdot b}{t}\\ \mathbf{if}\;y \leq -1.72 \cdot 10^{+67}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{x}{1 + \left(a + t_4\right)}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-220}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-265}:\\ \;\;\;\;\frac{t_1}{1 + t_4}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+171}:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y z) t)))
        (t_2 (/ t_1 (+ a 1.0)))
        (t_3 (/ (+ z (/ t (/ y x))) b))
        (t_4 (/ (* y b) t)))
   (if (<= y -1.72e+67)
     t_3
     (if (<= y -3.6e-101)
       (/ x (+ 1.0 (+ a t_4)))
       (if (<= y -2e-220)
         t_2
         (if (<= y -2.5e-265)
           (/ t_1 (+ 1.0 t_4))
           (if (<= y 3.3e+171) t_2 t_3)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((y * z) / t);
	double t_2 = t_1 / (a + 1.0);
	double t_3 = (z + (t / (y / x))) / b;
	double t_4 = (y * b) / t;
	double tmp;
	if (y <= -1.72e+67) {
		tmp = t_3;
	} else if (y <= -3.6e-101) {
		tmp = x / (1.0 + (a + t_4));
	} else if (y <= -2e-220) {
		tmp = t_2;
	} else if (y <= -2.5e-265) {
		tmp = t_1 / (1.0 + t_4);
	} else if (y <= 3.3e+171) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	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) :: t_4
    real(8) :: tmp
    t_1 = x + ((y * z) / t)
    t_2 = t_1 / (a + 1.0d0)
    t_3 = (z + (t / (y / x))) / b
    t_4 = (y * b) / t
    if (y <= (-1.72d+67)) then
        tmp = t_3
    else if (y <= (-3.6d-101)) then
        tmp = x / (1.0d0 + (a + t_4))
    else if (y <= (-2d-220)) then
        tmp = t_2
    else if (y <= (-2.5d-265)) then
        tmp = t_1 / (1.0d0 + t_4)
    else if (y <= 3.3d+171) then
        tmp = t_2
    else
        tmp = t_3
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x + ((y * z) / t);
	double t_2 = t_1 / (a + 1.0);
	double t_3 = (z + (t / (y / x))) / b;
	double t_4 = (y * b) / t;
	double tmp;
	if (y <= -1.72e+67) {
		tmp = t_3;
	} else if (y <= -3.6e-101) {
		tmp = x / (1.0 + (a + t_4));
	} else if (y <= -2e-220) {
		tmp = t_2;
	} else if (y <= -2.5e-265) {
		tmp = t_1 / (1.0 + t_4);
	} else if (y <= 3.3e+171) {
		tmp = t_2;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x + ((y * z) / t)
	t_2 = t_1 / (a + 1.0)
	t_3 = (z + (t / (y / x))) / b
	t_4 = (y * b) / t
	tmp = 0
	if y <= -1.72e+67:
		tmp = t_3
	elif y <= -3.6e-101:
		tmp = x / (1.0 + (a + t_4))
	elif y <= -2e-220:
		tmp = t_2
	elif y <= -2.5e-265:
		tmp = t_1 / (1.0 + t_4)
	elif y <= 3.3e+171:
		tmp = t_2
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x + Float64(Float64(y * z) / t))
	t_2 = Float64(t_1 / Float64(a + 1.0))
	t_3 = Float64(Float64(z + Float64(t / Float64(y / x))) / b)
	t_4 = Float64(Float64(y * b) / t)
	tmp = 0.0
	if (y <= -1.72e+67)
		tmp = t_3;
	elseif (y <= -3.6e-101)
		tmp = Float64(x / Float64(1.0 + Float64(a + t_4)));
	elseif (y <= -2e-220)
		tmp = t_2;
	elseif (y <= -2.5e-265)
		tmp = Float64(t_1 / Float64(1.0 + t_4));
	elseif (y <= 3.3e+171)
		tmp = t_2;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x + ((y * z) / t);
	t_2 = t_1 / (a + 1.0);
	t_3 = (z + (t / (y / x))) / b;
	t_4 = (y * b) / t;
	tmp = 0.0;
	if (y <= -1.72e+67)
		tmp = t_3;
	elseif (y <= -3.6e-101)
		tmp = x / (1.0 + (a + t_4));
	elseif (y <= -2e-220)
		tmp = t_2;
	elseif (y <= -2.5e-265)
		tmp = t_1 / (1.0 + t_4);
	elseif (y <= 3.3e+171)
		tmp = t_2;
	else
		tmp = t_3;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(z + N[(t / N[(y / x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]}, Block[{t$95$4 = N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]}, If[LessEqual[y, -1.72e+67], t$95$3, If[LessEqual[y, -3.6e-101], N[(x / N[(1.0 + N[(a + t$95$4), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -2e-220], t$95$2, If[LessEqual[y, -2.5e-265], N[(t$95$1 / N[(1.0 + t$95$4), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 3.3e+171], t$95$2, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-101}:\\
\;\;\;\;\frac{x}{1 + \left(a + t_4\right)}\\

\mathbf{elif}\;y \leq -2 \cdot 10^{-220}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -2.5 \cdot 10^{-265}:\\
\;\;\;\;\frac{t_1}{1 + t_4}\\

\mathbf{elif}\;y \leq 3.3 \cdot 10^{+171}:\\
\;\;\;\;t_2\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -1.72000000000000011e67 or 3.29999999999999991e171 < y

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.72000000000000011e67 < y < -3.6e-101

    1. Initial program 82.9%

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

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

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

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

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

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

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

    if -3.6e-101 < y < -1.99999999999999998e-220 or -2.5e-265 < y < 3.29999999999999991e171

    1. Initial program 94.0%

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

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

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

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

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

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

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

    if -1.99999999999999998e-220 < y < -2.5e-265

    1. Initial program 99.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.72 \cdot 10^{+67}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-101}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq -2 \cdot 10^{-220}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq -2.5 \cdot 10^{-265}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{1 + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;y \leq 3.3 \cdot 10^{+171}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 53.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\ t_2 := x + y \cdot \frac{z}{t}\\ t_3 := \frac{t_2}{a}\\ \mathbf{if}\;a \leq -1.35 \cdot 10^{+41}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-12}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-134}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-54}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-11}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+158}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;t_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ t (/ y x))) b))
        (t_2 (+ x (* y (/ z t))))
        (t_3 (/ t_2 a)))
   (if (<= a -1.35e+41)
     t_3
     (if (<= a -3.1e-12)
       t_1
       (if (<= a 2.6e-134)
         (+ x (* z (/ y t)))
         (if (<= a 5.4e-54)
           t_1
           (if (<= a 2e-11) t_2 (if (<= a 2.8e+158) t_1 t_3))))))))
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 + (y * (z / t));
	double t_3 = t_2 / a;
	double tmp;
	if (a <= -1.35e+41) {
		tmp = t_3;
	} else if (a <= -3.1e-12) {
		tmp = t_1;
	} else if (a <= 2.6e-134) {
		tmp = x + (z * (y / t));
	} else if (a <= 5.4e-54) {
		tmp = t_1;
	} else if (a <= 2e-11) {
		tmp = t_2;
	} else if (a <= 2.8e+158) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	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 + (y * (z / t))
    t_3 = t_2 / a
    if (a <= (-1.35d+41)) then
        tmp = t_3
    else if (a <= (-3.1d-12)) then
        tmp = t_1
    else if (a <= 2.6d-134) then
        tmp = x + (z * (y / t))
    else if (a <= 5.4d-54) then
        tmp = t_1
    else if (a <= 2d-11) then
        tmp = t_2
    else if (a <= 2.8d+158) then
        tmp = t_1
    else
        tmp = t_3
    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 + (y * (z / t));
	double t_3 = t_2 / a;
	double tmp;
	if (a <= -1.35e+41) {
		tmp = t_3;
	} else if (a <= -3.1e-12) {
		tmp = t_1;
	} else if (a <= 2.6e-134) {
		tmp = x + (z * (y / t));
	} else if (a <= 5.4e-54) {
		tmp = t_1;
	} else if (a <= 2e-11) {
		tmp = t_2;
	} else if (a <= 2.8e+158) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t / (y / x))) / b
	t_2 = x + (y * (z / t))
	t_3 = t_2 / a
	tmp = 0
	if a <= -1.35e+41:
		tmp = t_3
	elif a <= -3.1e-12:
		tmp = t_1
	elif a <= 2.6e-134:
		tmp = x + (z * (y / t))
	elif a <= 5.4e-54:
		tmp = t_1
	elif a <= 2e-11:
		tmp = t_2
	elif a <= 2.8e+158:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(z + Float64(t / Float64(y / x))) / b)
	t_2 = Float64(x + Float64(y * Float64(z / t)))
	t_3 = Float64(t_2 / a)
	tmp = 0.0
	if (a <= -1.35e+41)
		tmp = t_3;
	elseif (a <= -3.1e-12)
		tmp = t_1;
	elseif (a <= 2.6e-134)
		tmp = Float64(x + Float64(z * Float64(y / t)));
	elseif (a <= 5.4e-54)
		tmp = t_1;
	elseif (a <= 2e-11)
		tmp = t_2;
	elseif (a <= 2.8e+158)
		tmp = t_1;
	else
		tmp = t_3;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (z + (t / (y / x))) / b;
	t_2 = x + (y * (z / t));
	t_3 = t_2 / a;
	tmp = 0.0;
	if (a <= -1.35e+41)
		tmp = t_3;
	elseif (a <= -3.1e-12)
		tmp = t_1;
	elseif (a <= 2.6e-134)
		tmp = x + (z * (y / t));
	elseif (a <= 5.4e-54)
		tmp = t_1;
	elseif (a <= 2e-11)
		tmp = t_2;
	elseif (a <= 2.8e+158)
		tmp = t_1;
	else
		tmp = t_3;
	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[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t$95$2 / a), $MachinePrecision]}, If[LessEqual[a, -1.35e+41], t$95$3, If[LessEqual[a, -3.1e-12], t$95$1, If[LessEqual[a, 2.6e-134], N[(x + N[(z * N[(y / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 5.4e-54], t$95$1, If[LessEqual[a, 2e-11], t$95$2, If[LessEqual[a, 2.8e+158], t$95$1, t$95$3]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.1 \cdot 10^{-12}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 5.4 \cdot 10^{-54}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;a \leq 2 \cdot 10^{-11}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;a \leq 2.8 \cdot 10^{+158}:\\
\;\;\;\;t_1\\

\mathbf{else}:\\
\;\;\;\;t_3\\


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if a < -1.35e41 or 2.80000000000000001e158 < a

    1. Initial program 79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{a} \]
    10. Simplified79.3%

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

    if -1.35e41 < a < -3.1000000000000001e-12 or 2.60000000000000023e-134 < a < 5.40000000000000051e-54 or 1.99999999999999988e-11 < a < 2.80000000000000001e158

    1. Initial program 69.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.1000000000000001e-12 < a < 2.60000000000000023e-134

    1. Initial program 79.6%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{1}{\frac{t}{y \cdot z}}}}{1 + \frac{b \cdot y}{t}} \]
    9. Simplified79.5%

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

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

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

        \[\leadsto x + \color{blue}{\frac{y}{t} \cdot z} \]
    12. Simplified65.5%

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

    if 5.40000000000000051e-54 < a < 1.99999999999999988e-11

    1. Initial program 87.1%

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

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

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

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

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

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

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

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

        \[\leadsto x + \color{blue}{y \cdot \frac{z}{t}} \]
    8. Simplified84.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.35 \cdot 10^{+41}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -3.1 \cdot 10^{-12}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;a \leq 2.6 \cdot 10^{-134}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 5.4 \cdot 10^{-54}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-11}:\\ \;\;\;\;x + y \cdot \frac{z}{t}\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{+158}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 55.8% accurate, 0.9× speedup?

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

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

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

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

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

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


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

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{a} \]
    10. Simplified66.8%

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

    if -6800 < a < 1.1e-133

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{1}{\frac{t}{y \cdot z}}}}{1 + \frac{b \cdot y}{t}} \]
    9. Simplified79.0%

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

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

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

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

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

    if 1.1e-133 < a < 5.59999999999999958e-109

    1. Initial program 64.2%

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

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

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

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

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

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

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

    if 5.59999999999999958e-109 < a < 57000

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6800:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-133}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 5.6 \cdot 10^{-109}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 57000:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 55.9% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -6800:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\

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

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

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

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


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

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{a} \]
    10. Simplified72.0%

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

    if -6800 < a < 1.65e-135

    1. Initial program 79.1%

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{1}{\frac{t}{y \cdot z}}}}{1 + \frac{b \cdot y}{t}} \]
    9. Simplified79.0%

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

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

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

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

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

    if 1.65e-135 < a < 3.2000000000000002e-109

    1. Initial program 64.2%

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

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

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

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

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

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

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

    if 3.2000000000000002e-109 < a < 155

    1. Initial program 82.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 155 < a

    1. Initial program 72.2%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -6800:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq 1.65 \cdot 10^{-135}:\\ \;\;\;\;x + z \cdot \frac{y}{t}\\ \mathbf{elif}\;a \leq 3.2 \cdot 10^{-109}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 155:\\ \;\;\;\;\frac{x}{1 + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 67.2% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{if}\;y \leq -3.9 \cdot 10^{+66}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ z (/ t (/ y x))) b)))
   (if (<= y -3.9e+66)
     t_1
     (if (<= y -5.2e-100)
       (/ x (+ 1.0 (+ a (/ (* y b) t))))
       (if (<= y 4.6e+171) (/ (+ x (/ (* y z) t)) (+ a 1.0)) t_1)))))
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 <= -3.9e+66) {
		tmp = t_1;
	} else if (y <= -5.2e-100) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 4.6e+171) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (z + (t / (y / x))) / b
    if (y <= (-3.9d+66)) then
        tmp = t_1
    else if (y <= (-5.2d-100)) then
        tmp = x / (1.0d0 + (a + ((y * b) / t)))
    else if (y <= 4.6d+171) then
        tmp = (x + ((y * z) / t)) / (a + 1.0d0)
    else
        tmp = t_1
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (z + (t / (y / x))) / b;
	double tmp;
	if (y <= -3.9e+66) {
		tmp = t_1;
	} else if (y <= -5.2e-100) {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	} else if (y <= 4.6e+171) {
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	} else {
		tmp = t_1;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (z + (t / (y / x))) / b
	tmp = 0
	if y <= -3.9e+66:
		tmp = t_1
	elif y <= -5.2e-100:
		tmp = x / (1.0 + (a + ((y * b) / t)))
	elif y <= 4.6e+171:
		tmp = (x + ((y * z) / t)) / (a + 1.0)
	else:
		tmp = t_1
	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 <= -3.9e+66)
		tmp = t_1;
	elseif (y <= -5.2e-100)
		tmp = Float64(x / Float64(1.0 + Float64(a + Float64(Float64(y * b) / t))));
	elseif (y <= 4.6e+171)
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	else
		tmp = t_1;
	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 <= -3.9e+66)
		tmp = t_1;
	elseif (y <= -5.2e-100)
		tmp = x / (1.0 + (a + ((y * b) / t)));
	elseif (y <= 4.6e+171)
		tmp = (x + ((y * z) / t)) / (a + 1.0);
	else
		tmp = t_1;
	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, -3.9e+66], t$95$1, If[LessEqual[y, -5.2e-100], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 4.6e+171], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.9000000000000004e66 or 4.60000000000000035e171 < y

    1. Initial program 35.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9000000000000004e66 < y < -5.1999999999999997e-100

    1. Initial program 82.9%

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

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

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

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

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

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

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

    if -5.1999999999999997e-100 < y < 4.60000000000000035e171

    1. Initial program 94.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -3.9 \cdot 10^{+66}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{elif}\;y \leq -5.2 \cdot 10^{-100}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;y \leq 4.6 \cdot 10^{+171}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 63.5% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.40000000000000008e68 or 2.1e180 < y

    1. Initial program 33.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.40000000000000008e68 < y < 2.1e180

    1. Initial program 92.9%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.4 \cdot 10^{+68} \lor \neg \left(y \leq 2.1 \cdot 10^{+180}\right):\\ \;\;\;\;\frac{z + \frac{t}{\frac{y}{x}}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 41.3% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-12}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-134}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-9}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.59999999999999971e-12 or 2.40000000000000002e67 < a

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

    if -8.59999999999999971e-12 < a < 1.30000000000000011e-134 or 2.2499999999999999e-54 < a < 1.0500000000000001e-9

    1. Initial program 80.1%

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

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

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

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

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

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

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

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

    if 1.30000000000000011e-134 < a < 2.2499999999999999e-54 or 1.0500000000000001e-9 < a < 2.40000000000000002e67

    1. Initial program 72.5%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-12}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-134}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.25 \cdot 10^{-54}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-9}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.4 \cdot 10^{+67}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.9% accurate, 1.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+52} \lor \neg \left(y \leq 7.5 \cdot 10^{+171}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -8.9999999999999999e52 or 7.4999999999999998e171 < y

    1. Initial program 37.3%

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

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

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

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

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

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

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

    if -8.9999999999999999e52 < y < 7.4999999999999998e171

    1. Initial program 92.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -9 \cdot 10^{+52} \lor \neg \left(y \leq 7.5 \cdot 10^{+171}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 14: 41.1% accurate, 2.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -8.6 \cdot 10^{-12} \lor \neg \left(a \leq 1\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 76.0%

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

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

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

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

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

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

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

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

    if -8.59999999999999971e-12 < a < 1

    1. Initial program 78.8%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -8.6 \cdot 10^{-12} \lor \neg \left(a \leq 1\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 19.4% accurate, 33.0× speedup?

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

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  7. Final simplification25.0%

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 78.8% accurate, 0.6× 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 2024011 
(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))))