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

Percentage Accurate: 75.3% → 87.9%
Time: 12.2s
Alternatives: 15
Speedup: 0.8×

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: 75.3% accurate, 1.0× speedup?

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

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

Alternative 1: 87.9% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t_2 \leq 5 \cdot 10^{+301}:\\
\;\;\;\;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))) < -4.99999999982e-314

    1. Initial program 90.3%

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

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

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

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

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

    1. Initial program 59.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 99.7%

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

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

    1. Initial program 12.3%

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

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

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

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

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

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

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

Alternative 2: 85.9% accurate, 0.5× 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 5 \cdot 10^{+301}:\\ \;\;\;\;t_1\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (/ (* y b) t) (+ a 1.0)))))
   (if (<= t_1 5e+301) t_1 (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= 5e+301) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0d0))
    if (t_1 <= 5d+301) then
        tmp = t_1
    else
        tmp = z / b
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	double tmp;
	if (t_1 <= 5e+301) {
		tmp = t_1;
	} else {
		tmp = z / b;
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0))
	tmp = 0
	if t_1 <= 5e+301:
		tmp = t_1
	else:
		tmp = z / b
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(Float64(y * b) / t) + Float64(a + 1.0)))
	tmp = 0.0
	if (t_1 <= 5e+301)
		tmp = t_1;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = (x + ((y * z) / t)) / (((y * b) / t) + (a + 1.0));
	tmp = 0.0;
	if (t_1 <= 5e+301)
		tmp = t_1;
	else
		tmp = z / b;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, 5e+301], t$95$1, N[(z / b), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 88.6%

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

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

    1. Initial program 12.3%

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

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

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

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

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

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

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

Alternative 3: 53.8% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -2.4 \cdot 10^{-40}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 6.2 \cdot 10^{-113}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

\mathbf{elif}\;t \leq 1.58 \cdot 10^{+159} \lor \neg \left(t \leq 1.65 \cdot 10^{+196}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.39999999999999991e-40 or 1.2e-48 < t < 1.58000000000000007e159 or 1.6500000000000001e196 < t

    1. Initial program 84.2%

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

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

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

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

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

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

    if -2.39999999999999991e-40 < t < 2.9000000000000001e-162 or 6.20000000000000024e-113 < t < 1.2e-48

    1. Initial program 61.8%

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

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

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

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

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

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

    if 2.9000000000000001e-162 < t < 6.20000000000000024e-113

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

    if 1.58000000000000007e159 < t < 1.6500000000000001e196

    1. Initial program 59.7%

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

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

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

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

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

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

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

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

        \[\leadsto \frac{y}{\frac{\color{blue}{1 \cdot t + a \cdot t}}{z}} \]
      3. *-lft-identity67.6%

        \[\leadsto \frac{y}{\frac{\color{blue}{t} + a \cdot t}{z}} \]
      4. *-commutative67.6%

        \[\leadsto \frac{y}{\frac{t + \color{blue}{t \cdot a}}{z}} \]
    7. Simplified67.6%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.4 \cdot 10^{-40}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 2.9 \cdot 10^{-162}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 6.2 \cdot 10^{-113}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.2 \cdot 10^{-48}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 1.58 \cdot 10^{+159} \lor \neg \left(t \leq 1.65 \cdot 10^{+196}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{\frac{t + t \cdot a}{z}}\\ \end{array} \]

Alternative 4: 79.3% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.52 \cdot 10^{+72} \lor \neg \left(y \leq 3.7 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.52e72 or 3.7e147 < y

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.52e72 < y < 3.7e147

    1. Initial program 87.7%

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

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

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

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

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

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

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

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

Alternative 5: 82.1% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -5.4 \cdot 10^{+72} \lor \neg \left(y \leq 3.7 \cdot 10^{+147}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -5.4000000000000001e72 or 3.7e147 < y

    1. Initial program 43.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.4000000000000001e72 < y < 3.7e147

    1. Initial program 87.7%

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

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

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

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

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

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

Alternative 6: 68.1% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;t \leq -6.5 \cdot 10^{-53} \lor \neg \left(t \leq 9 \cdot 10^{-49}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -8.7999999999999998e212 or -2.6e-18 < t < -6.4999999999999997e-53 or 9.0000000000000004e-49 < t

    1. Initial program 82.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{t} \cdot y} \]
    5. Applied egg-rr94.6%

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

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

    if -8.7999999999999998e212 < t < -2.6e-18

    1. Initial program 85.0%

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

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

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

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

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

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

    if -6.4999999999999997e-53 < t < 9.0000000000000004e-49

    1. Initial program 64.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -8.8 \cdot 10^{+212}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{elif}\;t \leq -2.6 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{1 + \left(a + \frac{y \cdot b}{t}\right)}\\ \mathbf{elif}\;t \leq -6.5 \cdot 10^{-53} \lor \neg \left(t \leq 9 \cdot 10^{-49}\right):\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \end{array} \]

Alternative 7: 68.6% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 21000000 \lor \neg \left(y \leq 1.9 \cdot 10^{+56}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.50000000000000005e63 or 1.22e-52 < y < 2.1e7 or 1.89999999999999998e56 < y

    1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.50000000000000005e63 < y < 1.22e-52

    1. Initial program 94.4%

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

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

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

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

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

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

    if 2.1e7 < y < 1.89999999999999998e56

    1. Initial program 70.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{t} \cdot y} \]
    5. Applied egg-rr80.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -2.5 \cdot 10^{+63}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{elif}\;y \leq 1.22 \cdot 10^{-52}:\\ \;\;\;\;\frac{x + \frac{z}{\frac{t}{y}}}{a + 1}\\ \mathbf{elif}\;y \leq 21000000 \lor \neg \left(y \leq 1.9 \cdot 10^{+56}\right):\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]

