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

Percentage Accurate: 75.1% → 85.0%
Time: 13.4s
Alternatives: 20
Speedup: 0.3×

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 20 alternatives:

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

Initial Program: 75.1% 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: 85.0% accurate, 0.3× speedup?

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

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    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. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 2: 72.0% accurate, 0.2× 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}}\\ t_3 := \frac{t\_1}{a + 1}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-303}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq 0:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y z) t)))
        (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t))))
        (t_3 (/ t_1 (+ a 1.0))))
   (if (<= t_2 -1e+246)
     (/ z b)
     (if (<= t_2 -4e-303)
       t_3
       (if (<= t_2 0.0)
         (/ x (+ 1.0 (fma y (/ b t) a)))
         (if (<= t_2 2e+292) t_3 (/ z 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 t_3 = t_1 / (a + 1.0);
	double tmp;
	if (t_2 <= -1e+246) {
		tmp = z / b;
	} else if (t_2 <= -4e-303) {
		tmp = t_3;
	} else if (t_2 <= 0.0) {
		tmp = x / (1.0 + fma(y, (b / t), a));
	} else if (t_2 <= 2e+292) {
		tmp = t_3;
	} else {
		tmp = z / 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)))
	t_3 = Float64(t_1 / Float64(a + 1.0))
	tmp = 0.0
	if (t_2 <= -1e+246)
		tmp = Float64(z / b);
	elseif (t_2 <= -4e-303)
		tmp = t_3;
	elseif (t_2 <= 0.0)
		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
	elseif (t_2 <= 2e+292)
		tmp = t_3;
	else
		tmp = Float64(z / b);
	end
	return 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]}, Block[{t$95$3 = N[(t$95$1 / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+246], N[(z / b), $MachinePrecision], If[LessEqual[t$95$2, -4e-303], t$95$3, If[LessEqual[t$95$2, 0.0], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+292], t$95$3, N[(z / 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}}\\
t_3 := \frac{t\_1}{a + 1}\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+246}:\\
\;\;\;\;\frac{z}{b}\\

\mathbf{elif}\;t\_2 \leq -4 \cdot 10^{-303}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 0:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_3\\

\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.00000000000000007e246 or 2e292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -3.99999999999999972e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-+.f6477.5

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

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

    if -3.99999999999999972e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 62.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6470.5

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

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

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

Alternative 3: 71.5% accurate, 0.2× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ t_2 := \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-303}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))))
        (t_2 (/ (fma z (/ y t) x) (+ a 1.0))))
   (if (<= t_1 -1e+246)
     (/ z b)
     (if (<= t_1 -4e-303)
       t_2
       (if (<= t_1 0.0)
         (/ x (+ 1.0 (fma y (/ b t) a)))
         (if (<= t_1 2e+292) t_2 (/ z b)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double t_2 = fma(z, (y / t), x) / (a + 1.0);
	double tmp;
	if (t_1 <= -1e+246) {
		tmp = z / b;
	} else if (t_1 <= -4e-303) {
		tmp = t_2;
	} else if (t_1 <= 0.0) {
		tmp = x / (1.0 + fma(y, (b / t), a));
	} else if (t_1 <= 2e+292) {
		tmp = t_2;
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	t_2 = Float64(fma(z, Float64(y / t), x) / Float64(a + 1.0))
	tmp = 0.0
	if (t_1 <= -1e+246)
		tmp = Float64(z / b);
	elseif (t_1 <= -4e-303)
		tmp = t_2;
	elseif (t_1 <= 0.0)
		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
	elseif (t_1 <= 2e+292)
		tmp = t_2;
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+246], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, -4e-303], t$95$2, If[LessEqual[t$95$1, 0.0], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+292], t$95$2, N[(z / b), $MachinePrecision]]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq -4 \cdot 10^{-303}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 0:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;t\_2\\

\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.00000000000000007e246 or 2e292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -3.99999999999999972e-303 or -0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    1. Initial program 99.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

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

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

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

    if -3.99999999999999972e-303 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -0.0

    1. Initial program 62.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6470.5

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

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

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

Alternative 4: 86.5% 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 -\infty:\\ \;\;\;\;z \cdot \frac{\frac{y}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{t\_1}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ x (/ (* y z) t))) (t_2 (/ t_1 (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_2 (- INFINITY))
     (* z (/ (/ y t) (+ 1.0 (fma y (/ b t) a))))
     (if (<= t_2 2e+292) (/ t_1 (fma (/ b t) y (+ a 1.0))) (/ z 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 <= -((double) INFINITY)) {
		tmp = z * ((y / t) / (1.0 + fma(y, (b / t), a)));
	} else if (t_2 <= 2e+292) {
		tmp = t_1 / fma((b / t), y, (a + 1.0));
	} else {
		tmp = z / 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 <= Float64(-Inf))
		tmp = Float64(z * Float64(Float64(y / t) / Float64(1.0 + fma(y, Float64(b / t), a))));
	elseif (t_2 <= 2e+292)
		tmp = Float64(t_1 / fma(Float64(b / t), y, Float64(a + 1.0)));
	else
		tmp = Float64(z / b);
	end
	return 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, (-Infinity)], N[(z * N[(N[(y / t), $MachinePrecision] / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 2e+292], N[(t$95$1 / N[(N[(b / t), $MachinePrecision] * y + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / 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 -\infty:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

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

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


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

    1. Initial program 37.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. lift-+.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right)} + \frac{y \cdot b}{t}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{\color{blue}{y \cdot b}}{t}} \]
      3. lift-/.f64N/A

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t} + \left(a + 1\right)}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t}} + \left(a + 1\right)} \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{b}{t} \cdot y} + \left(a + 1\right)} \]
      9. lower-fma.f64N/A

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
      2. lower-*.f64N/A

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

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

      \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} \cdot z}}{\frac{b}{t} \cdot y + \left(a + 1\right)} \]
      3. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y}{t}} \cdot z}{\frac{b}{t} \cdot y + \left(a + 1\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\frac{y}{t} \cdot z}{\color{blue}{\frac{b}{t}} \cdot y + \left(a + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{\frac{y}{t} \cdot z}{\frac{b}{t} \cdot y + \color{blue}{\left(a + 1\right)}} \]
      6. lift-fma.f64N/A

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

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

        \[\leadsto \color{blue}{z \cdot \frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      10. lower-/.f6475.7

        \[\leadsto z \cdot \color{blue}{\frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      11. lift-fma.f64N/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{\frac{b}{t} \cdot y + \left(a + 1\right)}} \]
      12. lift-+.f64N/A

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

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{\left(\frac{b}{t} \cdot y + a\right) + 1}} \]
      14. +-commutativeN/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{1 + \left(\frac{b}{t} \cdot y + a\right)}} \]
      15. lower-+.f64N/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{1 + \left(\frac{b}{t} \cdot y + a\right)}} \]
      16. *-commutativeN/A

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

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

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

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

    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. lift-+.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right)} + \frac{y \cdot b}{t}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{\color{blue}{y \cdot b}}{t}} \]
      3. lift-/.f64N/A

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t} + \left(a + 1\right)}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t}} + \left(a + 1\right)} \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{b}{t} \cdot y} + \left(a + 1\right)} \]
      9. lower-fma.f64N/A

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

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

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

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

    1. Initial program 14.6%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

