ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/math/LegendrePolynomial.cpp
(Generate patch)

Comparing trunk/OOPSE-4/src/math/LegendrePolynomial.cpp (file contents):
Revision 2588 by tim, Fri Feb 10 15:12:14 2006 UTC vs.
Revision 2759 by tim, Wed May 17 21:51:42 2006 UTC

# Line 59 | Line 59 | namespace oopse {
59      //P_{l+1}= \frac{(2l+1)(x)P_l-l P_{l-1}{l+1}
60      for (int i = 2; i <= maxPower; ++i) {
61        DoublePolynomial pn;
62 <        
63 <      pn = polyList_[i-1] * x * ((2.0*i-1.0)/i) - polyList_[i-2] * ((i-1.0)/i);
62 >      RealType tmp1 = (2.0*i-1.0)/i;
63 >      RealType tmp2 = (i-1.0)/i;    
64 >      pn = polyList_[i-1] * x * tmp1 - polyList_[i-2] * tmp2;
65        polyList_.push_back(pn);
66      }
67    }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines