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

Percentage Accurate: 74.9% → 90.5%
Time: 16.6s
Alternatives: 17
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 17 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.9% 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: 90.5% accurate, 0.2× speedup?

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

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

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

\mathbf{elif}\;t\_4 \leq \infty:\\
\;\;\;\;t\_5\\

\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))) < -1.00000000000000005e236 or 2.00000000000000003e306 < (/.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 49.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative72.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*72.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-define72.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. Simplified72.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 z around inf 86.7%

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

    1. Initial program 91.5%

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

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

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \frac{y}{t}\right)\right)}} \]
      2. expm1-undefine78.7%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \frac{y}{t}\right)} - 1\right)}} \]
      3. log1p-undefine78.7%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \left(e^{\color{blue}{\log \left(1 + b \cdot \frac{y}{t}\right)}} - 1\right)} \]
      4. add-exp-log93.4%

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative0.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*4.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-define4.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. Simplified4.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 y around inf 96.2%

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

    \[\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^{+236}:\\ \;\;\;\;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 2 \cdot 10^{+306}:\\ \;\;\;\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \left(1 + \left(b \cdot \frac{y}{t} + -1\right)\right)}\\ \mathbf{elif}\;\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{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
  5. Add Preprocessing

Alternative 2: 86.9% accurate, 0.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 + \mathsf{fma}\left(b, \frac{y}{t}, a\right)\\ \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\mathsf{fma}\left(\frac{y}{t}, \frac{z}{t\_1}, \frac{x}{t\_1}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ 1.0 (fma b (/ y t) a))))
   (if (<= (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))) INFINITY)
     (fma (/ y t) (/ z t_1) (/ x t_1))
     (/ z b))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 1.0 + fma(b, (y / t), a);
	double tmp;
	if (((x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))) <= ((double) INFINITY)) {
		tmp = fma((y / t), (z / t_1), (x / t_1));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(1.0 + fma(b, Float64(y / t), a))
	tmp = 0.0
	if (Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) <= Inf)
		tmp = fma(Float64(y / t), Float64(z / t_1), Float64(x / t_1));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[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], Infinity], N[(N[(y / t), $MachinePrecision] * N[(z / t$95$1), $MachinePrecision] + N[(x / t$95$1), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]
\begin{array}{l}

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

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


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

    1. Initial program 84.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative81.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*81.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-define81.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. Simplified81.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 z around 0 84.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. Step-by-step derivation
      1. +-commutative84.7%

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 0.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative0.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*4.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-define4.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. Simplified4.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 y around inf 96.2%

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

Alternative 3: 87.4% accurate, 0.3× speedup?

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{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.00000000000000005e236

    1. Initial program 72.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*86.0%

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

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

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

    if -1.00000000000000005e236 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e306

    1. Initial program 91.5%

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

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

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(b \cdot \frac{y}{t}\right)\right)}} \]
      2. expm1-undefine78.7%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{\left(e^{\mathsf{log1p}\left(b \cdot \frac{y}{t}\right)} - 1\right)}} \]
      3. log1p-undefine78.7%

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \left(e^{\color{blue}{\log \left(1 + b \cdot \frac{y}{t}\right)}} - 1\right)} \]
      4. add-exp-log93.4%

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

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

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

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

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

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

    if 2.00000000000000003e306 < (/.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*23.1%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative23.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*25.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-define25.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. Simplified25.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 18.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. Step-by-step derivation
      1. +-commutative18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 87.4% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+306}:\\
\;\;\;\;\frac{t\_1}{\left(a + 1\right) + b \cdot \frac{y}{t}}\\