Alternative 5: 82.4% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 -1e+246)
     (/ z b)
     (if (<= t_1 2e+292)
       (/ (fma (/ z t) y x) (fma b (/ y t) (+ a 1.0)))
       (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -1e+246) {
		tmp = z / b;
	} else if (t_1 <= 2e+292) {
		tmp = fma((z / t), y, x) / fma(b, (y / t), (a + 1.0));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= -1e+246)
		tmp = Float64(z / b);
	elseif (t_1 <= 2e+292)
		tmp = Float64(fma(Float64(z / t), y, x) / fma(b, Float64(y / t), Float64(a + 1.0)));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+246], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+292], N[(N[(N[(z / t), $MachinePrecision] * y + x), $MachinePrecision] / N[(b * N[(y / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\mathsf{fma}\left(b, \frac{y}{t}, a + 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))) < -1.00000000000000007e246 or 2e292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    5. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \frac{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}{\color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 6: 81.1% accurate, 0.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 -1e+246)
     (/ z b)
     (if (<= t_1 2e+292)
       (/ (fma y (/ z t) x) (fma y (/ b t) (+ a 1.0)))
       (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -1e+246) {
		tmp = z / b;
	} else if (t_1 <= 2e+292) {
		tmp = fma(y, (z / t), x) / fma(y, (b / t), (a + 1.0));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= -1e+246)
		tmp = Float64(z / b);
	elseif (t_1 <= 2e+292)
		tmp = Float64(fma(y, Float64(z / t), x) / fma(y, Float64(b / t), Float64(a + 1.0)));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+246], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+292], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(y * N[(b / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 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))) < -1.00000000000000007e246 or 2e292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

        \[\leadsto \frac{x + \color{blue}{\frac{y \cdot z}{t}}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{\color{blue}{x + \frac{y \cdot z}{t}}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-+.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right)} + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{\color{blue}{y \cdot b}}{t}} \]
      6. lift-/.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \color{blue}{\frac{y \cdot b}{t}}} \]
      7. lift-+.f64N/A

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

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}} \]
      9. lift-+.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      11. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      12. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      14. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      15. lower-/.f6488.1

        \[\leadsto \frac{\mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      16. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{\left(a + 1\right) + \frac{y \cdot b}{t}}} \]
      17. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{\frac{y \cdot b}{t} + \left(a + 1\right)}} \]
      18. lift-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{\frac{y \cdot b}{t}} + \left(a + 1\right)} \]
      19. lift-*.f64N/A

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

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{y \cdot \frac{b}{t}} + \left(a + 1\right)} \]
      21. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}} \]
      22. lower-/.f6486.7

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{\mathsf{fma}\left(y, \frac{b}{t}, a + 1\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 7: 64.3% accurate, 0.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+246}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t)))))
   (if (<= t_1 -1e+246)
     (/ z b)
     (if (<= t_1 2e+292) (/ x (+ 1.0 (fma y (/ b t) a))) (/ z b)))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = (x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t));
	double tmp;
	if (t_1 <= -1e+246) {
		tmp = z / b;
	} else if (t_1 <= 2e+292) {
		tmp = x / (1.0 + fma(y, (b / t), a));
	} else {
		tmp = z / b;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t)))
	tmp = 0.0
	if (t_1 <= -1e+246)
		tmp = Float64(z / b);
	elseif (t_1 <= 2e+292)
		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
	else
		tmp = Float64(z / b);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+246], N[(z / b), $MachinePrecision], If[LessEqual[t$95$1, 2e+292], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]]]
