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

Percentage Accurate: 74.5% → 87.8%
Time: 16.9s
Alternatives: 23
Speedup: 0.6×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 23 alternatives:

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

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

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

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

\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216

    1. Initial program 90.5%

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

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

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 86.1% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 10^{+216}:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 46.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.0000000000000001e300 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216

    1. Initial program 90.4%

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

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

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 86.2% accurate, 0.3× speedup?

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

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

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

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216

    1. Initial program 90.5%

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

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

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 86.3% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+272}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 40.8%

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999973e272

    1. Initial program 90.7%

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

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

    1. Initial program 9.0%

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

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

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

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

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

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

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

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

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

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

Alternative 5: 85.0% accurate, 0.4× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{x}{a \cdot \left(\left(1 + \frac{1}{a}\right) + b \cdot \frac{y}{t \cdot a}\right)} + \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 #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 1e216

    1. Initial program 86.2%

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

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

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

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

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

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

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

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

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

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

    1. Initial program 22.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 82.0% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.28 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if y < -1.27999999999999999e206

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.27999999999999999e206 < y < -2.29999999999999997e-82

    1. Initial program 77.5%

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

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

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

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

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

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

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

    if -2.29999999999999997e-82 < y < 1.00000000000000004e-42

    1. Initial program 95.6%

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

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

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

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

    if 1.00000000000000004e-42 < y < 3.7999999999999998e191

    1. Initial program 68.5%

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

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

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

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

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

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

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

    if 3.7999999999999998e191 < y

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 81.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.2 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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

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

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


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

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2e206 < y < -1.99999999999999983e29

    1. Initial program 73.4%

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

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

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

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

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

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

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

    if -1.99999999999999983e29 < y < 6.00000000000000007e149

    1. Initial program 88.7%

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

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

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

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

    if 6.00000000000000007e149 < y

    1. Initial program 31.6%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 81.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.8 \cdot 10^{+206}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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

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

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


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

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.80000000000000014e206 < y < -5.00000000000000021e35

    1. Initial program 71.7%

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

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

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

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

    if -5.00000000000000021e35 < y < 2.0000000000000001e149

    1. Initial program 88.8%

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

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

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

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

    if 2.0000000000000001e149 < y

    1. Initial program 31.6%

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

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

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

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

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

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

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

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

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

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

Alternative 9: 81.5% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -9 \cdot 10^{+205}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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

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

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


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

    1. Initial program 42.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.00000000000000071e205 < y < -3.99999999999999976e39

    1. Initial program 71.7%

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

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

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

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

    if -3.99999999999999976e39 < y < 2.9999999999999997e191

    1. Initial program 86.8%

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

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

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

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

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

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

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

    if 2.9999999999999997e191 < y

    1. Initial program 27.5%

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

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

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

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

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

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

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

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

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

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

Alternative 10: 62.9% accurate, 0.5× speedup?

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

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

\mathbf{elif}\;b \leq 1.25 \cdot 10^{-62}:\\
\;\;\;\;y \cdot \frac{z}{t\_1} + \frac{x}{a + 1}\\

\mathbf{elif}\;b \leq 7.5 \cdot 10^{+38}:\\
\;\;\;\;\frac{y \cdot z}{y \cdot b + t\_1}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 5 regimes
  2. if b < -1.2500000000000001e96

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.2500000000000001e96 < b < 1.25e-62

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.25e-62 < b < 7.4999999999999999e38

    1. Initial program 77.8%

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

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

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

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

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

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

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

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

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

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

    if 7.4999999999999999e38 < b < 8.4999999999999999e191

    1. Initial program 79.8%

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

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

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

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

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

    if 8.4999999999999999e191 < b

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

Alternative 11: 79.5% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.45e-229 or 3.4000000000000001e-98 < t

    1. Initial program 81.7%

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

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

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

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

    if -1.45e-229 < t < 3.4000000000000001e-98

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

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

Alternative 12: 79.5% accurate, 0.6× speedup?

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

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

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

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


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

    1. Initial program 80.9%

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

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

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

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

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

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

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

    if -1.7500000000000002e-229 < t < 4.39999999999999993e-98

    1. Initial program 67.7%

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

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

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

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

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

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

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

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

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

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

    if 4.39999999999999993e-98 < t

    1. Initial program 82.6%

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

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

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

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

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

Alternative 13: 64.2% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.96 \cdot 10^{+96}:\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if b < -1.96e96

    1. Initial program 62.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.96e96 < b < 4.60000000000000024e39

    1. Initial program 83.3%

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

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

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

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

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

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

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

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

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

    if 4.60000000000000024e39 < b < 7.5000000000000008e193

    1. Initial program 79.8%

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

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

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

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

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

    if 7.5000000000000008e193 < b

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

Alternative 14: 73.4% accurate, 0.7× speedup?

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

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

\mathbf{else}:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\


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

    1. Initial program 79.6%

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

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

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

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

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

    if -1 < a < 9.7999999999999996e-22

    1. Initial program 76.3%

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

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

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

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

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

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

