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

Percentage Accurate: 75.3% → 89.8%
Time: 13.8s
Alternatives: 16
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 16 alternatives:

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

Initial Program: 75.3% 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.8% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t\_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 2 \cdot 10^{+298}:\\ \;\;\;\;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)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 (- INFINITY))
     (* (/ z t) (/ y (+ (fma y (/ b t) a) 1.0)))
     (if (<= t_1 -2e-322)
       t_1
       (if (<= t_1 0.0)
         (+
          (/ (+ (/ (* x t) b) (/ (* t (* z (- -1.0 a))) (pow b 2.0))) y)
          (/ z b))
         (if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (z / t) * (y / (fma(y, (b / t), a) + 1.0));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} 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 <= 2e+298) {
		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(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(z / t) * Float64(y / Float64(fma(y, Float64(b / t), a) + 1.0)));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	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 <= 2e+298)
		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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, 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, 2e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_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 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298

    1. Initial program 99.1%

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

    if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 40.7%

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

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

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

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

      \[\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 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 3.8%

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

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

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

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

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

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

Alternative 2: 91.4% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{z}{t} \cdot \frac{y}{\mathsf{fma}\left(y, \frac{b}{t}, a\right) + 1}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;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)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 (- INFINITY))
     (* (/ z t) (/ y (+ (fma y (/ b t) a) 1.0)))
     (if (<= t_1 -2e-322)
       t_1
       (if (<= t_1 0.0)
         (/ (+ (* t (/ x b)) (* y (/ z b))) y)
         (if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (z / t) * (y / (fma(y, (b / t), a) + 1.0));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 2e+298) {
		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(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(z / t) * Float64(y / Float64(fma(y, Float64(b / t), a) + 1.0)));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y);
	elseif (t_1 <= 2e+298)
		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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(z / t), $MachinePrecision] * N[(y / N[(N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298

    1. Initial program 99.1%

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

    if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 40.7%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{b \cdot y} \]
      3. +-commutative57.7%

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine57.7%

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

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

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

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

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

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

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

    if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 3.8%

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

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

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

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

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

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

Alternative 3: 92.3% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ t_2 := \left(a + \frac{y}{\frac{t}{b}}\right) + 1\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;z \cdot \left(\frac{\frac{x}{z}}{t\_2} + \frac{y}{t \cdot t\_2}\right)\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;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)) (+ (/ (* y b) t) (+ a 1.0))))
        (t_2 (+ (+ a (/ y (/ t b))) 1.0)))
   (if (<= t_1 (- INFINITY))
     (* z (+ (/ (/ x z) t_2) (/ y (* t t_2))))
     (if (<= t_1 -2e-322)
       t_1
       (if (<= t_1 0.0)
         (/ (+ (* t (/ x b)) (* y (/ z b))) y)
         (if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
	double t_2 = (a + (y / (t / b))) + 1.0;
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = z * (((x / z) / t_2) + (y / (t * t_2)));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 2e+298) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double t_2 = (a + (y / (t / b))) + 1.0;
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = z * (((x / z) / t_2) + (y / (t * t_2)));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 2e+298) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))
	t_2 = (a + (y / (t / b))) + 1.0
	tmp = 0
	if t_1 <= -math.inf:
		tmp = z * (((x / z) / t_2) + (y / (t * t_2)))
	elif t_1 <= -2e-322:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((t * (x / b)) + (y * (z / b))) / y
	elif t_1 <= 2e+298:
		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(Float64(y * b) / t) + Float64(a + 1.0)))
	t_2 = Float64(Float64(a + Float64(y / Float64(t / b))) + 1.0)
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(z * Float64(Float64(Float64(x / z) / t_2) + Float64(y / Float64(t * t_2))));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y);
	elseif (t_1 <= 2e+298)
		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)) / (((y * b) / t) + (a + 1.0));
	t_2 = (a + (y / (t / b))) + 1.0;
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = z * (((x / z) / t_2) + (y / (t * t_2)));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	elseif (t_1 <= 2e+298)
		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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a + N[(y / N[(t / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + 1.0), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(z * N[(N[(N[(x / z), $MachinePrecision] / t$95$2), $MachinePrecision] + N[(y / N[(t * t$95$2), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298

    1. Initial program 99.1%

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

    if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 40.7%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{b \cdot y} \]
      3. +-commutative57.7%

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine57.7%

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

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

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

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

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

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

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

    if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 3.8%

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

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

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

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

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

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

Alternative 4: 90.2% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;\frac{x}{a + 1} - y \cdot \frac{\frac{z}{t}}{-1 - a}\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{t \cdot \frac{x}{b} + y \cdot \frac{z}{b}}{y}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\ \;\;\;\;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)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 (- INFINITY))
     (- (/ x (+ a 1.0)) (* y (/ (/ z t) (- -1.0 a))))
     (if (<= t_1 -2e-322)
       t_1
       (if (<= t_1 0.0)
         (/ (+ (* t (/ x b)) (* y (/ z b))) y)
         (if (<= t_1 2e+298) 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)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 2e+298) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= -Double.POSITIVE_INFINITY) {
		tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)));
	} else if (t_1 <= -2e-322) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	} else if (t_1 <= 2e+298) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))
	tmp = 0
	if t_1 <= -math.inf:
		tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)))
	elif t_1 <= -2e-322:
		tmp = t_1
	elif t_1 <= 0.0:
		tmp = ((t * (x / b)) + (y * (z / b))) / y
	elif t_1 <= 2e+298:
		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(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = Float64(Float64(x / Float64(a + 1.0)) - Float64(y * Float64(Float64(z / t) / Float64(-1.0 - a))));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(Float64(t * Float64(x / b)) + Float64(y * Float64(z / b))) / y);
	elseif (t_1 <= 2e+298)
		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)) / (((y * b) / t) + (a + 1.0));
	tmp = 0.0;
	if (t_1 <= -Inf)
		tmp = (x / (a + 1.0)) - (y * ((z / t) / (-1.0 - a)));
	elseif (t_1 <= -2e-322)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = ((t * (x / b)) + (y * (z / b))) / y;
	elseif (t_1 <= 2e+298)
		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[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], N[(N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision] - N[(y * N[(N[(z / t), $MachinePrecision] / N[(-1.0 - a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -2e-322], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(N[(t * N[(x / b), $MachinePrecision]), $MachinePrecision] + N[(y * N[(z / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / y), $MachinePrecision], If[LessEqual[t$95$1, 2e+298], t$95$1, N[(z / b), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-322}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+298}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 29.9%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.97626e-322 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1.9999999999999999e298

    1. Initial program 99.1%

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

    if -1.97626e-322 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 40.7%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{b \cdot y} \]
      3. +-commutative57.7%

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine57.7%

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

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

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

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

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

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

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

    if 1.9999999999999999e298 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 3.8%

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

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

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

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

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

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

Alternative 5: 81.9% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.2 \cdot 10^{-90} \lor \neg \left(t \leq 2.2 \cdot 10^{-148}\right):\\
\;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.2000000000000007e-90 or 2.20000000000000017e-148 < t

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

    if -8.2000000000000007e-90 < t < 2.20000000000000017e-148

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 81.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.14999999999999998e-87 or 2.1499999999999999e-148 < t

    1. Initial program 84.1%

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

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

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

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

    if -2.14999999999999998e-87 < t < 2.1499999999999999e-148

    1. Initial program 48.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.0% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 85.2%

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

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

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

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

    if -9.00000000000000001e-143 < t < 2.20000000000000017e-148

    1. Initial program 41.9%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{b \cdot y} \]
      3. +-commutative33.7%

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine33.7%

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

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

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

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

    if 2.20000000000000017e-148 < t

    1. Initial program 83.8%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -9 \cdot 10^{-143}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{\frac{y \cdot b}{t} + \left(a + 1\right)}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-148}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{\left(a + 1\right) + \frac{y}{\frac{t}{b}}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 8: 69.7% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -2.50000000000000004e-88 or 2.69999999999999999e-42 < t

    1. Initial program 84.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*86.9%

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

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

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

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

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

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

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

    if -2.50000000000000004e-88 < t < 2.69999999999999999e-42

    1. Initial program 58.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*55.5%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine44.5%

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

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

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

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

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

Alternative 9: 65.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.25 \cdot 10^{-88} \lor \neg \left(t \leq 7.5 \cdot 10^{-22}\right):\\
\;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.25000000000000002e-88 or 7.49999999999999978e-22 < t

    1. Initial program 84.3%

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

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

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

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

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

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

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

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

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

    if -1.25000000000000002e-88 < t < 7.49999999999999978e-22

    1. Initial program 58.9%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine43.9%

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

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

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

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

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

Alternative 10: 60.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -8.5 \cdot 10^{+35} \lor \neg \left(t \leq 5 \cdot 10^{-23}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.4999999999999995e35 or 5.0000000000000002e-23 < t

    1. Initial program 84.6%

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

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

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

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

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

    if -8.4999999999999995e35 < t < 5.0000000000000002e-23

    1. Initial program 63.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 69.9% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

    if -9.99999999999999934e-89 < t < 8.50000000000000056e-43

    1. Initial program 58.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*55.5%

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine44.5%

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

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

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

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

    if 8.50000000000000056e-43 < t

    1. Initial program 83.9%

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{y \cdot \frac{z}{t}}}{1 + a} \]
      2. *-commutative72.5%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1 \cdot 10^{-88}:\\ \;\;\;\;\frac{x + z \cdot \frac{y}{t}}{a + 1}\\ \mathbf{elif}\;t \leq 8.5 \cdot 10^{-43}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 65.5% accurate, 0.8× speedup?

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

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

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

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


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

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

    if -1.52e-89 < t < 1.90000000000000006e-23

    1. Initial program 58.9%

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

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

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

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

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

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

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

        \[\leadsto t \cdot \frac{\color{blue}{y \cdot \frac{z}{t} + x}}{b \cdot y} \]
      4. fma-undefine43.9%

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

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

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

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

    if 1.90000000000000006e-23 < t

    1. Initial program 84.3%

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.52 \cdot 10^{-89}:\\ \;\;\;\;\frac{x}{\left(a + \frac{y}{\frac{t}{b}}\right) + 1}\\ \mathbf{elif}\;t \leq 1.9 \cdot 10^{-23}:\\ \;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\left(a + 1\right) + y \cdot \frac{b}{t}}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 55.8% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -4.2 \cdot 10^{-87} \lor \neg \left(t \leq 18500000000\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -4.20000000000000014e-87 or 1.85e10 < t

    1. Initial program 84.1%

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

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

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

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

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

    if -4.20000000000000014e-87 < t < 1.85e10

    1. Initial program 59.7%

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

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

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

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

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

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

Alternative 14: 42.7% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.65 \cdot 10^{+43} \lor \neg \left(t \leq 6.8 \cdot 10^{+65}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.6500000000000001e43 or 6.7999999999999999e65 < t

    1. Initial program 84.4%

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

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

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

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

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

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

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

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

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

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

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

    if -1.6500000000000001e43 < t < 6.7999999999999999e65

    1. Initial program 65.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*62.6%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{+43} \lor \neg \left(t \leq 6.8 \cdot 10^{+65}\right):\\ \;\;\;\;\frac{x}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 41.1% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 69.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*70.1%

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

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

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

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

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

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

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

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

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

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

    if -1 < a < 1

    1. Initial program 77.9%

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 20.5% accurate, 17.0× speedup?

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

\\
x
\end{array}
Derivation
  1. Initial program 73.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*73.8%

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

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  10. Add Preprocessing

Developer Target 1: 78.5% accurate, 0.5× 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 2024148 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :alt
  (! :herbie-platform default (if (< t -1707385670788761/12500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))) (if (< t 1518483551868623/5000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ z b) (* 1 (* (+ x (* (/ y t) z)) (/ 1 (+ (+ a 1) (* (/ y t) b))))))))

  (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))