Index: ETSN/MyDFT_1.py
===================================================================
--- ETSN/MyDFT_1.py	(revision 299)
+++ ETSN/MyDFT_1.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 import sys
Index: ETSN/MyDFT_2.py
===================================================================
--- ETSN/MyDFT_2.py	(revision 299)
+++ ETSN/MyDFT_2.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -23,8 +23,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 import sys
Index: ETSN/MyDFT_3.py
===================================================================
--- ETSN/MyDFT_3.py	(revision 299)
+++ ETSN/MyDFT_3.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 import sys
Index: ETSN/MyDFT_4.py
===================================================================
--- ETSN/MyDFT_4.py	(revision 299)
+++ ETSN/MyDFT_4.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -69,8 +69,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_5.py
===================================================================
--- ETSN/MyDFT_5.py	(revision 299)
+++ ETSN/MyDFT_5.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -69,8 +69,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -139,8 +139,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_6.py
===================================================================
--- ETSN/MyDFT_6.py	(revision 299)
+++ ETSN/MyDFT_6.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -69,8 +69,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -139,8 +139,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_7.py
===================================================================
--- ETSN/MyDFT_7.py	(revision 299)
+++ ETSN/MyDFT_7.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -85,8 +85,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -154,8 +154,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_8.py
===================================================================
--- ETSN/MyDFT_8.py	(revision 299)
+++ ETSN/MyDFT_8.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -85,8 +85,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -171,8 +171,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_9.py
===================================================================
--- ETSN/MyDFT_9.py	(revision 299)
+++ ETSN/MyDFT_9.py	(revision 300)
@@ -11,8 +11,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -22,8 +22,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -35,8 +35,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),y),np.multiply(np.sin(i*nj),x)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -85,8 +85,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -171,8 +171,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
Index: ETSN/MyDFT_10.py
===================================================================
--- ETSN/MyDFT_10.py	(revision 299)
+++ ETSN/MyDFT_10.py	(revision 300)
@@ -71,8 +71,8 @@
     Y=np.zeros(size).astype(np.float32)
     for i in range(size):
         for j in range(size):
-            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)-y[j]*sin(2.*pi*i*j/size)
-            Y[i]=Y[i]+x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
+            X[i]=X[i]+x[j]*cos(2.*pi*i*j/size)+y[j]*sin(2.*pi*i*j/size)
+            Y[i]=Y[i]-x[j]*sin(2.*pi*i*j/size)+y[j]*cos(2.*pi*i*j/size)
     return(X,Y)
 
 # Numpy Discrete Fourier Transform
