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

Percentage Accurate: 74.8% → 89.5%
Time: 17.7s
Alternatives: 18
Speedup: 0.7×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 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.8% accurate, 1.0× speedup?

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

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

Alternative 1: 89.5% accurate, 0.1× 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 := \mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1\\ \mathbf{if}\;t_1 \leq -1 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t_2}, \frac{x}{t_2}\right)\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;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 (+ (fma y (/ b t) a) 1.0)))
   (if (<= t_1 -1e+156)
     (fma (/ y t) (/ z t_2) (/ x t_2))
     (if (<= t_1 -5e-271)
       t_1
       (if (<= t_1 -2e-307)
         (/ (+ x (* y (/ z t))) (+ a 1.0))
         (if (<= t_1 0.0)
           (+
            (/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
            (/ z b))
           (if (<= t_1 5e+304) 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 = fma(y, (b / t), a) + 1.0;
	double tmp;
	if (t_1 <= -1e+156) {
		tmp = fma((y / t), (z / t_2), (x / t_2));
	} else if (t_1 <= -5e-271) {
		tmp = t_1;
	} else if (t_1 <= -2e-307) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (t_1 <= 0.0) {
		tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / pow(b, 2.0))) / y) + (z / b);
	} else if (t_1 <= 5e+304) {
		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(fma(y, Float64(b / t), a) + 1.0)
	tmp = 0.0
	if (t_1 <= -1e+156)
		tmp = fma(Float64(y / t), Float64(z / t_2), Float64(x / t_2));
	elseif (t_1 <= -5e-271)
		tmp = t_1;
	elseif (t_1 <= -2e-307)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(x * t) / b) + Float64(Float64(t * Float64(z * Float64(-1.0 - a))) / (b ^ 2.0))) / y) + Float64(z / b));
	elseif (t_1 <= 5e+304)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return 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[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+156], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$2), $MachinePrecision] + N[(x / t$95$2), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] + N[(N[(t * N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+304], 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 := \mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1\\
\mathbf{if}\;t_1 \leq -1 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t_2}, \frac{x}{t_2}\right)\\

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\

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


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

    1. Initial program 77.4%

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{a + \left(1 + \frac{b}{t} \cdot y\right)}} \]
    4. Taylor expanded in x around 0 81.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)}} \]
    5. Step-by-step derivation
      1. +-commutative81.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-frac99.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-def99.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/95.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999998e155 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.1%

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

    if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
    6. Applied egg-rr99.7%

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

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

    1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

    1. Initial program 7.3%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -1 \cdot 10^{+156}:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}, \frac{x}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}\right)\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -5 \cdot 10^{-271}:\\ \;\;\;\;\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 -2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0:\\ \;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 5 \cdot 10^{+304}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 2: 89.8% accurate, 0.1× 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{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t_1 \leq 0:\\ \;\;\;\;\frac{\frac{x \cdot t}{b} + \frac{t \cdot \left(z \cdot \left(-1 - a\right)\right)}{{b}^{2}}}{y} + \frac{z}{b}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;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))
     (/ z (* t (/ (+ a (fma y (/ b t) 1.0)) y)))
     (if (<= t_1 -5e-271)
       t_1
       (if (<= t_1 -2e-307)
         (/ (+ x (* y (/ z t))) (+ a 1.0))
         (if (<= t_1 0.0)
           (+
            (/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
            (/ z b))
           (if (<= t_1 5e+304) 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 = z / (t * ((a + fma(y, (b / t), 1.0)) / y));
	} else if (t_1 <= -5e-271) {
		tmp = t_1;
	} else if (t_1 <= -2e-307) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if (t_1 <= 0.0) {
		tmp = ((((x * t) / b) + ((t * (z * (-1.0 - a))) / pow(b, 2.0))) / y) + (z / b);
	} else if (t_1 <= 5e+304) {
		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(z / Float64(t * Float64(Float64(a + fma(y, Float64(b / t), 1.0)) / y)));
	elseif (t_1 <= -5e-271)
		tmp = t_1;
	elseif (t_1 <= -2e-307)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(Float64(Float64(x * t) / b) + Float64(Float64(t * Float64(z * Float64(-1.0 - a))) / (b ^ 2.0))) / y) + Float64(z / b));
	elseif (t_1 <= 5e+304)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return 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[(z / N[(t * N[(N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 0.0], N[(N[(N[(N[(N[(x * t), $MachinePrecision] / b), $MachinePrecision] + N[(N[(t * N[(z * N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision] + N[(z / b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+304], 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{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\

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

\mathbf{elif}\;t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 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 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \frac{y}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
    7. Step-by-step derivation
      1. *-commutative81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.2%

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

    if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
    6. Applied egg-rr99.7%

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

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

    1. Initial program 52.3%

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

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

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

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

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

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

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

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

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

    1. Initial program 7.3%

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

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

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

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

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

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

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

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

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

Alternative 3: 88.2% accurate, 0.1× 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{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-271}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+304}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;t_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 (- INFINITY))
     (/ z (* t (/ (+ a (fma y (/ b t) 1.0)) y)))
     (if (<= t_1 -5e-271)
       t_1
       (if (<= t_1 -2e-307)
         (/ (+ x (* y (/ z t))) (+ a 1.0))
         (if (or (<= t_1 0.0) (not (<= t_1 5e+304))) (/ z b) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z / (t * ((a + fma(y, (b / t), 1.0)) / y));
	} else if (t_1 <= -5e-271) {
		tmp = t_1;
	} else if (t_1 <= -2e-307) {
		tmp = (x + (y * (z / t))) / (a + 1.0);
	} else if ((t_1 <= 0.0) || !(t_1 <= 5e+304)) {
		tmp = z / b;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z / Float64(t * Float64(Float64(a + fma(y, Float64(b / t), 1.0)) / y)));
	elseif (t_1 <= -5e-271)
		tmp = t_1;
	elseif (t_1 <= -2e-307)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(a + 1.0));
	elseif ((t_1 <= 0.0) || !(t_1 <= 5e+304))
		tmp = Float64(z / b);
	else
		tmp = t_1;
	end
	return 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[(z / N[(t * N[(N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-271], t$95$1, If[LessEqual[t$95$1, -2e-307], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[Or[LessEqual[t$95$1, 0.0], N[Not[LessEqual[t$95$1, 5e+304]], $MachinePrecision]], N[(z / b), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t_1 \leq -2 \cdot 10^{-307}:\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\

\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\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 52.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{t} \cdot \frac{y}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
    7. Step-by-step derivation
      1. *-commutative81.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -5.0000000000000002e-271 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 99.2%

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

    if -5.0000000000000002e-271 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307

    1. Initial program 84.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
    6. Applied egg-rr99.7%

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

    if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 31.9%

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{z}{b}} \]
  3. Recombined 4 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 -\infty:\\ \;\;\;\;\frac{z}{t \cdot \frac{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}{y}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -5 \cdot 10^{-271}:\\ \;\;\;\;\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 -2 \cdot 10^{-307}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0 \lor \neg \left(\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 5 \cdot 10^{+304}\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \end{array} \]

Alternative 4: 85.0% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t_1 \leq -2 \cdot 10^{-307} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 5 \cdot 10^{+304}:\\ \;\;\;\;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 (or (<= t_1 -2e-307) (and (not (<= t_1 0.0)) (<= t_1 5e+304)))
     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 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304))) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + ((y * z) / t)) / ((a + 1.0d0) + ((y * b) / t))
    if ((t_1 <= (-2d-307)) .or. (.not. (t_1 <= 0.0d0)) .and. (t_1 <= 5d+304)) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if ((t_1 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304))) {
		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 <= -2e-307) or (not (t_1 <= 0.0) and (t_1 <= 5e+304)):
		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 <= -2e-307) || (!(t_1 <= 0.0) && (t_1 <= 5e+304)))
		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 <= -2e-307) || (~((t_1 <= 0.0)) && (t_1 <= 5e+304)))
		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[Or[LessEqual[t$95$1, -2e-307], And[N[Not[LessEqual[t$95$1, 0.0]], $MachinePrecision], LessEqual[t$95$1, 5e+304]]], 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 -2 \cdot 10^{-307} \lor \neg \left(t_1 \leq 0\right) \land t_1 \leq 5 \cdot 10^{+304}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -1.99999999999999982e-307 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 4.9999999999999997e304

    1. Initial program 96.1%

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

    if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 31.9%

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

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

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

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

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

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

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

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

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

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

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

\mathbf{elif}\;t_1 \leq 0 \lor \neg \left(t_1 \leq 5 \cdot 10^{+304}\right):\\
\;\;\;\;\frac{z}{b}\\

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


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

    1. Initial program 93.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.99999999999999982e-307 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -0.0 or 4.9999999999999997e304 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t)))

    1. Initial program 31.9%

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

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

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

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

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

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

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

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

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

    1. Initial program 98.8%

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

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

Alternative 6: 51.1% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\frac{y \cdot b}{t} + 1}\\ t_2 := \frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{if}\;y \leq -31000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-20}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-82}:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq -7.7 \cdot 10^{-144}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 880:\\ \;\;\;\;t_2\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\ \;\;\;\;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 b) t) 1.0))) (t_2 (* (/ y t) (/ z (+ a 1.0)))))
   (if (<= y -31000.0)
     (/ z b)
     (if (<= y -3.7e-20)
       t_1
       (if (<= y -3.6e-82)
         t_2
         (if (<= y -7.7e-144)
           t_1
           (if (<= y 2.75e-38)
             (/ x (+ a 1.0))
             (if (<= y 880.0) t_2 (if (<= y 5.8e+148) t_1 (/ z b))))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (((y * b) / t) + 1.0);
	double t_2 = (y / t) * (z / (a + 1.0));
	double tmp;
	if (y <= -31000.0) {
		tmp = z / b;
	} else if (y <= -3.7e-20) {
		tmp = t_1;
	} else if (y <= -3.6e-82) {
		tmp = t_2;
	} else if (y <= -7.7e-144) {
		tmp = t_1;
	} else if (y <= 2.75e-38) {
		tmp = x / (a + 1.0);
	} else if (y <= 880.0) {
		tmp = t_2;
	} else if (y <= 5.8e+148) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = x / (((y * b) / t) + 1.0d0)
    t_2 = (y / t) * (z / (a + 1.0d0))
    if (y <= (-31000.0d0)) then
        tmp = z / b
    else if (y <= (-3.7d-20)) then
        tmp = t_1
    else if (y <= (-3.6d-82)) then
        tmp = t_2
    else if (y <= (-7.7d-144)) then
        tmp = t_1
    else if (y <= 2.75d-38) then
        tmp = x / (a + 1.0d0)
    else if (y <= 880.0d0) then
        tmp = t_2
    else if (y <= 5.8d+148) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (((y * b) / t) + 1.0);
	double t_2 = (y / t) * (z / (a + 1.0));
	double tmp;
	if (y <= -31000.0) {
		tmp = z / b;
	} else if (y <= -3.7e-20) {
		tmp = t_1;
	} else if (y <= -3.6e-82) {
		tmp = t_2;
	} else if (y <= -7.7e-144) {
		tmp = t_1;
	} else if (y <= 2.75e-38) {
		tmp = x / (a + 1.0);
	} else if (y <= 880.0) {
		tmp = t_2;
	} else if (y <= 5.8e+148) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (((y * b) / t) + 1.0)
	t_2 = (y / t) * (z / (a + 1.0))
	tmp = 0
	if y <= -31000.0:
		tmp = z / b
	elif y <= -3.7e-20:
		tmp = t_1
	elif y <= -3.6e-82:
		tmp = t_2
	elif y <= -7.7e-144:
		tmp = t_1
	elif y <= 2.75e-38:
		tmp = x / (a + 1.0)
	elif y <= 880.0:
		tmp = t_2
	elif y <= 5.8e+148:
		tmp = t_1
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(Float64(Float64(y * b) / t) + 1.0))
	t_2 = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)))
	tmp = 0.0
	if (y <= -31000.0)
		tmp = Float64(z / b);
	elseif (y <= -3.7e-20)
		tmp = t_1;
	elseif (y <= -3.6e-82)
		tmp = t_2;
	elseif (y <= -7.7e-144)
		tmp = t_1;
	elseif (y <= 2.75e-38)
		tmp = Float64(x / Float64(a + 1.0));
	elseif (y <= 880.0)
		tmp = t_2;
	elseif (y <= 5.8e+148)
		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 * b) / t) + 1.0);
	t_2 = (y / t) * (z / (a + 1.0));
	tmp = 0.0;
	if (y <= -31000.0)
		tmp = z / b;
	elseif (y <= -3.7e-20)
		tmp = t_1;
	elseif (y <= -3.6e-82)
		tmp = t_2;
	elseif (y <= -7.7e-144)
		tmp = t_1;
	elseif (y <= 2.75e-38)
		tmp = x / (a + 1.0);
	elseif (y <= 880.0)
		tmp = t_2;
	elseif (y <= 5.8e+148)
		tmp = t_1;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -31000.0], N[(z / b), $MachinePrecision], If[LessEqual[y, -3.7e-20], t$95$1, If[LessEqual[y, -3.6e-82], t$95$2, If[LessEqual[y, -7.7e-144], t$95$1, If[LessEqual[y, 2.75e-38], N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 880.0], t$95$2, If[LessEqual[y, 5.8e+148], t$95$1, N[(z / b), $MachinePrecision]]]]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;y \leq -3.7 \cdot 10^{-20}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq -3.6 \cdot 10^{-82}:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq -7.7 \cdot 10^{-144}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 2.75 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{a + 1}\\

\mathbf{elif}\;y \leq 880:\\
\;\;\;\;t_2\\

\mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -31000 or 5.7999999999999999e148 < y

    1. Initial program 46.3%

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

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

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

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

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

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

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

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

    if -31000 < y < -3.7000000000000001e-20 or -3.59999999999999998e-82 < y < -7.70000000000000007e-144 or 880 < y < 5.7999999999999999e148

    1. Initial program 91.5%

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

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

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

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

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

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

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

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

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

    if -3.7000000000000001e-20 < y < -3.59999999999999998e-82 or 2.75000000000000003e-38 < y < 880

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.70000000000000007e-144 < y < 2.75000000000000003e-38

    1. Initial program 95.8%

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

        \[\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. associate-+l+89.7%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -31000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq -3.7 \cdot 10^{-20}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\ \mathbf{elif}\;y \leq -3.6 \cdot 10^{-82}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq -7.7 \cdot 10^{-144}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\ \mathbf{elif}\;y \leq 2.75 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 880:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\ \;\;\;\;\frac{x}{\frac{y \cdot b}{t} + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 7: 78.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.9 \cdot 10^{+107} \lor \neg \left(y \leq 5.2 \cdot 10^{+121}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.0000000000000004e238

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.0000000000000004e238 < y < -2.89999999999999988e107 or 5.1999999999999998e121 < y

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

    if -2.89999999999999988e107 < y < 5.1999999999999998e121

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 8: 78.9% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;y \leq -2.3 \cdot 10^{+108} \lor \neg \left(y \leq 9 \cdot 10^{+120}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -8.0000000000000004e238

    1. Initial program 65.9%

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

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

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

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

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

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

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

    if -8.0000000000000004e238 < y < -2.2999999999999999e108 or 8.99999999999999953e120 < y

    1. Initial program 40.3%

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

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

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

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

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

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

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

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

    if -2.2999999999999999e108 < y < 8.99999999999999953e120

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 64.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{if}\;y \leq -7.8 \cdot 10^{+238}:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+78}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-241}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+76}:\\ \;\;\;\;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))))
   (if (<= y -7.8e+238)
     (* (/ z t) (/ y (+ (+ a (* y (/ b t))) 1.0)))
     (if (<= y -9.2e+78)
       (/ z b)
       (if (<= y 6.2e-241)
         t_1
         (if (<= y 6.2e-33)
           (/ x (+ (+ a (/ (* y b) t)) 1.0))
           (if (<= y 6.5e+76) 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);
	double tmp;
	if (y <= -7.8e+238) {
		tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
	} else if (y <= -9.2e+78) {
		tmp = z / b;
	} else if (y <= 6.2e-241) {
		tmp = t_1;
	} else if (y <= 6.2e-33) {
		tmp = x / ((a + ((y * b) / t)) + 1.0);
	} else if (y <= 6.5e+76) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + ((y * z) / t)) / (a + 1.0d0)
    if (y <= (-7.8d+238)) then
        tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0d0))
    else if (y <= (-9.2d+78)) then
        tmp = z / b
    else if (y <= 6.2d-241) then
        tmp = t_1
    else if (y <= 6.2d-33) then
        tmp = x / ((a + ((y * b) / t)) + 1.0d0)
    else if (y <= 6.5d+76) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (a + 1.0);
	double tmp;
	if (y <= -7.8e+238) {
		tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
	} else if (y <= -9.2e+78) {
		tmp = z / b;
	} else if (y <= 6.2e-241) {
		tmp = t_1;
	} else if (y <= 6.2e-33) {
		tmp = x / ((a + ((y * b) / t)) + 1.0);
	} else if (y <= 6.5e+76) {
		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)
	tmp = 0
	if y <= -7.8e+238:
		tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0))
	elif y <= -9.2e+78:
		tmp = z / b
	elif y <= 6.2e-241:
		tmp = t_1
	elif y <= 6.2e-33:
		tmp = x / ((a + ((y * b) / t)) + 1.0)
	elif y <= 6.5e+76:
		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(a + 1.0))
	tmp = 0.0
	if (y <= -7.8e+238)
		tmp = Float64(Float64(z / t) * Float64(y / Float64(Float64(a + Float64(y * Float64(b / t))) + 1.0)));
	elseif (y <= -9.2e+78)
		tmp = Float64(z / b);
	elseif (y <= 6.2e-241)
		tmp = t_1;
	elseif (y <= 6.2e-33)
		tmp = Float64(x / Float64(Float64(a + Float64(Float64(y * b) / t)) + 1.0));
	elseif (y <= 6.5e+76)
		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);
	tmp = 0.0;
	if (y <= -7.8e+238)
		tmp = (z / t) * (y / ((a + (y * (b / t))) + 1.0));
	elseif (y <= -9.2e+78)
		tmp = z / b;
	elseif (y <= 6.2e-241)
		tmp = t_1;
	elseif (y <= 6.2e-33)
		tmp = x / ((a + ((y * b) / t)) + 1.0);
	elseif (y <= 6.5e+76)
		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[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[y, -7.8e+238], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(a + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, -9.2e+78], N[(z / b), $MachinePrecision], If[LessEqual[y, 6.2e-241], t$95$1, If[LessEqual[y, 6.2e-33], N[(x / N[(N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[y, 6.5e+76], t$95$1, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;y \leq 6.2 \cdot 10^{-241}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;y \leq 6.5 \cdot 10^{+76}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -7.79999999999999986e238

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -7.79999999999999986e238 < y < -9.2000000000000008e78 or 6.5000000000000005e76 < y

    1. Initial program 42.3%

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

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

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

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

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

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

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

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

    if -9.2000000000000008e78 < y < 6.1999999999999998e-241 or 6.19999999999999994e-33 < y < 6.5000000000000005e76

    1. Initial program 92.6%

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

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

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

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

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

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

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

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

    if 6.1999999999999998e-241 < y < 6.19999999999999994e-33

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -7.8 \cdot 10^{+238}:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{\left(a + y \cdot \frac{b}{t}\right) + 1}\\ \mathbf{elif}\;y \leq -9.2 \cdot 10^{+78}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-241}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 6.2 \cdot 10^{-33}:\\ \;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{+76}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 10: 60.6% accurate, 0.9× speedup?

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

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

\mathbf{elif}\;y \leq 1.4 \cdot 10^{-32}:\\
\;\;\;\;t_1\\

\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

\mathbf{elif}\;y \leq 4.5 \cdot 10^{+115}:\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.4999999999999999e102 or 4.49999999999999963e115 < y

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

    if -1.4999999999999999e102 < y < 1.3999999999999999e-32 or 0.00250000000000000005 < y < 4.49999999999999963e115

    1. Initial program 90.8%

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

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

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

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

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

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

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

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

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

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

    if 1.3999999999999999e-32 < y < 0.00250000000000000005

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.5 \cdot 10^{+102}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.4 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{\left(a + b \cdot \frac{y}{t}\right) + 1}\\ \mathbf{elif}\;y \leq 0.0025:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 4.5 \cdot 10^{+115}:\\ \;\;\;\;\frac{x}{\left(a + b \cdot \frac{y}{t}\right) + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 11: 60.4% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.29999999999999997e95 or 6.19999999999999973e118 < y

    1. Initial program 43.9%

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

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

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

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

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

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

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

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

    if -2.29999999999999997e95 < y < 1.84999999999999994e-34

    1. Initial program 91.7%

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

        \[\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. associate-+l+87.8%

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

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

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

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

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

    if 1.84999999999999994e-34 < y < 0.00250000000000000005

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00250000000000000005 < y < 6.19999999999999973e118

    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/82.6%

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

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

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

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

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

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

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

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

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

Alternative 12: 60.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 0.0025:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -2.4499999999999999e94 or 5.7999999999999999e148 < y

    1. Initial program 40.6%

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

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

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

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

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

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

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

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

    if -2.4499999999999999e94 < y < 1.85e-32

    1. Initial program 91.7%

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

        \[\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. associate-+l+87.8%

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

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

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

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

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

    if 1.85e-32 < y < 0.00250000000000000005

    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 0.00250000000000000005 < y < 5.7999999999999999e148

    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/82.7%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.45 \cdot 10^{+94}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 1.85 \cdot 10^{-32}:\\ \;\;\;\;\frac{x}{\left(a + \frac{y \cdot b}{t}\right) + 1}\\ \mathbf{elif}\;y \leq 0.0025:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 5.8 \cdot 10^{+148}:\\ \;\;\;\;\frac{x}{a + \left(y \cdot \frac{b}{t} + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 13: 54.1% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -82000:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;y \leq 2.45 \cdot 10^{-38}:\\
\;\;\;\;\frac{x}{a + 1}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -82000 or 3.10000000000000011e76 < y

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

    if -82000 < y < 2.45000000000000019e-38

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

    if 2.45000000000000019e-38 < y < 8.5e17

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 8.5e17 < y < 3.10000000000000011e76

    1. Initial program 89.1%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -82000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 2.45 \cdot 10^{-38}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 8.5 \cdot 10^{+17}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 14: 61.7% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 80.6%

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

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

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

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

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

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

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

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

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

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

    if -9.2000000000000001e107 < b < 1.90000000000000008e24

    1. Initial program 83.4%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{z}{t} \cdot y}}{1 + a} \]
    6. Applied egg-rr74.7%

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

    if 1.90000000000000008e24 < b

    1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

Alternative 15: 54.2% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -390000:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;y \leq 8.2 \cdot 10^{-22}:\\
\;\;\;\;\frac{x}{a + 1}\\

\mathbf{elif}\;y \leq 2.85 \cdot 10^{+76}:\\
\;\;\;\;x + \frac{y \cdot z}{t}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if y < -3.9e5 or 3.10000000000000011e76 < y

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

    if -3.9e5 < y < 8.1999999999999999e-22

    1. Initial program 95.5%

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

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

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

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

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

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

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

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

    if 8.1999999999999999e-22 < y < 2.85000000000000002e76

    1. Initial program 93.7%

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

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

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

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

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

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

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

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

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

    if 2.85000000000000002e76 < y < 3.10000000000000011e76

    1. Initial program 100.0%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -390000:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;y \leq 8.2 \cdot 10^{-22}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;y \leq 2.85 \cdot 10^{+76}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;y \leq 3.1 \cdot 10^{+76}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 16: 55.4% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -185000 \lor \neg \left(y \leq 3.1 \cdot 10^{+76}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -185000 or 3.10000000000000011e76 < y

    1. Initial program 49.6%

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

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

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

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

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

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

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

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

    if -185000 < y < 3.10000000000000011e76

    1. Initial program 95.4%

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

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

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

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

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

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

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

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

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

Alternative 17: 42.2% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -3.6 \cdot 10^{+138} \lor \neg \left(a \leq 1.4 \cdot 10^{+131}\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    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/79.9%

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

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

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

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

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

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

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

    if -3.6000000000000001e138 < a < 1.4e131

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

Alternative 18: 25.9% accurate, 5.7× speedup?

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

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

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

      \[\leadsto \frac{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. associate-+l+76.4%

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

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

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

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

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

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

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

Developer target: 79.4% accurate, 0.7× speedup?

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

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

\mathbf{elif}\;t < 3.036967103737246 \cdot 10^{-130}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2023320 
(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))))