Home My Page Projects Code Snippets Project Openings diderot
Summary Activity Tracker Tasks SCM

SCM Repository

[diderot] Diff of /trunk/src/lib/common/eigen3x3.c
ViewVC logotype

Diff of /trunk/src/lib/common/eigen3x3.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1678, Sun Dec 18 13:17:09 2011 UTC revision 1679, Mon Dec 19 20:31:04 2011 UTC
# Line 200  Line 200 
200      D = QQQ - R*R;      D = QQQ - R*R;
201      if (D > epsilon) {      if (D > epsilon) {
202        /* three distinct roots- this is the most common case */        /* three distinct roots- this is the most common case */
203          double mm, ss, cc;          Diderot_real_t mm, ss, cc;
204          theta = ATAN2(SQRT(D), R)/3.0;          theta = ATAN2(SQRT(D), R)/3.0;
205          mm = SQRT(Q);          mm = SQRT(Q);
206          ss = SIN(theta);          ss = SIN(theta);
# Line 212  Line 212 
212      }      }
213    /* else D is near enough to zero */    /* else D is near enough to zero */
214      else if (R < -epsilon || epsilon < R) {      else if (R < -epsilon || epsilon < R) {
215          double U;          Diderot_real_t U;
216        /* one double root and one single root */        /* one double root and one single root */
217          U = CBRT(R); /* cube root function */          U = CBRT(R); /* cube root function */
218          if (U > 0) {          if (U > 0) {
# Line 300  Line 300 
300      D = QQQ - R*R;      D = QQQ - R*R;
301      if (D > epsilon) {      if (D > epsilon) {
302        /* three distinct roots- this is the most common case */        /* three distinct roots- this is the most common case */
303          double mm, ss, cc;          Diderot_real_t mm, ss, cc;
304          theta = ATAN2(SQRT(D), R)/3.0;          theta = ATAN2(SQRT(D), R)/3.0;
305          mm = SQRT(Q);          mm = SQRT(Q);
306          ss = SIN(theta);          ss = SIN(theta);
# Line 312  Line 312 
312      }      }
313    /* else D is near enough to zero */    /* else D is near enough to zero */
314      else if (R < -epsilon || epsilon < R) {      else if (R < -epsilon || epsilon < R) {
315          double U;          Diderot_real_t U;
316        /* one double root and one single root */        /* one double root and one single root */
317          U = CBRT(R); /* cube root function */          U = CBRT(R); /* cube root function */
318          if (U > 0) {          if (U > 0) {

Legend:
Removed from v.1678  
changed lines
  Added in v.1679

root@smlnj-gforge.cs.uchicago.edu
ViewVC Help
Powered by ViewVC 1.0.0