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

Percentage Accurate: 74.8% → 89.8%
Time: 19.0s
Alternatives: 15
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 74.8% accurate, 1.0× speedup?

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

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

Alternative 1: 89.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)}\\ t_2 := \frac{y}{\frac{t \cdot \mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}{z}}\\ \mathbf{if}\;t_1 \leq -\infty:\\ \;\;\;\;t_2\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-289}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;t_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0))))
        (t_2 (/ y (/ (* t (fma y (/ b t) (+ a 1.0))) z))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -5e-308)
       t_1
       (if (<= t_1 5e-289)
         (/ (* y z) (+ (* y b) (* t (+ a 1.0))))
         (if (<= t_1 5e+262) t_1 (if (<= t_1 INFINITY) t_2 (/ z b))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double t_2 = y / ((t * fma(y, (b / t), (a + 1.0))) / z);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -5e-308) {
		tmp = t_1;
	} else if (t_1 <= 5e-289) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (t_1 <= 5e+262) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	t_2 = Float64(y / Float64(Float64(t * fma(y, Float64(b / t), Float64(a + 1.0))) / z))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -5e-308)
		tmp = t_1;
	elseif (t_1 <= 5e-289)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))));
	elseif (t_1 <= 5e+262)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = t_2;
	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]}, Block[{t$95$2 = N[(y / N[(N[(t * N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -5e-308], t$95$1, If[LessEqual[t$95$1, 5e-289], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], t$95$2, N[(z / b), $MachinePrecision]]]]]]]]
\begin{array}{l}

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

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

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

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

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

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


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

    1. Initial program 46.4%

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

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

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

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

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

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

      \[\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. associate-/l*83.4%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999955e-308 or 5.00000000000000029e-289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262

    1. Initial program 99.7%

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

    if -4.99999999999999955e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e-289

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

Alternative 2: 87.6% 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 -4 \cdot 10^{+299}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t_1 \leq -5 \cdot 10^{-308}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{-289}:\\ \;\;\;\;\frac{y \cdot z}{y \cdot b + t \cdot \left(a + 1\right)}\\ \mathbf{elif}\;t_1 \leq 5 \cdot 10^{+262}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;t_1 \leq \infty:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\ \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 -4e+299)
     (* (/ y t) (/ z (+ a 1.0)))
     (if (<= t_1 -5e-308)
       t_1
       (if (<= t_1 5e-289)
         (/ (* y z) (+ (* y b) (* t (+ a 1.0))))
         (if (<= t_1 5e+262)
           t_1
           (if (<= t_1 INFINITY)
             (* (/ y t) (/ z (+ (+ a 1.0) (/ b (/ t y)))))
             (/ 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 <= -4e+299) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t_1 <= -5e-308) {
		tmp = t_1;
	} else if (t_1 <= 5e-289) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (t_1 <= 5e+262) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))));
	} 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 <= -4e+299) {
		tmp = (y / t) * (z / (a + 1.0));
	} else if (t_1 <= -5e-308) {
		tmp = t_1;
	} else if (t_1 <= 5e-289) {
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	} else if (t_1 <= 5e+262) {
		tmp = t_1;
	} else if (t_1 <= Double.POSITIVE_INFINITY) {
		tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))));
	} 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 <= -4e+299:
		tmp = (y / t) * (z / (a + 1.0))
	elif t_1 <= -5e-308:
		tmp = t_1
	elif t_1 <= 5e-289:
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)))
	elif t_1 <= 5e+262:
		tmp = t_1
	elif t_1 <= math.inf:
		tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))))
	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 <= -4e+299)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(a + 1.0)));
	elseif (t_1 <= -5e-308)
		tmp = t_1;
	elseif (t_1 <= 5e-289)
		tmp = Float64(Float64(y * z) / Float64(Float64(y * b) + Float64(t * Float64(a + 1.0))));
	elseif (t_1 <= 5e+262)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = Float64(Float64(y / t) * Float64(z / Float64(Float64(a + 1.0) + Float64(b / Float64(t / y)))));
	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 <= -4e+299)
		tmp = (y / t) * (z / (a + 1.0));
	elseif (t_1 <= -5e-308)
		tmp = t_1;
	elseif (t_1 <= 5e-289)
		tmp = (y * z) / ((y * b) + (t * (a + 1.0)));
	elseif (t_1 <= 5e+262)
		tmp = t_1;
	elseif (t_1 <= Inf)
		tmp = (y / t) * (z / ((a + 1.0) + (b / (t / y))));
	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, -4e+299], N[(N[(y / t), $MachinePrecision] * N[(z / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-308], t$95$1, If[LessEqual[t$95$1, 5e-289], N[(N[(y * z), $MachinePrecision] / N[(N[(y * b), $MachinePrecision] + N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+262], t$95$1, If[LessEqual[t$95$1, Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / N[(N[(a + 1.0), $MachinePrecision] + N[(b / N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 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 -4 \cdot 10^{+299}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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

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

\mathbf{elif}\;t_1 \leq \infty:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{\left(a + 1\right) + \frac{b}{\frac{t}{y}}}\\

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


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

    1. Initial program 39.6%

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

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

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

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

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

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

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

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

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

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

    if -4.0000000000000002e299 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < -4.99999999999999955e-308 or 5.00000000000000029e-289 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000008e262

    1. Initial program 99.7%

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

    if -4.99999999999999955e-308 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a 1) (/.f64 (*.f64 y b) t))) < 5.00000000000000029e-289

    1. Initial program 61.1%

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

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

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

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

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

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

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

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

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

    1. Initial program 55.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*70.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

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

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

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

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

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

Alternative 3: 53.1% accurate, 0.5× speedup?

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

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

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

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

\mathbf{elif}\;a \leq 1.4 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.2e10 or 3.39999999999999986e69 < a

    1. Initial program 77.8%

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

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

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

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

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

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

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

    if -2.2e10 < a < -9.99999999999999912e-299 or 2e-255 < a < 1.4e-58

    1. Initial program 83.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*84.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
    9. Simplified64.5%

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

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

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

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

    if -9.99999999999999912e-299 < a < 2e-255 or 1.4e-58 < a < 3.39999999999999986e69

    1. Initial program 53.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -22000000000:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -1 \cdot 10^{-298}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 2 \cdot 10^{-255}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.4 \cdot 10^{-58}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 3.4 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 4: 53.3% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;a \leq -8.5 \cdot 10^{-305}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;a \leq 1.85 \cdot 10^{-58}:\\
\;\;\;\;t_1\\

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

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


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

    1. Initial program 76.7%

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

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

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

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

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

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

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

    if -2.2e10 < a < -8.4999999999999997e-305 or 1.3000000000000001e-255 < a < 1.8500000000000001e-58

    1. Initial program 83.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*84.8%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{1 + a} \]
    9. Simplified64.5%

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

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

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

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

    if -8.4999999999999997e-305 < a < 1.3000000000000001e-255 or 1.8500000000000001e-58 < a < 2.2999999999999999e67

    1. Initial program 53.1%

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

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

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

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

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

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

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

    if 2.2999999999999999e67 < a

    1. Initial program 79.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*79.3%

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x + \color{blue}{\frac{y}{\frac{t}{z}}}}{a} \]
    9. Simplified67.9%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -22000000000:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-305}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-255}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.85 \cdot 10^{-58}:\\ \;\;\;\;x + \frac{y}{\frac{t}{z}}\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+67}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y}{\frac{t}{z}}}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 5: 55.3% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -4.8 \cdot 10^{+194}:\\
\;\;\;\;\frac{z}{b}\\

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

\mathbf{elif}\;z \leq -1 \cdot 10^{+116} \lor \neg \left(z \leq 10^{+134}\right):\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -4.8e194

    1. Initial program 62.4%

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

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

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

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

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

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

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

    if -4.8e194 < z < -1.90000000000000012e156

    1. Initial program 80.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.90000000000000012e156 < z < -1.00000000000000002e116 or 9.99999999999999921e133 < z

    1. Initial program 57.8%

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

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

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

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

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

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

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

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

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

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

    if -1.00000000000000002e116 < z < 9.99999999999999921e133

    1. Initial program 84.0%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;z \leq -4.8 \cdot 10^{+194}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;z \leq -1.9 \cdot 10^{+156}:\\ \;\;\;\;x + \frac{y \cdot z}{t}\\ \mathbf{elif}\;z \leq -1 \cdot 10^{+116} \lor \neg \left(z \leq 10^{+134}\right):\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \end{array} \]
  5. Add Preprocessing

Alternative 6: 40.9% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;a \leq -2.7 \cdot 10^{-305}:\\
\;\;\;\;x\\

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

\mathbf{elif}\;a \leq 1.22 \cdot 10^{-198}:\\
\;\;\;\;x\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.2e10 or 2.30000000000000017e69 < a

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

    if -2.2e10 < a < -2.6999999999999999e-305 or 2.80000000000000011e-255 < a < 1.22e-198

    1. Initial program 86.3%

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

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

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

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

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

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

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

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

    if -2.6999999999999999e-305 < a < 2.80000000000000011e-255 or 1.22e-198 < a < 2.30000000000000017e69

    1. Initial program 64.8%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -22000000000:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -2.7 \cdot 10^{-305}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.8 \cdot 10^{-255}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.22 \cdot 10^{-198}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.3 \cdot 10^{+69}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 7: 80.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.5000000000000001e-133 or 1.7e-211 < t

    1. Initial program 80.4%

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

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

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

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

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

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

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

    if -1.5000000000000001e-133 < t < 1.7e-211

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

Alternative 8: 80.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -8.49999999999999957e-133 or 5.69999999999999971e-210 < t

    1. Initial program 80.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -8.49999999999999957e-133 < t < 5.69999999999999971e-210

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

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

Alternative 9: 79.9% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 85.7%

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

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

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

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

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

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

    if -1.8e-76 < t < 5.50000000000000024e-210

    1. Initial program 62.9%

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

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

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

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

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

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

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

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

    if 5.50000000000000024e-210 < t

    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}{\frac{y}{\frac{t}{z}}}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. associate-+l+78.0%

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

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

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

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

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

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

