When using statistical software, the R^2 isn't compatible if the the regression is ran through the origin.

Is this the formula for R^2 when ran through the origin:

$\displaystyle \displaystyle \frac{\left(\sum X_iY_i\right)^2}{\sum X_i^2\sum Y_i^2}$

where X and Y sub is are the observed values.

Also, when comparing models, for instance linear, log linear, log, and linear log models, how can the R^2 be standardized for comparison across the models?

Thank you for your time.