Alternative 8: 68.7% accurate, 0.9× speedup?

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

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

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

\mathbf{elif}\;y \leq 7200000 \lor \neg \left(y \leq 3 \cdot 10^{+57}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -1.3199999999999999e70 or 6.4999999999999997e-53 < y < 7.2e6 or 3e57 < y

    1. Initial program 48.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.3199999999999999e70 < y < 6.4999999999999997e-53

    1. Initial program 94.4%

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

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

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

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

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

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

    if 7.2e6 < y < 3e57

    1. Initial program 70.7%

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

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

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

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

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

        \[\leadsto x + \color{blue}{\frac{z}{t} \cdot y} \]
    5. Applied egg-rr80.4%

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;y \leq -1.32 \cdot 10^{+70}:\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{elif}\;y \leq 6.5 \cdot 10^{-53}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{a + 1}\\ \mathbf{elif}\;y \leq 7200000 \lor \neg \left(y \leq 3 \cdot 10^{+57}\right):\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{a + 1}\\ \end{array} \]

Alternative 9: 59.6% accurate, 1.0× speedup?

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

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

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

\mathbf{elif}\;y \leq 48000000 \lor \neg \left(y \leq 3.1 \cdot 10^{+55}\right):\\
\;\;\;\;t_1\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -3.00000000000000003e-28 or 5.0000000000000002e-55 < y < 4.8e7 or 3.09999999999999994e55 < y

    1. Initial program 52.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{z + \color{blue}{x \cdot \frac{t}{y}}}{b} \]
    9. Simplified68.6%

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

    if -3.00000000000000003e-28 < y < 5.0000000000000002e-55

    1. Initial program 96.1%

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

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

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

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

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

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

    if 4.8e7 < y < 3.09999999999999994e55

    1. Initial program 70.7%

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{x + \frac{y \cdot z}{t}} \]
      2. *-commutative51.7%

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

        \[\leadsto x + \color{blue}{\frac{z}{\frac{t}{y}}} \]
    7. Simplified61.0%

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

        \[\leadsto x + \color{blue}{\frac{z}{t} \cdot y} \]
    9. Applied egg-rr61.2%

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

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

Alternative 10: 55.2% accurate, 1.1× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -1.3 \cdot 10^{-39}:\\
\;\;\;\;t_1\\

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