\begin{array}{l}

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

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+292}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\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))) < -1.00000000000000007e246 or 2e292 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t)))

    1. Initial program 22.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6477.6

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified77.6%

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

    if -1.00000000000000007e246 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 2e292

    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. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6467.2

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

      \[\leadsto \color{blue}{\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 8: 64.0% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := 1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)\\ \mathbf{if}\;t \leq -1.66 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\frac{a + 1}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\ \mathbf{elif}\;t \leq 10^{-152}:\\ \;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{t\_1}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+43}:\\ \;\;\;\;z \cdot \frac{\frac{y}{t}}{t\_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (+ 1.0 (fma y (/ b t) a))))
   (if (<= t -1.66e-25)
     (/ 1.0 (/ (+ a 1.0) (fma y (/ z t) x)))
     (if (<= t 1e-152)
       (* z (fma t (/ x (* (* y z) b)) (/ 1.0 b)))
       (if (<= t 6.4e-50)
         (/ x t_1)
         (if (<= t 2.7e+43)
           (* z (/ (/ y t) t_1))
           (/ (fma z (/ y t) x) (+ a 1.0))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = 1.0 + fma(y, (b / t), a);
	double tmp;
	if (t <= -1.66e-25) {
		tmp = 1.0 / ((a + 1.0) / fma(y, (z / t), x));
	} else if (t <= 1e-152) {
		tmp = z * fma(t, (x / ((y * z) * b)), (1.0 / b));
	} else if (t <= 6.4e-50) {
		tmp = x / t_1;
	} else if (t <= 2.7e+43) {
		tmp = z * ((y / t) / t_1);
	} else {
		tmp = fma(z, (y / t), x) / (a + 1.0);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(1.0 + fma(y, Float64(b / t), a))
	tmp = 0.0
	if (t <= -1.66e-25)
		tmp = Float64(1.0 / Float64(Float64(a + 1.0) / fma(y, Float64(z / t), x)));
	elseif (t <= 1e-152)
		tmp = Float64(z * fma(t, Float64(x / Float64(Float64(y * z) * b)), Float64(1.0 / b)));
	elseif (t <= 6.4e-50)
		tmp = Float64(x / t_1);
	elseif (t <= 2.7e+43)
		tmp = Float64(z * Float64(Float64(y / t) / t_1));
	else
		tmp = Float64(fma(z, Float64(y / t), x) / Float64(a + 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.66e-25], N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] / N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1e-152], N[(z * N[(t * N[(x / N[(N[(y * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 6.4e-50], N[(x / t$95$1), $MachinePrecision], If[LessEqual[t, 2.7e+43], N[(z * N[(N[(y / t), $MachinePrecision] / t$95$1), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 10^{-152}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\

\mathbf{elif}\;t \leq 6.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{t\_1}\\

\mathbf{elif}\;t \leq 2.7 \cdot 10^{+43}:\\
\;\;\;\;z \cdot \frac{\frac{y}{t}}{t\_1}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\


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

    1. Initial program 85.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + a} \]
      7. lower-+.f6487.1

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{1 + a}} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\frac{y}{t}} + x}{1 + a} \]
      2. lift-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{1 + a}} \]
      4. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      6. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{1 + a}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      9. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{z \cdot \frac{y}{t} + x}}} \]
      10. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{z \cdot \color{blue}{\frac{y}{t}} + x}} \]
      11. associate-*r/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z \cdot y}{t}} + x}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y} + x}} \]
      13. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t}} \cdot y + x}} \]
      14. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      15. lower-/.f6488.0

        \[\leadsto \frac{1}{\color{blue}{\frac{a + 1}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y + x}}} \]
      17. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{y \cdot \frac{z}{t}} + x}} \]
      18. lower-fma.f6488.0

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

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

    if -1.6599999999999999e-25 < t < 1.00000000000000007e-152

    1. Initial program 62.7%

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

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6441.4

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(\frac{1}{b} + \frac{t \cdot x}{b \cdot \left(y \cdot z\right)}\right)} \]
      2. +-commutativeN/A

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

        \[\leadsto z \cdot \left(\color{blue}{t \cdot \frac{x}{b \cdot \left(y \cdot z\right)}} + \frac{1}{b}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(t, \frac{x}{b \cdot \left(y \cdot z\right)}, \frac{1}{b}\right)} \]
      5. lower-/.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \color{blue}{\frac{x}{b \cdot \left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \frac{x}{\color{blue}{b \cdot \left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      7. lower-*.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \frac{x}{b \cdot \color{blue}{\left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      8. lower-/.f6463.8

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

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

    if 1.00000000000000007e-152 < t < 6.4e-50

    1. Initial program 88.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6481.9

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

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

    if 6.4e-50 < t < 2.7000000000000002e43

    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. lift-+.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\left(a + 1\right)} + \frac{y \cdot b}{t}} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{\color{blue}{y \cdot b}}{t}} \]
      3. lift-/.f64N/A

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t} + \left(a + 1\right)}} \]
      5. lift-/.f64N/A

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{y \cdot b}{t}} + \left(a + 1\right)} \]
      6. lift-*.f64N/A

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

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

        \[\leadsto \frac{x + \frac{y \cdot z}{t}}{\color{blue}{\frac{b}{t} \cdot y} + \left(a + 1\right)} \]
      9. lower-fma.f64N/A

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

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

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

      \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
    6. Step-by-step derivation
      1. associate-/l*N/A

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
      2. lower-*.f64N/A

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

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

      \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)} \]
    8. Step-by-step derivation
      1. associate-*r/N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y}{t} \cdot z}}{\frac{b}{t} \cdot y + \left(a + 1\right)} \]
      3. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y}{t}} \cdot z}{\frac{b}{t} \cdot y + \left(a + 1\right)} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\frac{y}{t} \cdot z}{\color{blue}{\frac{b}{t}} \cdot y + \left(a + 1\right)} \]
      5. lift-+.f64N/A

        \[\leadsto \frac{\frac{y}{t} \cdot z}{\frac{b}{t} \cdot y + \color{blue}{\left(a + 1\right)}} \]
      6. lift-fma.f64N/A

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

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

        \[\leadsto \color{blue}{z \cdot \frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      9. lower-*.f64N/A

        \[\leadsto \color{blue}{z \cdot \frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      10. lower-/.f6479.0

        \[\leadsto z \cdot \color{blue}{\frac{\frac{y}{t}}{\mathsf{fma}\left(\frac{b}{t}, y, a + 1\right)}} \]
      11. lift-fma.f64N/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{\frac{b}{t} \cdot y + \left(a + 1\right)}} \]
      12. lift-+.f64N/A

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

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{\left(\frac{b}{t} \cdot y + a\right) + 1}} \]
      14. +-commutativeN/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{1 + \left(\frac{b}{t} \cdot y + a\right)}} \]
      15. lower-+.f64N/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{\color{blue}{1 + \left(\frac{b}{t} \cdot y + a\right)}} \]
      16. *-commutativeN/A

        \[\leadsto z \cdot \frac{\frac{y}{t}}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      17. lower-fma.f6479.0

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

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

    if 2.7000000000000002e43 < t

    1. Initial program 89.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + a} \]
      7. lower-+.f6482.7

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{1 + a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.66 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\frac{a + 1}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\ \mathbf{elif}\;t \leq 10^{-152}:\\ \;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\ \mathbf{elif}\;t \leq 6.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t \leq 2.7 \cdot 10^{+43}:\\ \;\;\;\;z \cdot \frac{\frac{y}{t}}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 9: 64.1% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;t \leq -1.66 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\frac{a + 1}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\ \mathbf{elif}\;t \leq 1.96 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= t -1.66e-25)
   (/ 1.0 (/ (+ a 1.0) (fma y (/ z t) x)))
   (if (<= t 4.6e-150)
     (* z (fma t (/ x (* (* y z) b)) (/ 1.0 b)))
     (if (<= t 1.96e-50)
       (/ x (+ 1.0 (fma y (/ b t) a)))
       (if (<= t 4.6e+35)
         (/ (* y z) (fma t (fma b (/ y t) a) t))
         (/ (fma z (/ y t) x) (+ a 1.0)))))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if (t <= -1.66e-25) {
		tmp = 1.0 / ((a + 1.0) / fma(y, (z / t), x));
	} else if (t <= 4.6e-150) {
		tmp = z * fma(t, (x / ((y * z) * b)), (1.0 / b));
	} else if (t <= 1.96e-50) {
		tmp = x / (1.0 + fma(y, (b / t), a));
	} else if (t <= 4.6e+35) {
		tmp = (y * z) / fma(t, fma(b, (y / t), a), t);
	} else {
		tmp = fma(z, (y / t), x) / (a + 1.0);
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (t <= -1.66e-25)
		tmp = Float64(1.0 / Float64(Float64(a + 1.0) / fma(y, Float64(z / t), x)));
	elseif (t <= 4.6e-150)
		tmp = Float64(z * fma(t, Float64(x / Float64(Float64(y * z) * b)), Float64(1.0 / b)));
	elseif (t <= 1.96e-50)
		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
	elseif (t <= 4.6e+35)
		tmp = Float64(Float64(y * z) / fma(t, fma(b, Float64(y / t), a), t));
	else
		tmp = Float64(fma(z, Float64(y / t), x) / Float64(a + 1.0));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[t, -1.66e-25], N[(1.0 / N[(N[(a + 1.0), $MachinePrecision] / N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e-150], N[(z * N[(t * N[(x / N[(N[(y * z), $MachinePrecision] * b), $MachinePrecision]), $MachinePrecision] + N[(1.0 / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.96e-50], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+35], N[(N[(y * z), $MachinePrecision] / N[(t * N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;t \leq -1.66 \cdot 10^{-25}:\\
\;\;\;\;\frac{1}{\frac{a + 1}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{-150}:\\
\;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\

\mathbf{elif}\;t \leq 1.96 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\


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

    1. Initial program 85.5%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + a} \]
      7. lower-+.f6487.1

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{1 + a}} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\frac{y}{t}} + x}{1 + a} \]
      2. lift-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{1 + a}} \]
      4. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      6. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{1 + a}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      9. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{z \cdot \frac{y}{t} + x}}} \]
      10. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{z \cdot \color{blue}{\frac{y}{t}} + x}} \]
      11. associate-*r/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z \cdot y}{t}} + x}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y} + x}} \]
      13. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t}} \cdot y + x}} \]
      14. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      15. lower-/.f6488.0

        \[\leadsto \frac{1}{\color{blue}{\frac{a + 1}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y + x}}} \]
      17. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{y \cdot \frac{z}{t}} + x}} \]
      18. lower-fma.f6488.0

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

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

    if -1.6599999999999999e-25 < t < 4.60000000000000006e-150

    1. Initial program 62.7%

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

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6441.4

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

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

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

        \[\leadsto \color{blue}{z \cdot \left(\frac{1}{b} + \frac{t \cdot x}{b \cdot \left(y \cdot z\right)}\right)} \]
      2. +-commutativeN/A

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

        \[\leadsto z \cdot \left(\color{blue}{t \cdot \frac{x}{b \cdot \left(y \cdot z\right)}} + \frac{1}{b}\right) \]
      4. lower-fma.f64N/A

        \[\leadsto z \cdot \color{blue}{\mathsf{fma}\left(t, \frac{x}{b \cdot \left(y \cdot z\right)}, \frac{1}{b}\right)} \]
      5. lower-/.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \color{blue}{\frac{x}{b \cdot \left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      6. lower-*.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \frac{x}{\color{blue}{b \cdot \left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      7. lower-*.f64N/A

        \[\leadsto z \cdot \mathsf{fma}\left(t, \frac{x}{b \cdot \color{blue}{\left(y \cdot z\right)}}, \frac{1}{b}\right) \]
      8. lower-/.f6463.8

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

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

    if 4.60000000000000006e-150 < t < 1.9599999999999999e-50

    1. Initial program 88.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6481.9

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

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

    if 1.9599999999999999e-50 < t < 4.5999999999999996e35

    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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. lower-*.f64N/A

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

        \[\leadsto \frac{y \cdot z}{t \cdot \color{blue}{\left(\left(a + \frac{b \cdot y}{t}\right) + 1\right)}} \]
      4. distribute-lft-inN/A

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot \left(a + \frac{b \cdot y}{t}\right) + t \cdot 1}} \]
      5. *-rgt-identityN/A

        \[\leadsto \frac{y \cdot z}{t \cdot \left(a + \frac{b \cdot y}{t}\right) + \color{blue}{t}} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{y \cdot z}{\color{blue}{\mathsf{fma}\left(t, a + \frac{b \cdot y}{t}, t\right)}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{\frac{b \cdot y}{t} + a}, t\right)} \]
      8. associate-/l*N/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{b \cdot \frac{y}{t}} + a, t\right)} \]
      9. lower-fma.f64N/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}, t\right)} \]
      10. lower-/.f6478.8

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

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

    if 4.5999999999999996e35 < t

    1. Initial program 89.2%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + a} \]
      7. lower-+.f6482.7

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{1 + a}} \]
  3. Recombined 5 regimes into one program.
  4. Final simplification77.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.66 \cdot 10^{-25}:\\ \;\;\;\;\frac{1}{\frac{a + 1}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{-150}:\\ \;\;\;\;z \cdot \mathsf{fma}\left(t, \frac{x}{\left(y \cdot z\right) \cdot b}, \frac{1}{b}\right)\\ \mathbf{elif}\;t \leq 1.96 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 10: 63.6% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \mathbf{if}\;t \leq -1.58 \cdot 10^{-86}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 10^{-148}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ (fma z (/ y t) x) (+ a 1.0))))
   (if (<= t -1.58e-86)
     t_1
     (if (<= t 1e-148)
       (/ (fma x t (* y z)) (* y b))
       (if (<= t 4.4e-50)
         (/ x (+ 1.0 (fma y (/ b t) a)))
         (if (<= t 4.6e+35) (/ (* y z) (fma t (fma b (/ y t) a) t)) t_1))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(z, (y / t), x) / (a + 1.0);
	double tmp;
	if (t <= -1.58e-86) {
		tmp = t_1;
	} else if (t <= 1e-148) {
		tmp = fma(x, t, (y * z)) / (y * b);
	} else if (t <= 4.4e-50) {
		tmp = x / (1.0 + fma(y, (b / t), a));
	} else if (t <= 4.6e+35) {
		tmp = (y * z) / fma(t, fma(b, (y / t), a), t);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(fma(z, Float64(y / t), x) / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.58e-86)
		tmp = t_1;
	elseif (t <= 1e-148)
		tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b));
	elseif (t <= 4.4e-50)
		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
	elseif (t <= 4.6e+35)
		tmp = Float64(Float64(y * z) / fma(t, fma(b, Float64(y / t), a), t));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.58e-86], t$95$1, If[LessEqual[t, 1e-148], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.4e-50], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 4.6e+35], N[(N[(y * z), $MachinePrecision] / N[(t * N[(b * N[(y / t), $MachinePrecision] + a), $MachinePrecision] + t), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 10^{-148}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\

\mathbf{elif}\;t \leq 4.4 \cdot 10^{-50}:\\
\;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\

\mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\
\;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -1.58000000000000007e-86 or 4.5999999999999996e35 < t

    1. Initial program 83.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

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

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

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

    if -1.58000000000000007e-86 < t < 9.99999999999999936e-149

    1. Initial program 64.0%

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

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6445.7

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t} + y \cdot z}{b \cdot y} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
      3. lower-*.f6467.9

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

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

    if 9.99999999999999936e-149 < t < 4.3999999999999998e-50

    1. Initial program 88.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in x around inf

      \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      2. lower-+.f64N/A

        \[\leadsto \frac{x}{\color{blue}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
      3. +-commutativeN/A

        \[\leadsto \frac{x}{1 + \color{blue}{\left(\frac{b \cdot y}{t} + a\right)}} \]
      4. *-commutativeN/A

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

        \[\leadsto \frac{x}{1 + \left(\color{blue}{y \cdot \frac{b}{t}} + a\right)} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{x}{1 + \color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, a\right)}} \]
      7. lower-/.f6481.9

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

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

    if 4.3999999999999998e-50 < t < 4.5999999999999996e35

    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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. lower-*.f64N/A

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

        \[\leadsto \frac{y \cdot z}{t \cdot \color{blue}{\left(\left(a + \frac{b \cdot y}{t}\right) + 1\right)}} \]
      4. distribute-lft-inN/A

        \[\leadsto \frac{y \cdot z}{\color{blue}{t \cdot \left(a + \frac{b \cdot y}{t}\right) + t \cdot 1}} \]
      5. *-rgt-identityN/A

        \[\leadsto \frac{y \cdot z}{t \cdot \left(a + \frac{b \cdot y}{t}\right) + \color{blue}{t}} \]
      6. lower-fma.f64N/A

        \[\leadsto \frac{y \cdot z}{\color{blue}{\mathsf{fma}\left(t, a + \frac{b \cdot y}{t}, t\right)}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{\frac{b \cdot y}{t} + a}, t\right)} \]
      8. associate-/l*N/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{b \cdot \frac{y}{t}} + a, t\right)} \]
      9. lower-fma.f64N/A

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(t, \color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, a\right)}, t\right)} \]
      10. lower-/.f6478.8

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

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.58 \cdot 10^{-86}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \mathbf{elif}\;t \leq 10^{-148}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;t \leq 4.4 \cdot 10^{-50}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;t \leq 4.6 \cdot 10^{+35}:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(t, \mathsf{fma}\left(b, \frac{y}{t}, a\right), t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 11: 55.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ t_2 := \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\ \mathbf{if}\;a \leq -1.92:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-172}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-294}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;a \leq 0.66:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (fma b (/ y t) 1.0))) (t_2 (/ (fma z (/ y t) x) a)))
   (if (<= a -1.92)
     t_2
     (if (<= a -3.9e-172)
       t_1
       (if (<= a 1.3e-294)
         (/ (fma x t (* y z)) (* y b))
         (if (<= a 0.66) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / fma(b, (y / t), 1.0);
	double t_2 = fma(z, (y / t), x) / a;
	double tmp;
	if (a <= -1.92) {
		tmp = t_2;
	} else if (a <= -3.9e-172) {
		tmp = t_1;
	} else if (a <= 1.3e-294) {
		tmp = fma(x, t, (y * z)) / (y * b);
	} else if (a <= 0.66) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x / fma(b, Float64(y / t), 1.0))
	t_2 = Float64(fma(z, Float64(y / t), x) / a)
	tmp = 0.0
	if (a <= -1.92)
		tmp = t_2;
	elseif (a <= -3.9e-172)
		tmp = t_1;
	elseif (a <= 1.3e-294)
		tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b));
	elseif (a <= 0.66)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(b * N[(y / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(z * N[(y / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.92], t$95$2, If[LessEqual[a, -3.9e-172], t$95$1, If[LessEqual[a, 1.3e-294], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 0.66], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -3.9 \cdot 10^{-172}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.3 \cdot 10^{-294}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\

\mathbf{elif}\;a \leq 0.66:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 80.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around inf

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{a} \]
      6. lower-/.f6468.9

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

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

    if -1.9199999999999999 < a < -3.89999999999999973e-172 or 1.3e-294 < a < 0.660000000000000031

    1. Initial program 79.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{b \cdot y}{t}}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{b \cdot y}{t}}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + \frac{b \cdot y}{t}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + \frac{b \cdot y}{t}} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + \frac{b \cdot y}{t}} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + \frac{b \cdot y}{t}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{\frac{b \cdot y}{t} + 1}} \]
      8. *-commutativeN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{y \cdot \frac{b}{t}} + 1} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
      11. lower-/.f6476.5

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\frac{b \cdot y}{t} + 1}} \]
      3. associate-/l*N/A

        \[\leadsto \frac{x}{\color{blue}{b \cdot \frac{y}{t}} + 1} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}} \]
      5. lower-/.f6461.6

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

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

    if -3.89999999999999973e-172 < a < 1.3e-294

    1. Initial program 69.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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6451.4

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t} + y \cdot z}{b \cdot y} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
      3. lower-*.f6468.3

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification66.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.92:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\ \mathbf{elif}\;a \leq -3.9 \cdot 10^{-172}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ \mathbf{elif}\;a \leq 1.3 \cdot 10^{-294}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;a \leq 0.66:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 12: 54.7% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ t_2 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{if}\;a \leq -1.1:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-174}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-294}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;a \leq 70:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (fma b (/ y t) 1.0))) (t_2 (/ (fma y (/ z t) x) a)))
   (if (<= a -1.1)
     t_2
     (if (<= a -5.2e-174)
       t_1
       (if (<= a 1.05e-294)
         (/ (fma x t (* y z)) (* y b))
         (if (<= a 70.0) t_1 t_2))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / fma(b, (y / t), 1.0);
	double t_2 = fma(y, (z / t), x) / a;
	double tmp;
	if (a <= -1.1) {
		tmp = t_2;
	} else if (a <= -5.2e-174) {
		tmp = t_1;
	} else if (a <= 1.05e-294) {
		tmp = fma(x, t, (y * z)) / (y * b);
	} else if (a <= 70.0) {
		tmp = t_1;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x / fma(b, Float64(y / t), 1.0))
	t_2 = Float64(fma(y, Float64(z / t), x) / a)
	tmp = 0.0
	if (a <= -1.1)
		tmp = t_2;
	elseif (a <= -5.2e-174)
		tmp = t_1;
	elseif (a <= 1.05e-294)
		tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b));
	elseif (a <= 70.0)
		tmp = t_1;
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(b * N[(y / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / a), $MachinePrecision]}, If[LessEqual[a, -1.1], t$95$2, If[LessEqual[a, -5.2e-174], t$95$1, If[LessEqual[a, 1.05e-294], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 70.0], t$95$1, t$95$2]]]]]]
\begin{array}{l}

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

