My professor gave us two formulas for GDP for 2012 in 2010 dollars:
y = P1 (2010) * Q1 (2012) + P2 (2010) * Q2 (2012) ...
y = x1 / (1 + inflation rate 2010 to 2012)
x1 is the nominal GDP for 2012. Do those formula produce the same result? If not, under what assumptions are they close to one another? Which one is used by governments to calculate GDP figures?