\mathbf{else}:\\
\;\;\;\;\frac{z + \frac{x \cdot t}{y}}{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.00000000000000005e236

    1. Initial program 72.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*86.0%

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

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

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

    if -1.00000000000000005e236 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2.00000000000000003e306

    1. Initial program 91.5%

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

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

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

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

    if 2.00000000000000003e306 < (/.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*23.1%

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative23.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*25.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-define25.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. Simplified25.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 18.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. Step-by-step derivation
      1. +-commutative18.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 74.0% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -2e5 or 1.1000000000000001 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 74.1%

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

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

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

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

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

    if -2e5 < (+.f64 a #s(literal 1 binary64)) < 1.1000000000000001

    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. associate-/l*80.2%

        \[\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. Taylor expanded in a around 0 79.5%

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

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

Alternative 6: 74.1% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -2e5 or 1 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 73.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*69.1%

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

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

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

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

    if -2e5 < (+.f64 a #s(literal 1 binary64)) < 1

    1. Initial program 80.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*80.7%

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

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;a + 1 \leq -200000 \lor \neg \left(a + 1 \leq 1\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 7: 74.1% accurate, 0.6× 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 + 1 \leq -200000:\\ \;\;\;\;\frac{t\_2}{a + t\_1}\\ \mathbf{elif}\;a + 1 \leq 1.0000005:\\ \;\;\;\;\frac{t\_2}{1 + t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_2}{a + b \cdot \frac{y}{t}}\\ \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 (<= (+ a 1.0) -200000.0)
     (/ t_2 (+ a t_1))
     (if (<= (+ a 1.0) 1.0000005)
       (/ t_2 (+ 1.0 t_1))
       (/ t_2 (+ a (* b (/ y t))))))))
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) <= -200000.0) {
		tmp = t_2 / (a + t_1);
	} else if ((a + 1.0) <= 1.0000005) {
		tmp = t_2 / (1.0 + t_1);
	} else {
		tmp = t_2 / (a + (b * (y / t)));
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: tmp
    t_1 = y * (b / t)
    t_2 = x + (y * (z / t))
    if ((a + 1.0d0) <= (-200000.0d0)) then
        tmp = t_2 / (a + t_1)
    else if ((a + 1.0d0) <= 1.0000005d0) then
        tmp = t_2 / (1.0d0 + t_1)
    else
        tmp = t_2 / (a + (b * (y / t)))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = y * (b / t);
	double t_2 = x + (y * (z / t));
	double tmp;
	if ((a + 1.0) <= -200000.0) {
		tmp = t_2 / (a + t_1);
	} else if ((a + 1.0) <= 1.0000005) {
		tmp = t_2 / (1.0 + t_1);
	} else {
		tmp = t_2 / (a + (b * (y / t)));
	}
	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) <= -200000.0:
		tmp = t_2 / (a + t_1)
	elif (a + 1.0) <= 1.0000005:
		tmp = t_2 / (1.0 + t_1)
	else:
		tmp = t_2 / (a + (b * (y / t)))
	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 (Float64(a + 1.0) <= -200000.0)
		tmp = Float64(t_2 / Float64(a + t_1));
	elseif (Float64(a + 1.0) <= 1.0000005)
		tmp = Float64(t_2 / Float64(1.0 + t_1));
	else
		tmp = Float64(t_2 / Float64(a + Float64(b * Float64(y / t))));
	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) <= -200000.0)
		tmp = t_2 / (a + t_1);
	elseif ((a + 1.0) <= 1.0000005)
		tmp = t_2 / (1.0 + t_1);
	else
		tmp = t_2 / (a + (b * (y / t)));
	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[LessEqual[N[(a + 1.0), $MachinePrecision], -200000.0], N[(t$95$2 / N[(a + t$95$1), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 1.0000005], N[(t$95$2 / N[(1.0 + t$95$1), $MachinePrecision]), $MachinePrecision], N[(t$95$2 / N[(a + N[(b * N[(y / t), $MachinePrecision]), $MachinePrecision]), $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 + 1 \leq -200000:\\
\;\;\;\;\frac{t\_2}{a + t\_1}\\

\mathbf{elif}\;a + 1 \leq 1.0000005:\\
\;\;\;\;\frac{t\_2}{1 + t\_1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (+.f64 a #s(literal 1 binary64)) < -2e5

    1. Initial program 77.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*72.4%

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

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

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

    if -2e5 < (+.f64 a #s(literal 1 binary64)) < 1.0000005000000001

    1. Initial program 80.1%

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

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

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

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

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

    if 1.0000005000000001 < (+.f64 a #s(literal 1 binary64))

    1. Initial program 70.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. *-commutative70.6%

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

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

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

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

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

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

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

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

Alternative 8: 81.9% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.0500000000000001e-144 or 1.8999999999999999e-218 < t

    1. Initial program 81.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*81.9%

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

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

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

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

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

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

    if -1.0500000000000001e-144 < t < 1.8999999999999999e-218

    1. Initial program 56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative40.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*34.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-define34.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. Simplified34.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 0 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 9: 81.7% accurate, 0.6× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.22e-144 or 2.09999999999999994e-218 < t

    1. Initial program 81.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*81.9%

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

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

    1. Initial program 56.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative40.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*34.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-define34.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. Simplified34.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 0 65.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 10: 77.7% accurate, 0.6× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if y < -2.55000000000000004e169

    1. Initial program 37.9%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative38.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*46.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-define46.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. Simplified46.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 b around inf 21.9%

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

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

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

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

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

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

    if -2.55000000000000004e169 < y < 5.2e229

    1. Initial program 86.3%

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{b \cdot \frac{y}{t}}} \]
    4. Applied egg-rr86.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. associate-+l+86.7%

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

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

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

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

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

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

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

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

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

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

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

    if 5.2e229 < y

    1. Initial program 37.2%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative44.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*45.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-define45.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. Simplified45.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 z around 0 41.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 11: 60.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+159}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.39999999999999997e-22 or 2.25000000000000013e159 < t

    1. Initial program 86.4%

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

        \[\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*94.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-define94.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. Simplified94.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 z around 0 76.1%

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

    if -1.39999999999999997e-22 < t < 1.0200000000000001e-16

    1. Initial program 69.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative58.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*53.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-define53.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. Simplified53.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 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.0200000000000001e-16 < t < 2.25000000000000013e159

    1. Initial program 74.7%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative81.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*83.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-define83.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. Simplified83.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 0 63.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 z around inf 37.9%

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

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

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

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

Alternative 12: 58.1% accurate, 0.7× speedup?

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

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

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+159}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -1.46000000000000006e-21 or 2.25000000000000013e159 < t

    1. Initial program 86.4%

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

        \[\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*94.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-define94.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. Simplified94.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 y around 0 72.7%

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

    if -1.46000000000000006e-21 < t < 1.26000000000000001e-16

    1. Initial program 69.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative58.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*53.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-define53.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. Simplified53.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 73.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.26000000000000001e-16 < t < 2.25000000000000013e159

    1. Initial program 74.7%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative81.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*83.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-define83.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. Simplified83.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 0 63.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 z around inf 37.9%

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

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.46 \cdot 10^{-21}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 1.26 \cdot 10^{-16}:\\ \;\;\;\;\frac{z + \frac{x \cdot t}{y}}{b}\\ \mathbf{elif}\;t \leq 2.25 \cdot 10^{+159}:\\ \;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 53.0% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{x}{a + 1}\\
\mathbf{if}\;t \leq -9.2:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;t \leq 2.25 \cdot 10^{+159}:\\
\;\;\;\;\frac{y}{t} \cdot \frac{z}{a + 1}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -9.1999999999999993 or 2.25000000000000013e159 < t

    1. Initial program 87.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative90.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*95.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-define95.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. Simplified95.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 73.9%

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

    if -9.1999999999999993 < t < 4.50000000000000013e-19

    1. Initial program 69.0%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative58.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*53.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-define53.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. Simplified53.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 inf 53.8%

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

    if 4.50000000000000013e-19 < t < 2.25000000000000013e159

    1. Initial program 75.3%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative81.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.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-define84.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. Simplified84.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 y around 0 61.8%

      \[\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 z around inf 37.1%

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

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

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

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

Alternative 14: 67.2% accurate, 0.8× speedup?

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -1.69999999999999991e29 or 1.3500000000000001e102 < b

    1. Initial program 60.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative56.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*56.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-define56.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. Simplified56.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 b around inf 34.6%

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

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

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

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

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

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

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

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

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

    if -1.69999999999999991e29 < b < 1.3500000000000001e102

    1. Initial program 84.8%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative83.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*83.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-define83.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. Simplified83.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 73.2%

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

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

Alternative 15: 55.2% accurate, 1.1× speedup?

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -0.440000000000000002 or 2.59999999999999998e53 < t

    1. Initial program 83.4%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative88.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*93.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-define93.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. Simplified93.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 y around 0 67.4%

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

    if -0.440000000000000002 < t < 2.59999999999999998e53

    1. Initial program 70.9%

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative61.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*57.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-define57.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. Simplified57.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 y around inf 51.4%

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

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

Alternative 16: 42.4% accurate, 1.3× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;t \leq -14 \lor \neg \left(t \leq 7 \cdot 10^{+56}\right):\\
\;\;\;\;\frac{x}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -14 or 6.99999999999999999e56 < t

    1. Initial program 83.9%

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

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

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

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

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

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

    if -14 < t < 6.99999999999999999e56

    1. Initial program 70.6%

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

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

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

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. +-commutative61.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*57.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-define57.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. Simplified57.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 51.0%

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

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

Alternative 17: 25.3% accurate, 5.7× speedup?

\[\begin{array}{l} \\ \frac{x}{a} \end{array} \]
(FPCore (x y z t a b) :precision binary64 (/ x a))
double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
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 / a
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x / a;
}
def code(x, y, z, t, a, b):
	return x / a
function code(x, y, z, t, a, b)
	return Float64(x / a)
end
function tmp = code(x, y, z, t, a, b)
	tmp = x / a;
end
code[x_, y_, z_, t_, a_, b_] := N[(x / a), $MachinePrecision]
\begin{array}{l}

\\
\frac{x}{a}
\end{array}
Derivation
  1. Initial program 76.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. *-commutative76.8%

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

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

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

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

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

Developer Target 1: 79.0% 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 2024182 
(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))))