\mathbf{elif}\;a \leq -5.2 \cdot 10^{-174}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;a \leq 1.05 \cdot 10^{-294}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\

\mathbf{elif}\;a \leq 70:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 80.0%

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

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{a}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{a} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{a} \]
      5. lower-/.f6466.8

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

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

    if -1.1000000000000001 < a < -5.2000000000000004e-174 or 1.04999999999999992e-294 < a < 70

    1. Initial program 79.8%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in a around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{b \cdot y}{t}}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + \frac{b \cdot y}{t}}} \]
      2. +-commutativeN/A

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

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + \frac{b \cdot y}{t}} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + \frac{b \cdot y}{t}} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + \frac{b \cdot y}{t}} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + \frac{b \cdot y}{t}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{\frac{b \cdot y}{t} + 1}} \]
      8. *-commutativeN/A

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

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{y \cdot \frac{b}{t}} + 1} \]
      10. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{\mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
      11. lower-/.f6476.5

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

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

      \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
    7. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{x}{\color{blue}{\frac{b \cdot y}{t} + 1}} \]
      3. associate-/l*N/A

        \[\leadsto \frac{x}{\color{blue}{b \cdot \frac{y}{t}} + 1} \]
      4. lower-fma.f64N/A

        \[\leadsto \frac{x}{\color{blue}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}} \]
      5. lower-/.f6461.6

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

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

    if -5.2000000000000004e-174 < a < 1.04999999999999992e-294

    1. Initial program 69.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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6451.4

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t} + y \cdot z}{b \cdot y} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
      3. lower-*.f6468.3

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification65.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -1.1:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \mathbf{elif}\;a \leq -5.2 \cdot 10^{-174}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ \mathbf{elif}\;a \leq 1.05 \cdot 10^{-294}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;a \leq 70:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a}\\ \end{array} \]
  5. Add Preprocessing

