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

SCM Repository

[diderot] Diff of /trunk/src/compiler/cl-target/fragments/eigen3x3.in
ViewVC logotype

Diff of /trunk/src/compiler/cl-target/fragments/eigen3x3.in

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 150  Line 150 
150      D = QQQ - R*R;      D = QQQ - R*R;
151      if (D > EPSILON) {      if (D > EPSILON) {
152        /* three distinct roots- this is the most common case */        /* three distinct roots- this is the most common case */
153          double mm, ss, cc;          Diderot_real_t  mm, ss, cc;
154          theta = atan2(sqrt(D), R)/3.0;          theta = atan2(sqrt(D), R)/3.0;
155          mm = sqrt(Q);          mm = sqrt(Q);
156          ss = sin(theta);          ss = sin(theta);
# Line 162  Line 162 
162      }      }
163    /* else D is near enough to zero */    /* else D is near enough to zero */
164      else if ((R < -EPSILON) || (EPSILON < R)) {      else if ((R < -EPSILON) || (EPSILON < R)) {
165          double U;          Diderot_real_t  U;
166        /* one double root and one single root */        /* one double root and one single root */
167          U = cbrt(R); /* cube root function */          U = cbrt(R); /* cube root function */
168          if (U > 0) {          if (U > 0) {
# Line 202  Line 202 
202          const Diderot_real_t _M11, const Diderot_real_t _M12,          const Diderot_real_t _M11, const Diderot_real_t _M12,
203          const Diderot_real_t _M22)          const Diderot_real_t _M22)
204  {  {
205      Diderot_real_t len, dot;      Diderot_real_t len;
206    
207      Diderot_real_t mean, norm, rnorm, Q, R, QQQ, D, theta, M00, M01, M02, M11, M12, M22;      Diderot_real_t mean, norm, rnorm, Q, R, QQQ, D, theta, M00, M01, M02, M11, M12, M22;
208      Diderot_real_t epsilon = 1.0E-12;      Diderot_real_t epsilon = 1.0E-12;
# Line 249  Line 249 
249      D = QQQ - R*R;      D = QQQ - R*R;
250      if (D > epsilon) {      if (D > epsilon) {
251        /* three distinct roots- this is the most common case */        /* three distinct roots- this is the most common case */
252          double mm, ss, cc;          Diderot_real_t  mm, ss, cc;
253          theta = atan2(sqrt(D), R)/3.0;          theta = atan2(sqrt(D), R)/3.0;
254          mm = sqrt(Q);          mm = sqrt(Q);
255          ss = sin(theta);          ss = sin(theta);
# Line 261  Line 261 
261      }      }
262    /* else D is near enough to zero */    /* else D is near enough to zero */
263      else if (R < -epsilon || epsilon < R) {      else if (R < -epsilon || epsilon < R) {
264          double U;          Diderot_real_t  U;
265        /* one double root and one single root */        /* one double root and one single root */
266          U = cbrt(R); /* cube root function */          U = cbrt(R); /* cube root function */
267          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