# What is the formula for Mg values in TMM normalization for RNA Seq data?

I am reading through the paper "A scaling normalization method for differential expression analysis of RNA-seq data" by Mark D Robinson, Alicia Oshlack, available here.

In this paper they introduce a normalization method called "trimmed mean of M-values" (TMM), which is apparently a normalization used in the edgeR package.

What is confusing to me is that on page 3 they define the value

$$M_g = \log_2\left(\frac{Y_{gk}/N_k}{Y_{gk'}/N_k'}\right)$$

where $$k$$ is an experiment to be normalized and $$k'$$ is a reference experiment. A few pages down on page 7, however, they define

$$M_{gk}^r = \frac{\log_2\left(Y_{gk}/N_k\right)}{\log_2\left(Y_{gr}/N_r' \right)}$$

where $$k$$ is an experiment to be normalized and $$r$$ is a reference experiment.

Are these two formulae intended to represent the same quantity? If they are supposed to be the same, which one has the correct order of logarithm/division? If they are not supposed to be the same, can anyone explain the difference? Thank you.