Alternative 13: 41.4% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(x, -a, x\right)\\ \mathbf{if}\;a \leq -8.8 \cdot 10^{-7}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq -2.95 \cdot 10^{-176}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.1 \cdot 10^{-225}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;a \leq 1.8 \cdot 10^{-22}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;a \leq 1.15 \cdot 10^{+55}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (fma x (- a) x)))
   (if (<= a -8.8e-7)
     (/ x a)
     (if (<= a -2.95e-176)
       t_1
       (if (<= a 1.1e-225)
         (/ z b)
         (if (<= a 1.8e-22) t_1 (if (<= a 1.15e+55) (/ z b) (/ x a))))))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = fma(x, -a, x);
	double tmp;
	if (a <= -8.8e-7) {
		tmp = x / a;
	} else if (a <= -2.95e-176) {
		tmp = t_1;
	} else if (a <= 1.1e-225) {
		tmp = z / b;
	} else if (a <= 1.8e-22) {
		tmp = t_1;
	} else if (a <= 1.15e+55) {
		tmp = z / b;
	} else {
		tmp = x / a;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = fma(x, Float64(-a), x)
	tmp = 0.0
	if (a <= -8.8e-7)
		tmp = Float64(x / a);
	elseif (a <= -2.95e-176)
		tmp = t_1;
	elseif (a <= 1.1e-225)
		tmp = Float64(z / b);
	elseif (a <= 1.8e-22)
		tmp = t_1;
	elseif (a <= 1.15e+55)
		tmp = Float64(z / b);
	else
		tmp = Float64(x / a);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x * (-a) + x), $MachinePrecision]}, If[LessEqual[a, -8.8e-7], N[(x / a), $MachinePrecision], If[LessEqual[a, -2.95e-176], t$95$1, If[LessEqual[a, 1.1e-225], N[(z / b), $MachinePrecision], If[LessEqual[a, 1.8e-22], t$95$1, If[LessEqual[a, 1.15e+55], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(x, -a, x\right)\\
\mathbf{if}\;a \leq -8.8 \cdot 10^{-7}:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a \leq -2.95 \cdot 10^{-176}:\\
\;\;\;\;t\_1\\

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

\mathbf{elif}\;a \leq 1.8 \cdot 10^{-22}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if a < -8.8000000000000004e-7 or 1.14999999999999994e55 < a

    1. Initial program 79.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6452.8

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified52.8%

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

      \[\leadsto \color{blue}{\frac{x}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f6452.5

        \[\leadsto \color{blue}{\frac{x}{a}} \]
    8. Simplified52.5%

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

    if -8.8000000000000004e-7 < a < -2.9499999999999998e-176 or 1.1e-225 < a < 1.7999999999999999e-22

    1. Initial program 83.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6451.0

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified51.0%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) + x \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(a\right)\right)} + x \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot a\right)} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot a, x\right)} \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(a\right)}, x\right) \]
      8. lower-neg.f6451.0

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{-a}, x\right) \]
    8. Simplified51.0%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, -a, x\right)} \]

    if -2.9499999999999998e-176 < a < 1.1e-225 or 1.7999999999999999e-22 < a < 1.14999999999999994e55

    1. Initial program 71.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6453.1

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified53.1%

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