@@ -82,8 +82,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in range(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(-np.subtract(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
     return(X,Y)
 
 # Numba Discrete Fourier Transform
@@ -95,8 +95,8 @@
     Y=np.zeros(size).astype(np.float32)
     nj=np.multiply(2.0*np.pi/size,np.arange(size)).astype(np.float32)
     for i in numba.prange(size):
-        X[i]=np.sum(np.subtract(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
-        Y[i]=np.sum(np.add(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
+        X[i]=np.sum(np.add(np.multiply(np.cos(i*nj),x),np.multiply(np.sin(i*nj),y)))
+        Y[i]=np.sum(-np.subtract(np.multiply(np.sin(i*nj),x),np.multiply(np.cos(i*nj),y)))
     return(X,Y)
 
 # OpenCL complete operation
@@ -145,8 +145,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -231,8 +231,8 @@
   float A=0.,B=0.;
   for (uint i=0; i<size;i++) 
   {
-     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)-b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
-     B+=a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
+     A+=a_g[i]*cos(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*sin(2.*PI*(float)(gid*i)/(float)size);
+     B+=-a_g[i]*sin(2.*PI*(float)(gid*i)/(float)size)+b_g[i]*cos(2.*PI*(float)(gid*i)/(float)size);
   }
   A_g[gid]=A;
   B_g[gid]=B;
@@ -283,11 +283,11 @@
     Device=0
     NaiveMethod=False
     NumpyFFTMethod=True
-    OpenCLFFTMethod=True
+    OpenCLFFTMethod=False
     NumpyMethod=False
     NumbaMethod=False
     OpenCLMethod=False
-    CUDAMethod=False
+    CUDAMethod=True
     Threads=1
     
     import getopt
@@ -358,6 +358,7 @@
     print("Size of complex vector : %i" % SIZE)
     print("DFT Naive computation %s " % NaiveMethod )
     print("DFT Numpy computation %s " % NumpyMethod )
+    print("FFT Numpy computation %s " % NumpyFFTMethod )
     print("DFT Numba computation %s " % NumbaMethod )
     print("DFT OpenCL computation %s " % OpenCLMethod )
     print("DFT CUDA computation %s " % CUDAMethod )
@@ -397,8 +398,10 @@
 
     
         
-    a_np = np.ones(SIZE).astype(np.float32)
-    b_np = np.ones(SIZE).astype(np.float32)
+    # a_np = np.ones(SIZE).astype(np.float32)
+    # b_np = np.ones(SIZE).astype(np.float32)
+    a_np = np.random.rand(SIZE).astype(np.float32)
+    b_np = np.random.rand(SIZE).astype(np.float32)
 
     C_np = np.zeros(SIZE).astype(np.float32)
     D_np = np.zeros(SIZE).astype(np.float32)
@@ -483,5 +486,57 @@
         print("Precision: ",np.linalg.norm(i_np-C_np),
               np.linalg.norm(j_np-D_np)) 
     
+<<<<<<< .mine
+    if OpenCLMethod and NumpyFFTMethod:
+        print(OpenCLMethod,NumpyFFTMethod)
+        print("Precision: ",np.linalg.norm(m_np-i_np),
+              np.linalg.norm(n_np-j_np)) 
+        print((m_np-i_np),(n_np-j_np)) 
+        print(i_np,j_np) 
+        print(m_np,n_np) 
+        print((i_np-m_np),(j_np-n_np)) 
+        
+    if CUDAMethod and NumpyFFTMethod:
+        print(CUDAMethod,NumpyFFTMethod)
+        print("Precision: ",np.linalg.norm(m_np-k_np),
+              np.linalg.norm(n_np-l_np)) 
+        print((m_np-k_np),(n_np-l_np)) 
+        print(k_np,l_np) 
+        print(m_np,n_np) 
+        print((k_np-m_np),(l_np-n_np)) 
+        
+    if OpenCLMethod and NumpyMethod:
+        print(OpenCLMethod,NumpyMethod)
+        print("Precision: ",np.linalg.norm(e_np-i_np),
+              np.linalg.norm(f_np-j_np)) 
+        print((e_np-i_np),(f_np-j_np)) 
+        
+    if NumpyFFTMethod and NumpyMethod:
+        print(NumpyFFTMethod,NumpyMethod)
+        print("Precision: ",np.linalg.norm(e_np-m_np),
+              np.linalg.norm(f_np-n_np)) 
+        print(e_np,f_np) 
+        print(m_np,n_np) 
+        print((e_np-m_np),(f_np-n_np)) 
+        
+    if NumpyFFTMethod and NaiveMethod:
+        print(NumpyFFTMethod,NaiveMethod)
+        print("Precision: ",np.linalg.norm(c_np-m_np),
+              np.linalg.norm(d_np-n_np)) 
+        print(c_np,d_np) 
+        print(m_np,n_np) 
+        print((c_np-m_np),(d_np-n_np)) 
+        
+    if NumpyFFTMethod and NumbaMethod:
+        print(NumpyFFTMethod,NumbaMethod)
+        print("Precision: ",np.linalg.norm(g_np-m_np),
+              np.linalg.norm(h_np-n_np)) 
+        print(g_np,h_np) 
+        print(m_np,n_np) 
+        print((g_np-m_np),(h_np-n_np)) 
+        
+||||||| .r292
+=======
     if OpenCLFFTMethod and NumpyFFTMethod:
         print("NumpyOpenCLRatio: %f" % (OpenCLFFTRate/NumpyFFTRate))
+>>>>>>> .r299
