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

Percentage Accurate: 74.7% → 92.1%
Time: 13.8s
Alternatives: 15
Speedup: 0.5×

Specification

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 15 alternatives:

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

Initial Program: 74.7% 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: 92.1% 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{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\ t_3 := t \cdot \left(\frac{x}{b} - \frac{\mathsf{fma}\left(z, a, z\right)}{b \cdot b}\right)\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{z}{b} + \frac{\mathsf{fma}\left(\left(-1 - a\right) \cdot t\_3, \frac{t}{y \cdot b}, t\_3\right)}{y}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;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 (* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t)))
        (t_3 (* t (- (/ x b) (/ (fma z a z) (* b b))))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -2e-319)
       t_1
       (if (<= t_1 0.0)
         (+ (/ z b) (/ (fma (* (- -1.0 a) t_3) (/ t (* y b)) t_3) y))
         (if (<= t_1 5e+306) t_1 (if (<= t_1 INFINITY) 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 = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
	double t_3 = t * ((x / b) - (fma(z, a, z) / (b * b)));
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -2e-319) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (z / b) + (fma(((-1.0 - a) * t_3), (t / (y * b)), t_3) / y);
	} else if (t_1 <= 5e+306) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		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(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t))
	t_3 = Float64(t * Float64(Float64(x / b) - Float64(fma(z, a, z) / Float64(b * b))))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -2e-319)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(z / b) + Float64(fma(Float64(Float64(-1.0 - a) * t_3), Float64(t / Float64(y * b)), t_3) / y));
	elseif (t_1 <= 5e+306)
		tmp = t_1;
	elseif (t_1 <= Inf)
		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[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(t * N[(N[(x / b), $MachinePrecision] - N[(N[(z * a + z), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(z / b), $MachinePrecision] + N[(N[(N[(N[(-1.0 - a), $MachinePrecision] * t$95$3), $MachinePrecision] * N[(t / N[(y * b), $MachinePrecision]), $MachinePrecision] + t$95$3), $MachinePrecision] / y), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], t$95$1, If[LessEqual[t$95$1, Infinity], 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{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
t_3 := t \cdot \left(\frac{x}{b} - \frac{\mathsf{fma}\left(z, a, z\right)}{b \cdot b}\right)\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 4.99999999999999993e306 < (/.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 39.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. accelerator-lowering-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}} \]
      5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6437.9

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306

    1. Initial program 98.5%

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

    if -1.99998e-319 < (/.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 45.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 -inf

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

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

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

    1. Initial program 0.0%

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

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

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified95.9%

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

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

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 4.99999999999999993e306 < (/.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 39.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. accelerator-lowering-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}} \]
      5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6437.9

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306

    1. Initial program 98.5%

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

    if -1.99998e-319 < (/.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 45.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 inf

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

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

        \[\leadsto \color{blue}{\frac{z}{b} + \left(\frac{t \cdot x}{b \cdot y} + \left(\mathsf{neg}\left(\frac{t \cdot \left(z \cdot \left(1 + a\right)\right)}{{b}^{2} \cdot y}\right)\right)\right)} \]
      3. sub-negN/A

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

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

        \[\leadsto \frac{z}{b} + \left(t \cdot \frac{x}{b \cdot y} - \color{blue}{t \cdot \frac{z \cdot \left(1 + a\right)}{{b}^{2} \cdot y}}\right) \]
      6. distribute-lft-out--N/A

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

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

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

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

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

    1. Initial program 0.0%

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

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

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified95.9%

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

Alternative 3: 91.8% 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{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\ \mathbf{if}\;t\_1 \leq -\infty:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq 0:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(b, y, \mathsf{fma}\left(t, a, t\right)\right)}\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{+306}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_1 \leq \infty:\\ \;\;\;\;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 (* (/ z (+ 1.0 (fma y (/ b t) a))) (/ y t))))
   (if (<= t_1 (- INFINITY))
     t_2
     (if (<= t_1 -2e-319)
       t_1
       (if (<= t_1 0.0)
         (/ (* y z) (fma b y (fma t a t)))
         (if (<= t_1 5e+306) t_1 (if (<= t_1 INFINITY) 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 = (z / (1.0 + fma(y, (b / t), a))) * (y / t);
	double tmp;
	if (t_1 <= -((double) INFINITY)) {
		tmp = t_2;
	} else if (t_1 <= -2e-319) {
		tmp = t_1;
	} else if (t_1 <= 0.0) {
		tmp = (y * z) / fma(b, y, fma(t, a, t));
	} else if (t_1 <= 5e+306) {
		tmp = t_1;
	} else if (t_1 <= ((double) INFINITY)) {
		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(Float64(z / Float64(1.0 + fma(y, Float64(b / t), a))) * Float64(y / t))
	tmp = 0.0
	if (t_1 <= Float64(-Inf))
		tmp = t_2;
	elseif (t_1 <= -2e-319)
		tmp = t_1;
	elseif (t_1 <= 0.0)
		tmp = Float64(Float64(y * z) / fma(b, y, fma(t, a, t)));
	elseif (t_1 <= 5e+306)
		tmp = t_1;
	elseif (t_1 <= Inf)
		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[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(y / t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, (-Infinity)], t$95$2, If[LessEqual[t$95$1, -2e-319], t$95$1, If[LessEqual[t$95$1, 0.0], N[(N[(y * z), $MachinePrecision] / N[(b * y + N[(t * a + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 5e+306], t$95$1, If[LessEqual[t$95$1, Infinity], 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{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;t\_1\\

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -inf.0 or 4.99999999999999993e306 < (/.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 39.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. accelerator-lowering-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}} \]
      5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6437.9

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -inf.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319 or 0.0 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < 4.99999999999999993e306

    1. Initial program 98.5%

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

    if -1.99998e-319 < (/.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 45.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. accelerator-lowering-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}} \]
      5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
    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. /-lowering-/.f64N/A

        \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
      2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6445.7

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

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

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

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

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

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

        \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(b, y, t \cdot a + \color{blue}{t}\right)} \]
      5. accelerator-lowering-fma.f6462.4

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

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

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

    1. Initial program 0.0%

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

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

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    5. Simplified95.9%

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

Alternative 4: 72.5% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_3 \leq -2 \cdot 10^{-319}:\\
\;\;\;\;\frac{t\_4}{a + t\_1}\\

\mathbf{elif}\;t\_3 \leq 0:\\
\;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(b, y, \mathsf{fma}\left(t, a, t\right)\right)}\\

\mathbf{elif}\;t\_3 \leq 5 \cdot 10^{+306}:\\
\;\;\;\;\frac{t\_2}{a + 1}\\

\mathbf{elif}\;t\_3 \leq \infty:\\
\;\;\;\;\frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\

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


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

    1. Initial program 47.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. /-lowering-/.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
      4. accelerator-lowering-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}} \]
      5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

      if -1e138 < (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < -1.99998e-319

      1. Initial program 97.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. /-lowering-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. accelerator-lowering-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}} \]
        5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.99998e-319 < (/.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 45.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. /-lowering-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. accelerator-lowering-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}} \]
        5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
      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. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
        2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6445.7

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

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

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

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

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

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

          \[\leadsto \frac{y \cdot z}{\mathsf{fma}\left(b, y, t \cdot a + \color{blue}{t}\right)} \]
        5. accelerator-lowering-fma.f6462.4

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

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

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

      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. +-lowering-+.f6474.3

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

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

      if 4.99999999999999993e306 < (/.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 57.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. /-lowering-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. accelerator-lowering-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}} \]
        5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
      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. /-lowering-/.f64N/A

          \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
        2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6441.3

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      1. Initial program 0.0%

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

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

          \[\leadsto \color{blue}{\frac{z}{b}} \]
      5. Simplified95.9%

        \[\leadsto \color{blue}{\frac{z}{b}} \]
    7. Recombined 6 regimes into one program.
    8. Final simplification76.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^{+138}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq -2 \cdot 10^{-319}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \frac{y \cdot b}{t}}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 0:\\ \;\;\;\;\frac{y \cdot z}{\mathsf{fma}\left(b, y, \mathsf{fma}\left(t, a, t\right)\right)}\\ \mathbf{elif}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq 5 \cdot 10^{+306}:\\ \;\;\;\;\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 \infty:\\ \;\;\;\;\frac{z}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)} \cdot \frac{y}{t}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \]
    9. Add Preprocessing

    Alternative 5: 83.3% accurate, 0.5× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{z}{b}\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (if (<= (/ (+ x (/ (* y z) t)) (+ (+ a 1.0) (/ (* y b) t))) INFINITY)
       (/ (fma y (/ z t) x) (+ a (fma y (/ b t) 1.0)))
       (/ z b)))
    double code(double x, double y, double z, double t, double a, double b) {
    	double tmp;
    	if (((x + ((y * z) / t)) / ((a + 1.0) + ((y * b) / t))) <= ((double) INFINITY)) {
    		tmp = fma(y, (z / t), x) / (a + fma(y, (b / t), 1.0));
    	} else {
    		tmp = z / b;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	tmp = 0.0
    	if (Float64(Float64(x + Float64(Float64(y * z) / t)) / Float64(Float64(a + 1.0) + Float64(Float64(y * b) / t))) <= Inf)
    		tmp = Float64(fma(y, Float64(z / t), x) / Float64(a + fma(y, Float64(b / t), 1.0)));
    	else
    		tmp = Float64(z / b);
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(N[(x + N[(N[(y * z), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision] / N[(N[(a + 1.0), $MachinePrecision] + N[(N[(y * b), $MachinePrecision] / t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + N[(y * N[(b / t), $MachinePrecision] + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(z / b), $MachinePrecision]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    \mathbf{if}\;\frac{x + \frac{y \cdot z}{t}}{\left(a + 1\right) + \frac{y \cdot b}{t}} \leq \infty:\\
    \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{z}{b}\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if (/.f64 (+.f64 x (/.f64 (*.f64 y z) t)) (+.f64 (+.f64 a #s(literal 1 binary64)) (/.f64 (*.f64 y b) t))) < +inf.0

      1. Initial program 80.4%

        \[\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. /-lowering-/.f64N/A

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

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. accelerator-lowering-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}} \]
        5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

      1. Initial program 0.0%

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

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

          \[\leadsto \color{blue}{\frac{z}{b}} \]
      5. Simplified95.9%

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

    Alternative 6: 66.4% accurate, 1.0× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \mathbf{if}\;t \leq -1.65 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-260}:\\ \;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
    (FPCore (x y z t a b)
     :precision binary64
     (let* ((t_1 (/ (fma y (/ z t) x) (+ a 1.0))))
       (if (<= t -1.65e-16)
         t_1
         (if (<= t -2.2e-260)
           (* t (+ (/ x (* y b)) (/ z (* t b))))
           (if (<= t 8e-111) (* y (/ z (fma a t (fma y b t)))) t_1)))))
    double code(double x, double y, double z, double t, double a, double b) {
    	double t_1 = fma(y, (z / t), x) / (a + 1.0);
    	double tmp;
    	if (t <= -1.65e-16) {
    		tmp = t_1;
    	} else if (t <= -2.2e-260) {
    		tmp = t * ((x / (y * b)) + (z / (t * b)));
    	} else if (t <= 8e-111) {
    		tmp = y * (z / fma(a, t, fma(y, b, t)));
    	} else {
    		tmp = t_1;
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b)
    	t_1 = Float64(fma(y, Float64(z / t), x) / Float64(a + 1.0))
    	tmp = 0.0
    	if (t <= -1.65e-16)
    		tmp = t_1;
    	elseif (t <= -2.2e-260)
    		tmp = Float64(t * Float64(Float64(x / Float64(y * b)) + Float64(z / Float64(t * b))));
    	elseif (t <= 8e-111)
    		tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t))));
    	else
    		tmp = t_1;
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_] := Block[{t$95$1 = N[(N[(y * N[(z / t), $MachinePrecision] + x), $MachinePrecision] / N[(a + 1.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -1.65e-16], t$95$1, If[LessEqual[t, -2.2e-260], N[(t * N[(N[(x / N[(y * b), $MachinePrecision]), $MachinePrecision] + N[(z / N[(t * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 8e-111], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\
    \mathbf{if}\;t \leq -1.65 \cdot 10^{-16}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;t \leq -2.2 \cdot 10^{-260}:\\
    \;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\
    
    \mathbf{elif}\;t \leq 8 \cdot 10^{-111}:\\
    \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_1\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if t < -1.64999999999999994e-16 or 8.00000000000000071e-111 < t

      1. Initial program 77.3%

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

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

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

          \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
        4. accelerator-lowering-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}} \]
        5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

        if -1.64999999999999994e-16 < t < -2.20000000000000017e-260

        1. Initial program 67.0%

          \[\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 inf

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

            \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
          2. *-lowering-*.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -2.20000000000000017e-260 < t < 8.00000000000000071e-111

        1. Initial program 67.1%

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

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

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

            \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
          4. accelerator-lowering-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}} \]
          5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
        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. /-lowering-/.f64N/A

            \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
          2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6446.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{z}{\mathsf{fma}\left(a, t, \color{blue}{y \cdot b} + t\right)} \cdot y \]
          9. accelerator-lowering-fma.f6470.7

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

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

        \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.65 \cdot 10^{-16}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \mathbf{elif}\;t \leq -2.2 \cdot 10^{-260}:\\ \;\;\;\;t \cdot \left(\frac{x}{y \cdot b} + \frac{z}{t \cdot b}\right)\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \end{array} \]
      9. Add Preprocessing

      Alternative 7: 65.2% accurate, 1.1× speedup?

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

        1. Initial program 77.3%

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

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

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

            \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
          4. accelerator-lowering-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}} \]
          5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

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

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

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

          if -1.04000000000000001e-16 < t < 1.7e-208

          1. Initial program 62.0%

            \[\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 inf

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

              \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
            2. *-lowering-*.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.7e-208 < t < 2.2e-111

          1. Initial program 79.1%

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

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

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

              \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
            4. accelerator-lowering-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}} \]
            5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
          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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
            2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6461.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{z}{\mathsf{fma}\left(a, t, \color{blue}{y \cdot b} + t\right)} \cdot y \]
            9. accelerator-lowering-fma.f6472.6

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

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

          \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -1.04 \cdot 10^{-16}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \mathbf{elif}\;t \leq 1.7 \cdot 10^{-208}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;t \leq 2.2 \cdot 10^{-111}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + 1}\\ \end{array} \]
        9. Add Preprocessing

        Alternative 8: 59.9% accurate, 1.2× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -2.9 \cdot 10^{+28}:\\ \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\ \mathbf{elif}\;x \leq 3.5 \cdot 10^{+102}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= x -2.9e+28)
           (/ x (+ 1.0 (fma y (/ b t) a)))
           (if (<= x 3.5e+102)
             (* y (/ z (fma a t (fma y b t))))
             (/ x (fma b (/ y t) (+ a 1.0))))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if (x <= -2.9e+28) {
        		tmp = x / (1.0 + fma(y, (b / t), a));
        	} else if (x <= 3.5e+102) {
        		tmp = y * (z / fma(a, t, fma(y, b, t)));
        	} else {
        		tmp = x / fma(b, (y / t), (a + 1.0));
        	}
        	return tmp;
        }
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (x <= -2.9e+28)
        		tmp = Float64(x / Float64(1.0 + fma(y, Float64(b / t), a)));
        	elseif (x <= 3.5e+102)
        		tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, t))));
        	else
        		tmp = Float64(x / fma(b, Float64(y / t), Float64(a + 1.0)));
        	end
        	return tmp
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[x, -2.9e+28], N[(x / N[(1.0 + N[(y * N[(b / t), $MachinePrecision] + a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[x, 3.5e+102], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(x / N[(b * N[(y / t), $MachinePrecision] + N[(a + 1.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;x \leq -2.9 \cdot 10^{+28}:\\
        \;\;\;\;\frac{x}{1 + \mathsf{fma}\left(y, \frac{b}{t}, a\right)}\\
        
        \mathbf{elif}\;x \leq 3.5 \cdot 10^{+102}:\\
        \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{\mathsf{fma}\left(b, \frac{y}{t}, a + 1\right)}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if x < -2.9000000000000001e28

          1. Initial program 77.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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

          if -2.9000000000000001e28 < x < 3.50000000000000011e102

          1. Initial program 70.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. /-lowering-/.f64N/A

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

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

              \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
            4. accelerator-lowering-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}} \]
            5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
          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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
            2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6447.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{z}{\mathsf{fma}\left(a, t, \color{blue}{y \cdot b} + t\right)} \cdot y \]
            9. accelerator-lowering-fma.f6463.4

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

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

          if 3.50000000000000011e102 < x

          1. Initial program 73.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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 59.4% accurate, 1.2× speedup?

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

          1. Initial program 75.9%

            \[\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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

          if -3.19999999999999987e29 < x < 9.0000000000000004e101

          1. Initial program 70.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. /-lowering-/.f64N/A

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

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

              \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
            4. accelerator-lowering-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}} \]
            5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
          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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
            2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6447.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{z}{\mathsf{fma}\left(a, t, \color{blue}{y \cdot b} + t\right)} \cdot y \]
            9. accelerator-lowering-fma.f6463.4

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

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

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

        Alternative 10: 54.2% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -4.15 \cdot 10^{-16}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 8 \cdot 10^{-208}:\\ \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\ \mathbf{elif}\;t \leq 1.65 \cdot 10^{-109}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(y, b, 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 -4.15e-16)
             t_1
             (if (<= t 8e-208)
               (/ (fma x t (* y z)) (* y b))
               (if (<= t 1.65e-109) (* y (/ z (fma y b 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 <= -4.15e-16) {
        		tmp = t_1;
        	} else if (t <= 8e-208) {
        		tmp = fma(x, t, (y * z)) / (y * b);
        	} else if (t <= 1.65e-109) {
        		tmp = y * (z / fma(y, b, 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 <= -4.15e-16)
        		tmp = t_1;
        	elseif (t <= 8e-208)
        		tmp = Float64(fma(x, t, Float64(y * z)) / Float64(y * b));
        	elseif (t <= 1.65e-109)
        		tmp = Float64(y * Float64(z / fma(y, b, 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, -4.15e-16], t$95$1, If[LessEqual[t, 8e-208], N[(N[(x * t + N[(y * z), $MachinePrecision]), $MachinePrecision] / N[(y * b), $MachinePrecision]), $MachinePrecision], If[LessEqual[t, 1.65e-109], N[(y * N[(z / N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x}{a + 1}\\
        \mathbf{if}\;t \leq -4.15 \cdot 10^{-16}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 8 \cdot 10^{-208}:\\
        \;\;\;\;\frac{\mathsf{fma}\left(x, t, y \cdot z\right)}{y \cdot b}\\
        
        \mathbf{elif}\;t \leq 1.65 \cdot 10^{-109}:\\
        \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(y, b, t\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if t < -4.14999999999999989e-16 or 1.64999999999999995e-109 < t

          1. Initial program 77.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 0

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

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

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

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

          if -4.14999999999999989e-16 < t < 8.0000000000000008e-208

          1. Initial program 62.0%

            \[\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 inf

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

              \[\leadsto \color{blue}{\frac{t \cdot \left(x + \frac{y \cdot z}{t}\right)}{b \cdot y}} \]
            2. *-lowering-*.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. *-commutativeN/A

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

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

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

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

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

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

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

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

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

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

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

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

          if 8.0000000000000008e-208 < t < 1.64999999999999995e-109

          1. Initial program 79.1%

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

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

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

              \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
            4. accelerator-lowering-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}} \]
            5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
          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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
            2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6461.8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{z}{\color{blue}{y \cdot b} + t} \cdot y \]
            3. accelerator-lowering-fma.f6454.5

              \[\leadsto \frac{z}{\color{blue}{\mathsf{fma}\left(y, b, t\right)}} \cdot y \]
          12. Simplified54.5%

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

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

        Alternative 11: 57.6% accurate, 1.3× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -3.5 \cdot 10^{+34}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 2.3 \cdot 10^{-89}:\\ \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\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 -3.5e+34)
             t_1
             (if (<= t 2.3e-89) (* y (/ z (fma a t (fma y b 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 <= -3.5e+34) {
        		tmp = t_1;
        	} else if (t <= 2.3e-89) {
        		tmp = y * (z / fma(a, t, fma(y, b, 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 <= -3.5e+34)
        		tmp = t_1;
        	elseif (t <= 2.3e-89)
        		tmp = Float64(y * Float64(z / fma(a, t, fma(y, b, 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, -3.5e+34], t$95$1, If[LessEqual[t, 2.3e-89], N[(y * N[(z / N[(a * t + N[(y * b + t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{x}{a + 1}\\
        \mathbf{if}\;t \leq -3.5 \cdot 10^{+34}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t \leq 2.3 \cdot 10^{-89}:\\
        \;\;\;\;y \cdot \frac{z}{\mathsf{fma}\left(a, t, \mathsf{fma}\left(y, b, t\right)\right)}\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_1\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if t < -3.49999999999999998e34 or 2.3e-89 < t

          1. Initial program 76.5%

            \[\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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + a}} \]
            2. +-lowering-+.f6460.2

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

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

          if -3.49999999999999998e34 < t < 2.3e-89

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

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

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

              \[\leadsto \frac{\color{blue}{y \cdot \frac{z}{t}} + x}{\left(a + 1\right) + \frac{y \cdot b}{t}} \]
            4. accelerator-lowering-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}} \]
            5. /-lowering-/.f64N/A

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

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

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

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

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

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

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

            \[\leadsto \color{blue}{\frac{\mathsf{fma}\left(y, \frac{z}{t}, x\right)}{a + \mathsf{fma}\left(y, \frac{b}{t}, 1\right)}} \]
          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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{y \cdot z}{t \cdot \left(1 + \left(a + \frac{b \cdot y}{t}\right)\right)}} \]
            2. *-lowering-*.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. accelerator-lowering-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. accelerator-lowering-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. /-lowering-/.f6444.0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{z}{\mathsf{fma}\left(a, t, \color{blue}{y \cdot b} + t\right)} \cdot y \]
            9. accelerator-lowering-fma.f6463.0

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

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

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

        Alternative 12: 40.5% accurate, 1.8× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a + 1 \leq -4 \cdot 10^{+19}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a + 1 \leq 2:\\ \;\;\;\;x\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
        (FPCore (x y z t a b)
         :precision binary64
         (if (<= (+ a 1.0) -4e+19) (/ x a) (if (<= (+ a 1.0) 2.0) x (/ x a))))
        double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((a + 1.0) <= -4e+19) {
        		tmp = x / a;
        	} else if ((a + 1.0) <= 2.0) {
        		tmp = x;
        	} else {
        		tmp = x / a;
        	}
        	return tmp;
        }
        
        real(8) function code(x, y, z, t, a, b)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            real(8), intent (in) :: z
            real(8), intent (in) :: t
            real(8), intent (in) :: a
            real(8), intent (in) :: b
            real(8) :: tmp
            if ((a + 1.0d0) <= (-4d+19)) then
                tmp = x / a
            else if ((a + 1.0d0) <= 2.0d0) then
                tmp = x
            else
                tmp = x / a
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b) {
        	double tmp;
        	if ((a + 1.0) <= -4e+19) {
        		tmp = x / a;
        	} else if ((a + 1.0) <= 2.0) {
        		tmp = x;
        	} else {
        		tmp = x / a;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b):
        	tmp = 0
        	if (a + 1.0) <= -4e+19:
        		tmp = x / a
        	elif (a + 1.0) <= 2.0:
        		tmp = x
        	else:
        		tmp = x / a
        	return tmp
        
        function code(x, y, z, t, a, b)
        	tmp = 0.0
        	if (Float64(a + 1.0) <= -4e+19)
        		tmp = Float64(x / a);
        	elseif (Float64(a + 1.0) <= 2.0)
        		tmp = x;
        	else
        		tmp = Float64(x / a);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b)
        	tmp = 0.0;
        	if ((a + 1.0) <= -4e+19)
        		tmp = x / a;
        	elseif ((a + 1.0) <= 2.0)
        		tmp = x;
        	else
        		tmp = x / a;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_] := If[LessEqual[N[(a + 1.0), $MachinePrecision], -4e+19], N[(x / a), $MachinePrecision], If[LessEqual[N[(a + 1.0), $MachinePrecision], 2.0], x, N[(x / a), $MachinePrecision]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        \mathbf{if}\;a + 1 \leq -4 \cdot 10^{+19}:\\
        \;\;\;\;\frac{x}{a}\\
        
        \mathbf{elif}\;a + 1 \leq 2:\\
        \;\;\;\;x\\
        
        \mathbf{else}:\\
        \;\;\;\;\frac{x}{a}\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 2 regimes
        2. if (+.f64 a #s(literal 1 binary64)) < -4e19 or 2 < (+.f64 a #s(literal 1 binary64))

          1. Initial program 73.0%

            \[\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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \color{blue}{\frac{x}{a}} \]
          7. Step-by-step derivation
            1. /-lowering-/.f6449.0

              \[\leadsto \color{blue}{\frac{x}{a}} \]
          8. Simplified49.0%

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

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

          1. Initial program 72.8%

            \[\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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
          7. Step-by-step derivation
            1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \color{blue}{x} \]
          10. Step-by-step derivation
            1. Simplified30.5%

              \[\leadsto \color{blue}{x} \]
          11. Recombined 2 regimes into one program.
          12. Add Preprocessing

          Alternative 13: 55.9% accurate, 2.0× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{x}{a + 1}\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{+17}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-52}:\\ \;\;\;\;\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 -2.8e+17) t_1 (if (<= t 5.4e-52) (/ 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 <= -2.8e+17) {
          		tmp = t_1;
          	} else if (t <= 5.4e-52) {
          		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 <= (-2.8d+17)) then
                  tmp = t_1
              else if (t <= 5.4d-52) 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 <= -2.8e+17) {
          		tmp = t_1;
          	} else if (t <= 5.4e-52) {
          		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 <= -2.8e+17:
          		tmp = t_1
          	elif t <= 5.4e-52:
          		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 <= -2.8e+17)
          		tmp = t_1;
          	elseif (t <= 5.4e-52)
          		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 <= -2.8e+17)
          		tmp = t_1;
          	elseif (t <= 5.4e-52)
          		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, -2.8e+17], t$95$1, If[LessEqual[t, 5.4e-52], N[(z / b), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \frac{x}{a + 1}\\
          \mathbf{if}\;t \leq -2.8 \cdot 10^{+17}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t \leq 5.4 \cdot 10^{-52}:\\
          \;\;\;\;\frac{z}{b}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if t < -2.8e17 or 5.40000000000000019e-52 < t

            1. Initial program 78.5%

              \[\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. /-lowering-/.f64N/A

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

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

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

            if -2.8e17 < t < 5.40000000000000019e-52

            1. Initial program 67.5%

              \[\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. /-lowering-/.f6454.4

                \[\leadsto \color{blue}{\frac{z}{b}} \]
            5. Simplified54.4%

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

            \[\leadsto \begin{array}{l} \mathbf{if}\;t \leq -2.8 \cdot 10^{+17}:\\ \;\;\;\;\frac{x}{a + 1}\\ \mathbf{elif}\;t \leq 5.4 \cdot 10^{-52}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a + 1}\\ \end{array} \]
          5. Add Preprocessing

          Alternative 14: 42.7% accurate, 2.2× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -1.45 \cdot 10^{+15}:\\ \;\;\;\;\frac{x}{a}\\ \mathbf{elif}\;a \leq 1.5 \cdot 10^{+95}:\\ \;\;\;\;\frac{z}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{a}\\ \end{array} \end{array} \]
          (FPCore (x y z t a b)
           :precision binary64
           (if (<= a -1.45e+15) (/ x a) (if (<= a 1.5e+95) (/ z b) (/ x a))))
          double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (a <= -1.45e+15) {
          		tmp = x / a;
          	} else if (a <= 1.5e+95) {
          		tmp = z / b;
          	} else {
          		tmp = x / a;
          	}
          	return tmp;
          }
          
          real(8) function code(x, y, z, t, a, b)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              real(8), intent (in) :: z
              real(8), intent (in) :: t
              real(8), intent (in) :: a
              real(8), intent (in) :: b
              real(8) :: tmp
              if (a <= (-1.45d+15)) then
                  tmp = x / a
              else if (a <= 1.5d+95) then
                  tmp = z / b
              else
                  tmp = x / a
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b) {
          	double tmp;
          	if (a <= -1.45e+15) {
          		tmp = x / a;
          	} else if (a <= 1.5e+95) {
          		tmp = z / b;
          	} else {
          		tmp = x / a;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b):
          	tmp = 0
          	if a <= -1.45e+15:
          		tmp = x / a
          	elif a <= 1.5e+95:
          		tmp = z / b
          	else:
          		tmp = x / a
          	return tmp
          
          function code(x, y, z, t, a, b)
          	tmp = 0.0
          	if (a <= -1.45e+15)
          		tmp = Float64(x / a);
          	elseif (a <= 1.5e+95)
          		tmp = Float64(z / b);
          	else
          		tmp = Float64(x / a);
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b)
          	tmp = 0.0;
          	if (a <= -1.45e+15)
          		tmp = x / a;
          	elseif (a <= 1.5e+95)
          		tmp = z / b;
          	else
          		tmp = x / a;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_] := If[LessEqual[a, -1.45e+15], N[(x / a), $MachinePrecision], If[LessEqual[a, 1.5e+95], N[(z / b), $MachinePrecision], N[(x / a), $MachinePrecision]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          \mathbf{if}\;a \leq -1.45 \cdot 10^{+15}:\\
          \;\;\;\;\frac{x}{a}\\
          
          \mathbf{elif}\;a \leq 1.5 \cdot 10^{+95}:\\
          \;\;\;\;\frac{z}{b}\\
          
          \mathbf{else}:\\
          \;\;\;\;\frac{x}{a}\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -1.45e15 or 1.49999999999999996e95 < a

            1. Initial program 74.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. /-lowering-/.f64N/A

                \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
              2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

              \[\leadsto \color{blue}{\frac{x}{a}} \]
            7. Step-by-step derivation
              1. /-lowering-/.f6455.0

                \[\leadsto \color{blue}{\frac{x}{a}} \]
            8. Simplified55.0%

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

            if -1.45e15 < a < 1.49999999999999996e95

            1. Initial program 71.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. /-lowering-/.f6446.4

                \[\leadsto \color{blue}{\frac{z}{b}} \]
            5. Simplified46.4%

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

          Alternative 15: 19.8% 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 72.9%

            \[\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. /-lowering-/.f64N/A

              \[\leadsto \color{blue}{\frac{x}{1 + \left(a + \frac{b \cdot y}{t}\right)}} \]
            2. +-lowering-+.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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \color{blue}{\frac{x}{1 + \frac{b \cdot y}{t}}} \]
          7. Step-by-step derivation
            1. /-lowering-/.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. accelerator-lowering-fma.f64N/A

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

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

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

            \[\leadsto \color{blue}{x} \]
          10. Step-by-step derivation
            1. Simplified16.7%

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

            Developer Target 1: 78.6% accurate, 0.7× speedup?

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

            Reproduce

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