Alternative 14: 53.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(t, a, t\right)}\\ \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 -2.8e-18)
     t_1
     (if (<= t 2.6e-128)
       (/ z b)
       (if (<= t 4e+92) (* y (/ z (fma t a t))) 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 <= -2.8e-18) {
		tmp = t_1;
	} else if (t <= 2.6e-128) {
		tmp = z / b;
	} else if (t <= 4e+92) {
		tmp = y * (z / fma(t, a, t));
	} 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 <= -2.8e-18)
		tmp = t_1;
	elseif (t <= 2.6e-128)
		tmp = Float64(z / b);
	elseif (t <= 4e+92)
		tmp = Float64(y * Float64(z / fma(t, a, t)));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(x / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-18], t$95$1, If[LessEqual[t, 2.6e-128], N[(z / b), $MachinePrecision], If[LessEqual[t, 4e+92], N[(y * N[(z / N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
\begin{array}{l}

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

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

\mathbf{elif}\;t \leq 4 \cdot 10^{+92}:\\
\;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(t, a, t\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if t < -2.80000000000000012e-18 or 4.0000000000000002e92 < t

    1. Initial program 88.0%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6471.5

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified71.5%

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

    if -2.80000000000000012e-18 < t < 2.59999999999999981e-128

    1. Initial program 63.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6460.0

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified60.0%

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

    if 2.59999999999999981e-128 < t < 4.0000000000000002e92

    1. Initial program 88.3%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in b around 0

      \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x + \frac{y \cdot z}{t}}{1 + a}} \]
      2. +-commutativeN/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{1 + a} \]
      3. *-commutativeN/A

        \[\leadsto \frac{\frac{\color{blue}{z \cdot y}}{t} + x}{1 + a} \]
      4. associate-*r/N/A

        \[\leadsto \frac{\color{blue}{z \cdot \frac{y}{t}} + x}{1 + a} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \color{blue}{\frac{y}{t}}, x\right)}{1 + a} \]
      7. lower-+.f6456.7

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{1 + a}} \]
    6. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{z \cdot \color{blue}{\frac{y}{t}} + x}{1 + a} \]
      2. lift-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}{1 + a} \]
      3. lift-+.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}{\color{blue}{1 + a}} \]
      4. clear-numN/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{1}{\frac{1 + a}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}}} \]
      6. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{1 + a}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      7. +-commutativeN/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      8. lift-+.f64N/A

        \[\leadsto \frac{1}{\frac{\color{blue}{a + 1}}{\mathsf{fma}\left(z, \frac{y}{t}, x\right)}} \]
      9. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{z \cdot \frac{y}{t} + x}}} \]
      10. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{z \cdot \color{blue}{\frac{y}{t}} + x}} \]
      11. associate-*r/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z \cdot y}{t}} + x}} \]
      12. associate-*l/N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y} + x}} \]
      13. lift-/.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t}} \cdot y + x}} \]
      14. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      15. lower-/.f6456.0

        \[\leadsto \frac{1}{\color{blue}{\frac{a + 1}{\mathsf{fma}\left(\frac{z}{t}, y, x\right)}}} \]
      16. lift-fma.f64N/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{\frac{z}{t} \cdot y + x}}} \]
      17. *-commutativeN/A

        \[\leadsto \frac{1}{\frac{a + 1}{\color{blue}{y \cdot \frac{z}{t}} + x}} \]
      18. lower-fma.f6456.0

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

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

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

        \[\leadsto \color{blue}{y \cdot \frac{z}{t \cdot \left(1 + a\right)}} \]
      2. lower-*.f64N/A

        \[\leadsto \color{blue}{y \cdot \frac{z}{t \cdot \left(1 + a\right)}} \]
      3. lower-/.f64N/A

        \[\leadsto y \cdot \color{blue}{\frac{z}{t \cdot \left(1 + a\right)}} \]
      4. +-commutativeN/A

        \[\leadsto y \cdot \frac{z}{t \cdot \color{blue}{\left(a + 1\right)}} \]
      5. distribute-lft-inN/A

        \[\leadsto y \cdot \frac{z}{\color{blue}{t \cdot a + t \cdot 1}} \]
      6. *-rgt-identityN/A

        \[\leadsto y \cdot \frac{z}{t \cdot a + \color{blue}{t}} \]
      7. lower-fma.f6444.8

        \[\leadsto y \cdot \frac{z}{\color{blue}{\mathsf{fma}\left(t, a, t\right)}} \]
    10. Simplified44.8%

      \[\leadsto \color{blue}{y \cdot \frac{z}{\mathsf{fma}\left(t, a, t\right)}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification62.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{-18}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 2.6 \cdot 10^{-128}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{elif}\;t \leq 4 \cdot 10^{+92}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(t, a, t\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
  5. Add Preprocessing

Alternative 15: 54.8% accurate, 1.3× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -1.9 \cdot 10^{-38}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.4 \cdot 10^{+20}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (let* ((t_1 (/ x (+ a 1.0))))
   (if (<= t -1.9e-38)
     t_1
     (if (<= t 2.4e+20) (/ (fma x t (* y z)) (* y b)) t_1))))
double code(double x, double y, double z, double t, double a, double b) {
	double t_1 = x / (a + 1.0);
	double tmp;
	if (t <= -1.9e-38) {
		tmp = t_1;
	} else if (t <= 2.4e+20) {
		tmp = fma(x, t, (y * z)) / (y * b);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	t_1 = Float64(x / Float64(a + 1.0))
	tmp = 0.0
	if (t <= -1.9e-38)
		tmp = t_1;
	elseif (t <= 2.4e+20)
		tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b));
	else
		tmp = t_1;
	end
	return 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.9e-38], t$95$1, If[LessEqual[t, 2.4e+20], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}

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

\mathbf{elif}\;t \leq 2.4 \cdot 10^{+20}:\\
\;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -1.9e-38 or 2.4e20 < t

    1. Initial program 85.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6464.6

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified64.6%

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

    if -1.9e-38 < t < 2.4e20

    1. Initial program 71.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. lift-*.f64N/A

        \[\leadsto \frac{x + \frac{\color{blue}{y \cdot z}}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      2. lift-/.f64N/A

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

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t} + x}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. lift-/.f64N/A

        \[\leadsto \frac{\color{blue}{\frac{y \cdot z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      5. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\frac{z}{t} \cdot y} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      8. lower-fma.f64N/A

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

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

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

      \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
    6. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
      2. lower-*.f64N/A

        \[\leadsto \frac{\color{blue}{t \cdot \left(x + \frac{y \cdot z}{t}\right)}}{b \cdot y} \]
      3. +-commutativeN/A

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

        \[\leadsto \frac{t \cdot \left(\color{blue}{y \cdot \frac{z}{t}} + x\right)}{b \cdot y} \]
      5. lower-fma.f64N/A

        \[\leadsto \frac{t \cdot \color{blue}{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}}{b \cdot y} \]
      6. lower-/.f64N/A

        \[\leadsto \frac{t \cdot \mathsf{fma}\left(y, \color{blue}{\frac{z}{t}}, x\right)}{b \cdot y} \]
      7. lower-*.f6443.6

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

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

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

        \[\leadsto \frac{\color{blue}{x \cdot t} + y \cdot z}{b \cdot y} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
      3. lower-*.f6457.8

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

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(x, t, y \cdot z\right)}}{b \cdot y} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification61.4%

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

Alternative 16: 41.1% accurate, 1.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a + 1 \leq 0.9999995:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a + 1 \leq 2:\\ \;\;\;\;\mathsf{fma}\left(x, -a, x\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
(FPCore (x y z t a b)
 :precision binary64
 (if (<= (+ a 1.0) 0.9999995)
   (/ x a)
   (if (<= (+ a 1.0) 2.0) (fma x (- a) x) (/ x a))))
double code(double x, double y, double z, double t, double a, double b) {
	double tmp;
	if ((a + 1.0) <= 0.9999995) {
		tmp = x / a;
	} else if ((a + 1.0) <= 2.0) {
		tmp = fma(x, -a, x);
	} else {
		tmp = x / a;
	}
	return tmp;
}
function code(x, y, z, t, a, b)
	tmp = 0.0
	if (Float64(a + 1.0) <= 0.9999995)
		tmp = Float64(x / a);
	elseif (Float64(a + 1.0) <= 2.0)
		tmp = fma(x, Float64(-a), x);
	else
		tmp = Float64(x / a);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], 0.9999995], N[(x / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], N[(x * (-a) + x), $MachinePrecision], N[(x / a), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;a + 1 \leq 0.9999995:\\
\;\;\;\;\frac{x}{a}\\

\mathbf{elif}\;a + 1 \leq 2:\\
\;\;\;\;\mathsf{fma}\left(x, -a, x\right)\\

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


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

    1. Initial program 79.4%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6452.0

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified52.0%

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

      \[\leadsto \color{blue}{\frac{x}{a}} \]
    7. Step-by-step derivation
      1. lower-/.f6451.1

        \[\leadsto \color{blue}{\frac{x}{a}} \]
    8. Simplified51.1%

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

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

    1. Initial program 78.1%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6439.2

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified39.2%

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

      \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
    7. Step-by-step derivation
      1. +-commutativeN/A

        \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right) + x} \]
      2. mul-1-negN/A

        \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + x \]
      3. *-commutativeN/A

        \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) + x \]
      4. distribute-rgt-neg-inN/A

        \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(a\right)\right)} + x \]
      5. mul-1-negN/A

        \[\leadsto x \cdot \color{blue}{\left(-1 \cdot a\right)} + x \]
      6. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot a, x\right)} \]
      7. mul-1-negN/A

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(a\right)}, x\right) \]
      8. lower-neg.f6439.2

        \[\leadsto \mathsf{fma}\left(x, \color{blue}{-a}, x\right) \]
    8. Simplified39.2%

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, -a, x\right)} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 17: 55.6% accurate, 2.0× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if t < -3.4000000000000002e-19 or 1.3000000000000001e36 < t

    1. Initial program 87.7%

      \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
    2. Add Preprocessing
    3. Taylor expanded in y around 0

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    4. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
      2. lower-+.f6467.5

        \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
    5. Simplified67.5%

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

    if -3.4000000000000002e-19 < t < 1.3000000000000001e36

    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. Taylor expanded in y around inf

      \[\leadsto \color{blue}{\frac{z}{b}} \]
    4. Step-by-step derivation
      1. lower-/.f6453.5

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified53.5%

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

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

