stan-dev/stan — pull request #681 by mitzimorris (2014-06-10 08:06:05+00:00)
Title: Feature/issue 648 pow infix syntax

#### Summary:

This change adds the exponentiation operator to the Stan modeling language, so that you can write x^y instead of pow(x,y).

#### Intended Effect:

Stan models which involve exponentiation will be written differently. Expressions which involve raising an integer or real to an integer or real power can be written using the ^ infix operator. The result of this operation is a real variable. The ^ operator binds more tightly than unary negation or any of the binary operators. so a*b^c is interpreted as a*(b^c), -a^b as -(a^b), and a^b^c as a^(b^c).

#### How to Verify:

Unit tests have been added to src/test/gm/parser_test.cpp. Tested by adding exponent statements to simple models and running command line Stan.
#### Side Effects:

No.

#### Documentation:

The Stan manual, section modeling language, expressions has been updated to include documentation of the infix exponent operator. No other sections have been changed. No example models.

#### Reviewer Suggestions:

Changes to the parser require some understanding of Boost Spirit/Qi. Bob or Marcus?