Alternative 10: 80.2% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 82.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*87.1%

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

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

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

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

    if -1.52000000000000001e-133 < t < 5.69999999999999971e-210

    1. Initial program 62.5%

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

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

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

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

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

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

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

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

    if 5.69999999999999971e-210 < t

    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}{\frac{y}{\frac{t}{z}}}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. associate-+l+78.0%

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 61.5% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -5.5000000000000003e118 or 6.50000000000000008e191 < b

    1. Initial program 59.2%

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

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

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

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

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

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

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

    if -5.5000000000000003e118 < b < 6.50000000000000008e191

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

Alternative 12: 61.7% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.25 \cdot 10^{+119} \lor \neg \left(b \leq 8 \cdot 10^{+191}\right):\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -2.2500000000000001e119 or 8.00000000000000058e191 < b

    1. Initial program 59.2%

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

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

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

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

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

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

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

    if -2.2500000000000001e119 < b < 8.00000000000000058e191

    1. Initial program 82.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 13: 56.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4000000000000001e-80 or 8.50000000000000067e-92 < t

    1. Initial program 83.5%

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

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

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

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

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

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

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

    if -3.4000000000000001e-80 < t < 8.50000000000000067e-92

    1. Initial program 64.9%

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

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

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

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

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

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

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

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

Alternative 14: 40.7% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -22000000000 \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 -22000000000.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 <= -22000000000.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 <= (-22000000000.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 <= -22000000000.0) || !(a <= 1.0)) {
		tmp = x / a;
	} else {
		tmp = x;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (a <= -22000000000.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 <= -22000000000.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 <= -22000000000.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, -22000000000.0], N[Not[LessEqual[a, 1.0]], $MachinePrecision]], N[(x / a), $MachinePrecision], x]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -22000000000 \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 < -2.2e10 or 1 < a

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

    if -2.2e10 < a < 1

    1. Initial program 78.4%

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

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

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

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

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

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

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

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

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

Alternative 15: 19.6% 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 76.4%

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

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  7. Final simplification20.3%

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 79.7% 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 2024019 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

  :herbie-target
  (if (< t -1.3659085366310088e-271) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b))))) (if (< t 3.036967103737246e-130) (/ z b) (* 1.0 (* (+ x (* (/ y t) z)) (/ 1.0 (+ (+ a 1.0) (* (/ y t) b)))))))

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