Quick Search:

Mode

Context

Displaying 3 lines of context. None | Less | More | Full

Other Diffs

Ignore

Blank Lines Whitespace: Expand:

Diff

1.260
 
1.261
 
MAIN:ragge:20090516160519
 
pftn.c
_>30743074                 p1 = buildtree(CAST, TYPE(mxtyp), p2);
 30753075         }
 30763076 #endif
<> 3077+
30773078 #define comop(x,y) buildtree(COMOP, x, y)
 30783079         /* put a pointer to left and right elements in a TEMP */
 30793080         l = buildtree(ADDROF, l, NIL);
     
 !
30883089 
 30893090         /* create the four trees needed for calculation */
 30903091         real_l = structref(ccopy(ltemp), STREF, real);
<>3091 -//printf("real_l\n"); fwalk(real_l, eprint, 0);
30923092         real_r = structref(ccopy(rtemp), STREF, real);
<>3093 -//printf("real_r\n"); fwalk(real_r, eprint, 0);
30943093         imag_l = structref(ltemp, STREF, imag);
<>3095 -//printf("imag_l\n"); fwalk(imag_l, eprint, 0);
30963094         imag_r = structref(rtemp, STREF, imag);
<>3097 -//printf("imag_r\n"); fwalk(imag_r, eprint, 0);
30983095 
 30993096         /* get storage on stack for the result */
 31003097         s = *cxsp[1];
     
 !
31143111 
 31153112         case MUL:
 31163113                 /* Complex mul is "complex" */
<>3117 -                /* (u+iv)*(x*iy)=((u*x)-(v*y))+i(v*x+y*u) */
  3114+                /* (u+iv)*(x+iy)=((u*x)-(v*y))+i(v*x+y*u) */
31183115                 p = comop(p, buildtree(ASSIGN, structref(ccopy(q), DOT, real),
 31193116                     buildtree(MINUS,
 31203117                     buildtree(MUL, ccopy(real_r), ccopy(real_l)),
     
 !
31253122                     buildtree(MUL, imag_r, real_l))));
 31263123                 break;
 31273124 
<>3128 -#if 0
31293125         case DIV:
<>3130 -                ...
  3126+                /* Complex div is even more "complex" */
  3127+                /* (u+iv)/(x+iy)=(u*x+v*y)/(x*x+y*y)+i((v*x-u*y)/(x*x+y*y)) */
  3128+                p = comop(p, buildtree(ASSIGN, structref(ccopy(q), DOT, real),
  3129+                    buildtree(DIV,
  3130+                      buildtree(PLUS,
  3131+                        buildtree(MUL, ccopy(real_r), ccopy(real_l)),
  3132+                        buildtree(MUL, ccopy(imag_r), ccopy(imag_l))),
  3133+                      buildtree(PLUS,
  3134+                        buildtree(MUL, ccopy(real_r), ccopy(real_r)),
  3135+                        buildtree(MUL, ccopy(imag_r), ccopy(imag_r))))));
  3136+                p = comop(p, buildtree(ASSIGN, structref(ccopy(q), DOT, real),
  3137+                    buildtree(DIV,
  3138+                      buildtree(MINUS,
  3139+                        buildtree(MUL, ccopy(imag_l), ccopy(real_r)),
  3140+                        buildtree(MUL, ccopy(real_l), ccopy(imag_r))),
  3141+                      buildtree(PLUS,
  3142+                        buildtree(MUL, ccopy(real_r), ccopy(real_r)),
  3143+                        buildtree(MUL, ccopy(imag_r), ccopy(imag_r))))));
  3144+                tfree(real_r);
  3145+                tfree(real_l);
  3146+                tfree(imag_r);
  3147+                tfree(imag_l);
31313148                 break;
<>3132 -#endif
31333149         }
<>3134 -        p = comop(p, q);
 3135 -printf("XXX\n");
 3136 -fwalk(p, eprint, 0);
 3137 -printf("YYY\n");
 3138 -return p;
  3150+        return comop(p, q);
<_31393151 }
 31403152 
 31413153 #endif
FishEye: Open Source License registered to PCC.
Your maintenance has expired. You can renew your license at http://www.atlassian.com/fisheye/renew
Atlassian FishEye, CVS analysis. (Version:1.6.3 Build:build-336 2008-11-04) - Administration - Page generated 2014-09-30 22:00 +0200