Alternative 18: 19.5% accurate, 5.9× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(x, -a, x\right) \end{array} \]
(FPCore (x y z t a b) :precision binary64 (fma x (- a) x))
double code(double x, double y, double z, double t, double a, double b) {
	return fma(x, -a, x);
}
function code(x, y, z, t, a, b)
	return fma(x, Float64(-a), x)
end
code[x_, y_, z_, t_, a_, b_] := N[(x * (-a) + x), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(x, -a, x\right)
\end{array}
Derivation
  1. Initial program 78.8%

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  4. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    2. lower-+.f6445.7

      \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
  5. Simplified45.7%

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

    \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
  7. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right) + x} \]
    2. mul-1-negN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + x \]
    3. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) + x \]
    4. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(a\right)\right)} + x \]
    5. mul-1-negN/A

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot a\right)} + x \]
    6. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot a, x\right)} \]
    7. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(a\right)}, x\right) \]
    8. lower-neg.f6420.4

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{-a}, x\right) \]
  8. Simplified20.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, -a, x\right)} \]
  9. Add Preprocessing

Alternative 19: 4.1% accurate, 6.6× speedup?

\[\begin{array}{l} \\ x \cdot \left(-a\right) \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 * Float64(-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}

\\
x \cdot \left(-a\right)
\end{array}
Derivation
  1. Initial program 78.8%

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  4. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    2. lower-+.f6445.7

      \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
  5. Simplified45.7%

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

    \[\leadsto \color{blue}{x + -1 \cdot \left(a \cdot x\right)} \]
  7. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right) + x} \]
    2. mul-1-negN/A

      \[\leadsto \color{blue}{\left(\mathsf{neg}\left(a \cdot x\right)\right)} + x \]
    3. *-commutativeN/A

      \[\leadsto \left(\mathsf{neg}\left(\color{blue}{x \cdot a}\right)\right) + x \]
    4. distribute-rgt-neg-inN/A

      \[\leadsto \color{blue}{x \cdot \left(\mathsf{neg}\left(a\right)\right)} + x \]
    5. mul-1-negN/A

      \[\leadsto x \cdot \color{blue}{\left(-1 \cdot a\right)} + x \]
    6. lower-fma.f64N/A

      \[\leadsto \color{blue}{\mathsf{fma}\left(x, -1 \cdot a, x\right)} \]
    7. mul-1-negN/A

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{\mathsf{neg}\left(a\right)}, x\right) \]
    8. lower-neg.f6420.4

      \[\leadsto \mathsf{fma}\left(x, \color{blue}{-a}, x\right) \]
  8. Simplified20.4%

    \[\leadsto \color{blue}{\mathsf{fma}\left(x, -a, x\right)} \]
  9. Taylor expanded in a around inf

    \[\leadsto \color{blue}{-1 \cdot \left(a \cdot x\right)} \]
  10. Step-by-step derivation
    1. associate-*r*N/A

      \[\leadsto \color{blue}{\left(-1 \cdot a\right) \cdot x} \]
    2. *-commutativeN/A

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot a\right)} \]
    3. lower-*.f64N/A

      \[\leadsto \color{blue}{x \cdot \left(-1 \cdot a\right)} \]
    4. mul-1-negN/A

      \[\leadsto x \cdot \color{blue}{\left(\mathsf{neg}\left(a\right)\right)} \]
    5. lower-neg.f644.0

      \[\leadsto x \cdot \color{blue}{\left(-a\right)} \]
  11. Simplified4.0%

    \[\leadsto \color{blue}{x \cdot \left(-a\right)} \]
  12. Add Preprocessing

