Does the US Bureau of Economic Analysis use the generic growth formula to calculate percent change of GDP? My question is so basic, I'm embarrassed to ask it. (I study computational theory, not economics.) I'm looking at quarterly GDP numbers and growth rates. I've tried to arrive at the BEA's CPGDPAI numbers using the generic formula:

GDP(t)/GDP(t-1) = (1 + r)^t - t-1


Which fails miserably. I'm grateful for some light on this. 


Update:

So, it's the data, not the math. I was pulling the nominal GDP data off FRED. After plugging in the the GDPC1 data, it was all right as rain. A rookie mistake, but, well, I'm a rookie. Thanks for the answers below.
Normally growth is calculated either as:

$$\frac{y_t-y_{t-1}}{y_t}$$

Or approximated by:

$$\ln(y_t)-\ln(y_{t-1})$$

Within year you can either continue using the  above definition or use year on year growth which compares every month quarter with the same quarter previous year.

If you are looking for Fred specifically here is the list of formulas:

https://fredhelp.stlouisfed.org/fred/data/understanding-the-data/formulas-calculate-growth-rates/

The list overlaps with what I written above and also the list shows other changes (which you might be interested to look into)