Alternative 15: 68.6% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;a \leq -63:\\ \;\;\;\;y \cdot \frac{z}{t \cdot \left(a + 1\right)} + t\_1\\ \mathbf{elif}\;a \leq 1.65:\\ \;\;\;\;\frac{x + y \cdot \frac{z}{t}}{1 + y \cdot \frac{b}{t}}\\ \mathbf{else}:\\ \;\;\;\;t\_1 + \frac{\frac{y}{\frac{t}{z}}}{a + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= a -63.0)
     (+ (* y (/ z (* t (+ a 1.0)))) t_1)
     (if (<= a 1.65)
       (/ (+ x (* y (/ z t))) (+ 1.0 (* y (/ b t))))
       (+ t_1 (/ (/ y (/ t z)) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (a <= -63.0) {
		tmp = (y * (z / (t * (a + 1.0)))) + t_1;
	} else if (a <= 1.65) {
		tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
	} else {
		tmp = t_1 + ((y / (t / z)) / (a + 1.0));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: tmp
    t_1 = x / (a + 1.0d0)
    if (a <= (-63.0d0)) then
        tmp = (y * (z / (t * (a + 1.0d0)))) + t_1
    else if (a <= 1.65d0) then
        tmp = (x + (y * (z / t))) / (1.0d0 + (y * (b / t)))
    else
        tmp = t_1 + ((y / (t / z)) / (a + 1.0d0))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (a <= -63.0) {
		tmp = (y * (z / (t * (a + 1.0)))) + t_1;
	} else if (a <= 1.65) {
		tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
	} else {
		tmp = t_1 + ((y / (t / z)) / (a + 1.0));
	}
	return tmp;
}
def code(x, y, z, t, a, b):
	t_1 = x / (a + 1.0)
	tmp = 0
	if a <= -63.0:
		tmp = (y * (z / (t * (a + 1.0)))) + t_1
	elif a <= 1.65:
		tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)))
	else:
		tmp = t_1 + ((y / (t / z)) / (a + 1.0))
	return tmp
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (a <= -63.0)
		tmp = Float64(Float64(y * Float64(z / Float64(t * Float64(a + 1.0)))) + t_1);
	elseif (a <= 1.65)
		tmp = Float64(Float64(x + Float64(y * Float64(z / t))) / Float64(1.0 + Float64(y * Float64(b / t))));
	else
		tmp = Float64(t_1 + Float64(Float64(y / Float64(t / z)) / Float64(a + 1.0)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b)
	t_1 = x / (a + 1.0);
	tmp = 0.0;
	if (a <= -63.0)
		tmp = (y * (z / (t * (a + 1.0)))) + t_1;
	elseif (a <= 1.65)
		tmp = (x + (y * (z / t))) / (1.0 + (y * (b / t)));
	else
		tmp = t_1 + ((y / (t / z)) / (a + 1.0));
	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[a, -63.0], N[(N[(y * N[(z / N[(t * N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision], If[LessEqual[a, 1.65], N[(N[(x + N[(y * N[(z / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(t$95$1 + N[(N[(y / N[(t / z), $MachinePrecision]), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 80.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -63 < a < 1.6499999999999999

    1. Initial program 76.8%

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

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

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

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

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

    if 1.6499999999999999 < a

    1. Initial program 78.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 16: 64.6% accurate, 0.7× speedup?

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

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

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

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


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

    1. Initial program 83.6%

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

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

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

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

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

    if -1.2499999999999999e-25 < t < 9.1999999999999998e-7

    1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

    if 9.1999999999999998e-7 < t

    1. Initial program 83.1%

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

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

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

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

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

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

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

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

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

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

Alternative 17: 63.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -1.42 \cdot 10^{-9} \lor \neg \left(y \leq 2.4 \cdot 10^{+49}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.4200000000000001e-9 or 2.4e49 < y

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.4200000000000001e-9 < y < 2.4e49

    1. Initial program 94.0%

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

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

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

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

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

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

Alternative 18: 62.9% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;y \leq -4.2 \cdot 10^{-9} \lor \neg \left(y \leq 1.05 \cdot 10^{+51}\right):\\
\;\;\;\;\frac{z}{b} + \frac{x \cdot t}{y \cdot 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 < -4.20000000000000039e-9 or 1.0500000000000001e51 < y

    1. Initial program 56.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.20000000000000039e-9 < y < 1.0500000000000001e51

    1. Initial program 94.0%

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

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

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

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

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

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

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

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

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

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

Alternative 19: 61.0% accurate, 0.8× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -6.60000000000000059e23 or 3.9499999999999999e24 < t

    1. Initial program 84.1%

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

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

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

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

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

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

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

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

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

    if -6.60000000000000059e23 < t < 3.9499999999999999e24

    1. Initial program 73.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 20: 55.6% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -3.19999999999999981e-10 or 5.0000000000000004e49 < y

    1. Initial program 56.6%

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

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

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

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

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

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

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

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

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

    if -3.19999999999999981e-10 < y < 5.0000000000000004e49

    1. Initial program 93.9%

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

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

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

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

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

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

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

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

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

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

Alternative 21: 42.6% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;a \leq -2.9 \cdot 10^{+137} \lor \neg \left(a \leq 122000\right):\\
\;\;\;\;\frac{x}{a}\\

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


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

    1. Initial program 79.9%

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

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

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

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

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

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

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

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

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

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

    if -2.89999999999999985e137 < a < 122000

    1. Initial program 76.6%

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

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

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

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

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

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

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

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

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

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

Alternative 22: 40.7% accurate, 1.3× speedup?

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

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

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


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

    1. Initial program 79.3%

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

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

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

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

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

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

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

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

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

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

    if -7.49999999999999995e-10 < a < 1

    1. Initial program 76.6%

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

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

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

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

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

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

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

Alternative 23: 19.7% 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 78.0%

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

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

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

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

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

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

Developer Target 1: 79.1% accurate, 0.5× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;t\_1\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024130 
(FPCore (x y z t a b)
  :name "Diagrams.Solve.Tridiagonal:solveCyclicTriDiagonal from diagrams-solve-0.1, B"
  :precision binary64

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

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