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

Percentage Accurate: 75.6% → 87.6%
Time: 16.5s
Alternatives: 13
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 13 alternatives:

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

Initial Program: 75.6% accurate, 1.0× speedup?

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

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

Alternative 1: 87.6% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 10^{+300}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 20.3%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{z}{t} \cdot y}{\left(a + 1\right) + \frac{b}{t} \cdot y}} \]
    4. Add Preprocessing
    5. Taylor expanded in x around 0 55.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. times-frac77.8%

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{y}{t} \cdot \frac{z}{\color{blue}{b \cdot \frac{y}{t} + \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.0000000000000001e300

    1. Initial program 90.9%

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

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

    1. Initial program 16.2%

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

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

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

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

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

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

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

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

Alternative 2: 42.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-101}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+27} \lor \neg \left(a \leq 2.75 \cdot 10^{+109}\right) \land a \leq 4.5 \cdot 10^{+133}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= a -2.8e+26)
   (/ x a)
   (if (<= a -8.5e-101)
     (/ z b)
     (if (<= a -4.2e-215)
       x
       (if (or (<= a 2.15e+27) (and (not (<= a 2.75e+109)) (<= a 4.5e+133)))
         (/ z b)
         (/ x a))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (a <= -2.8e+26) {
		tmp = x / a;
	} else if (a <= -8.5e-101) {
		tmp = z / b;
	} else if (a <= -4.2e-215) {
		tmp = x;
	} else if ((a <= 2.15e+27) || (!(a <= 2.75e+109) && (a <= 4.5e+133))) {
		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 <= (-2.8d+26)) then
        tmp = x / a
    else if (a <= (-8.5d-101)) then
        tmp = z / b
    else if (a <= (-4.2d-215)) then
        tmp = x
    else if ((a <= 2.15d+27) .or. (.not. (a <= 2.75d+109)) .and. (a <= 4.5d+133)) 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 <= -2.8e+26) {
		tmp = x / a;
	} else if (a <= -8.5e-101) {
		tmp = z / b;
	} else if (a <= -4.2e-215) {
		tmp = x;
	} else if ((a <= 2.15e+27) || (!(a <= 2.75e+109) && (a <= 4.5e+133))) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if a <= -2.8e+26:
		tmp = x / a
	elif a <= -8.5e-101:
		tmp = z / b
	elif a <= -4.2e-215:
		tmp = x
	elif (a <= 2.15e+27) or (not (a <= 2.75e+109) and (a <= 4.5e+133)):
		tmp = z / b
	else:
		tmp = x / a
	return tmp
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (a <= -2.8e+26)
		tmp = Float64(x / a);
	elseif (a <= -8.5e-101)
		tmp = Float64(z / b);
	elseif (a <= -4.2e-215)
		tmp = x;
	elseif ((a <= 2.15e+27) || (!(a <= 2.75e+109) && (a <= 4.5e+133)))
		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 <= -2.8e+26)
		tmp = x / a;
	elseif (a <= -8.5e-101)
		tmp = z / b;
	elseif (a <= -4.2e-215)
		tmp = x;
	elseif ((a <= 2.15e+27) || (~((a <= 2.75e+109)) && (a <= 4.5e+133)))
		tmp = z / b;
	else
		tmp = x / a;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -2.8e+26], N[(x / a), $MachinePrecision], If[LessEqual[a, -8.5e-101], N[(z / b), $MachinePrecision], If[LessEqual[a, -4.2e-215], x, If[Or[LessEqual[a, 2.15e+27], And[N[Not[LessEqual[a, 2.75e+109]], $MachinePrecision], LessEqual[a, 4.5e+133]]], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.8 \cdot 10^{+26}:\\
\;\;\;\;\frac{x}{a}\\

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

\mathbf{elif}\;a \leq -4.2 \cdot 10^{-215}:\\
\;\;\;\;x\\

\mathbf{elif}\;a \leq 2.15 \cdot 10^{+27} \lor \neg \left(a \leq 2.75 \cdot 10^{+109}\right) \land a \leq 4.5 \cdot 10^{+133}:\\
\;\;\;\;\frac{z}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -2.8e26 or 2.15000000000000004e27 < a < 2.7499999999999999e109 or 4.49999999999999985e133 < a

    1. Initial program 81.8%

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

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

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

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

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

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

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

    if -2.8e26 < a < -8.49999999999999941e-101 or -4.2e-215 < a < 2.15000000000000004e27 or 2.7499999999999999e109 < a < 4.49999999999999985e133

    1. Initial program 72.6%

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

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

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

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

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

    if -8.49999999999999941e-101 < a < -4.2e-215

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.8 \cdot 10^{+26}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -8.5 \cdot 10^{-101}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq -4.2 \cdot 10^{-215}:\\ \;\;\;\;x\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{+27} \lor \neg \left(a \leq 2.75 \cdot 10^{+109}\right) \land a \leq 4.5 \cdot 10^{+133}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 3: 60.8% accurate, 0.6× speedup?

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

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

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

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

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


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

    1. Initial program 76.6%

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

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

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

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

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

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

    if -2.7999999999999999e76 < z < -3.20000000000000004e44

    1. Initial program 41.9%

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

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

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

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

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

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

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

    if -3.20000000000000004e44 < z < 6.8000000000000005e30

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

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

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

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

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

    if 6.8000000000000005e30 < z

    1. Initial program 68.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 68.2% accurate, 0.6× speedup?

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

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

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


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

    1. Initial program 78.2%

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

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

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

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

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

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

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

    if -5e6 < (+.f64 a 1) < 1

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 79.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.8000000000000001e-191 or 1.8e-126 < t

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

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

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

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

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

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

    if -1.8000000000000001e-191 < t < 1.8e-126

    1. Initial program 61.0%

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

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

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

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

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

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

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

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

Alternative 6: 79.4% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.6 \cdot 10^{-133}:\\
\;\;\;\;\frac{z}{b}\\

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


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

    1. Initial program 76.8%

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

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

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

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

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

    if -6.2000000000000001e-192 < t < 1.60000000000000006e-133

    1. Initial program 60.6%

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

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

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

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

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

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

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

    if 1.60000000000000006e-133 < t

    1. Initial program 89.4%

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

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

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

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

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

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

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

Alternative 7: 79.8% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 4.5 \cdot 10^{-134}:\\
\;\;\;\;\frac{z}{b}\\

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


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

    1. Initial program 77.4%

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

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

        \[\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. associate-/r/82.8%

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

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

    if -3.79999999999999987e-172 < t < 4.5000000000000005e-134

    1. Initial program 61.2%

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

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

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

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

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

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

    if 4.5000000000000005e-134 < t

    1. Initial program 89.4%

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

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

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

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

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

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

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

Alternative 8: 68.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := x + \frac{y \cdot z}{t}\\
\mathbf{if}\;a \leq -0.012 \lor \neg \left(a \leq 1.95 \cdot 10^{-24}\right):\\
\;\;\;\;\frac{t\_1}{a + 1}\\

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


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

    1. Initial program 78.5%

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

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

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

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

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

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

    if -0.012 < a < 1.95e-24

    1. Initial program 76.2%

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

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

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

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

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

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

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

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

Alternative 9: 61.4% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.65e48 or 0.0080000000000000002 < y

    1. Initial program 54.8%

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

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

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

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

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

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

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

    if -2.65e48 < y < 0.0080000000000000002

    1. Initial program 92.0%

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

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

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

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

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

Alternative 10: 65.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -2.3 \cdot 10^{+98} \lor \neg \left(y \leq 0.0205\right):\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (or (<= y -2.3e+98) (not (<= y 0.0205)))
   (/ 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 ((y <= -2.3e+98) || !(y <= 0.0205)) {
		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 ((y <= (-2.3d+98)) .or. (.not. (y <= 0.0205d0))) 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 ((y <= -2.3e+98) || !(y <= 0.0205)) {
		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 (y <= -2.3e+98) or not (y <= 0.0205):
		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 ((y <= -2.3e+98) || !(y <= 0.0205))
		tmp = Float64(z / b);
	else
		tmp = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(a + 1.0));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	tmp = 0.0;
	if ((y <= -2.3e+98) || ~((y <= 0.0205)))
		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[y, -2.3e+98], N[Not[LessEqual[y, 0.0205]], $MachinePrecision]], N[(z / b), $MachinePrecision], N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.30000000000000013e98 or 0.0205000000000000009 < y

    1. Initial program 53.9%

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

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

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

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

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

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

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

    if -2.30000000000000013e98 < y < 0.0205000000000000009

    1. Initial program 90.2%

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

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

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

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

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

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

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

Alternative 11: 56.0% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -2.20000000000000001e32 or 0.0068999999999999999 < y

    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. *-commutative55.2%

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

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

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

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

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

    if -2.20000000000000001e32 < y < 0.0068999999999999999

    1. Initial program 92.4%

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

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

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

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

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

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

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

Alternative 12: 40.9% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 78.5%

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

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

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

        \[\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 x around inf 56.4%

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

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

    if -0.00679999999999999962 < a < 2.3e5

    1. Initial program 76.3%

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

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

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

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

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

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

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

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

Alternative 13: 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 77.4%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  7. Final simplification17.4%

    \[\leadsto x \]
  8. Add Preprocessing

Developer target: 78.9% 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 2024039 
(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))))