Alternative 20: 19.9% accurate, 53.0× speedup?

\[\begin{array}{l} \\ x \end{array} \]
(FPCore (x y z t a b) :precision binary64 x)
double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
real(8) function code(x, y, z, t, a, b)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    code = x
end function
public static double code(double x, double y, double z, double t, double a, double b) {
	return x;
}
def code(x, y, z, t, a, b):
	return x
function code(x, y, z, t, a, b)
	return x
end
function tmp = code(x, y, z, t, a, b)
	tmp = x;
end
code[x_, y_, z_, t_, a_, b_] := x
\begin{array}{l}

\\
x
\end{array}
Derivation
  1. Initial program 78.8%

    \[\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
  2. Add Preprocessing
  3. Taylor expanded in y around 0

    \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
  4. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
    2. lower-+.f6445.7

      \[\leadsto \frac{x}{\color{blue}{1 + a}} \]
  5. Simplified45.7%

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

    \[\leadsto \frac{x}{\color{blue}{1}} \]
  7. Step-by-step derivation
    1. Simplified21.2%

      \[\leadsto \frac{x}{\color{blue}{1}} \]
    2. Final simplification21.2%

      \[\leadsto x \]
    3. Add Preprocessing

    Developer Target 1: 79.9% accurate, 0.7× speedup?

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

    Reproduce

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