\mathbf{elif}\;t \leq 1.05 \cdot 10^{-116}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.3e-39 or 1.25e-48 < t

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

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

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

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

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

    if -1.3e-39 < t < 5.70000000000000023e-164 or 1.05e-116 < t < 1.25e-48

    1. Initial program 61.8%

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

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

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

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

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

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

    if 5.70000000000000023e-164 < t < 1.05e-116

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.3 \cdot 10^{-39}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 5.7 \cdot 10^{-164}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 1.05 \cdot 10^{-116}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{elif}\;t \leq 1.25 \cdot 10^{-48}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]

Alternative 11: 66.0% accurate, 1.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -1.15 \cdot 10^{+68} \lor \neg \left(y \leq 4.9 \cdot 10^{+55}\right):\\ \;\;\;\;\frac{z + x \cdot \frac{t}{y}}{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 -1.15e+68) (not (<= y 4.9e+55)))
   (/ (+ z (* x (/ t y))) 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 <= -1.15e+68) || !(y <= 4.9e+55)) {
		tmp = (z + (x * (t / y))) / 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 <= (-1.15d+68)) .or. (.not. (y <= 4.9d+55))) then
        tmp = (z + (x * (t / y))) / 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 <= -1.15e+68) || !(y <= 4.9e+55)) {
		tmp = (z + (x * (t / y))) / b;
	} else {
		tmp = x / (1.0 + (a + ((y * b) / t)));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	tmp = 0
	if (y <= -1.15e+68) or not (y <= 4.9e+55):
		tmp = (z + (x * (t / y))) / 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 <= -1.15e+68) || !(y <= 4.9e+55))
		tmp = Float64(Float64(z + Float64(x * Float64(t / y))) / 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 <= -1.15e+68) || ~((y <= 4.9e+55)))
		tmp = (z + (x * (t / y))) / 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, -1.15e+68], N[Not[LessEqual[y, 4.9e+55]], $MachinePrecision]], N[(N[(z + N[(x * N[(t / y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision], N[(x / N[(1.0 + N[(a + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.15 \cdot 10^{+68} \lor \neg \left(y \leq 4.9 \cdot 10^{+55}\right):\\
\;\;\;\;\frac{z + x \cdot \frac{t}{y}}{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 < -1.15e68 or 4.90000000000000015e55 < y

    1. Initial program 45.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e68 < y < 4.90000000000000015e55

    1. Initial program 91.6%

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

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

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

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

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

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

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

Alternative 12: 56.0% accurate, 1.9× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2 \cdot 10^{-36} \lor \neg \left(t \leq 1.22 \cdot 10^{-48}\right):\\
\;\;\;\;\frac{x}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9999999999999999e-36 or 1.21999999999999993e-48 < t

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

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

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

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

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

    if -1.9999999999999999e-36 < t < 1.21999999999999993e-48

    1. Initial program 64.6%

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2 \cdot 10^{-36} \lor \neg \left(t \leq 1.22 \cdot 10^{-48}\right):\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]

Alternative 13: 41.5% accurate, 2.4× speedup?

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

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

\mathbf{elif}\;a \leq 27000000000000:\\
\;\;\;\;x\\

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


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

    1. Initial program 75.7%

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

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

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

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

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

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

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

    if -4.19999999999999988e-12 < a < 2.7e13

    1. Initial program 74.7%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -4.2 \cdot 10^{-12}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 27000000000000:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \]

Alternative 14: 41.5% accurate, 2.4× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -2.5 \cdot 10^{+19}:\\
\;\;\;\;\frac{x}{a}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.5e19

    1. Initial program 85.0%

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

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

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

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

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

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

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

    if -2.5e19 < t < 2.3e18

    1. Initial program 69.5%

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

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

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

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

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

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

    if 2.3e18 < t

    1. Initial program 78.1%

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

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

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

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.5 \cdot 10^{+19}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{+18}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;x\\ \end{array} \]

Alternative 15: 19.4% 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 75.2%

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

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

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

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

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

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

    \[\leadsto \color{blue}{x} \]
  6. Final simplification19.2%

    \[\leadsto x \]

Developer target: 79.6% accurate, 0.7× speedup?

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

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

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

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


\end{array}
\end{array}

Reproduce

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