OSDN Git Service

unstable-commit
authorteoxx <teoxx@0e905424-1750-4201-adbd-bf076348bc1c>
Wed, 10 Dec 2008 01:22:32 +0000 (01:22 +0000)
committerteoxx <teoxx@0e905424-1750-4201-adbd-bf076348bc1c>
Wed, 10 Dec 2008 01:22:32 +0000 (01:22 +0000)
git-svn-id: svn+ssh://svn.sourceforge.jp/svnroot/applied-gslp@143 0e905424-1750-4201-adbd-bf076348bc1c

trunk/noumerov/noumerov
trunk/noumerov/noumerov.c
trunk/noumerov/noumerov.o

index 736c89d..d8d67d6 100755 (executable)
Binary files a/trunk/noumerov/noumerov and b/trunk/noumerov/noumerov differ
index d8a23a2..1db3911 100644 (file)
@@ -27,11 +27,10 @@ double theta;
        return norm_rad1(theta);
 }
 
-double norm_rad2(theta)
+double norm_rad1(theta)
 double theta;
 {
        const double T = 2 * M_PI;
-       theta / T;
        /*
           while( theta < -M_PI || M_PI <= theta ){
         */
@@ -42,18 +41,11 @@ double theta;
        return theta;
 }
 
-double norm_rad1(theta)
+double norm_rad2(theta)
 double theta;
 {
        const double T = 2 * M_PI;
-       /*
-          while( theta < -M_PI || M_PI <= theta ){
-        */
-       while (gsl_fcmp(theta, -M_PI, GSL_DBL_EPSILON) < 0
-              || gsl_fcmp(M_PI, theta, GSL_DBL_EPSILON) <= 0) {
-               theta -= GSL_SIGN(theta) * T;
-       }
-       return theta;
+       return theta / T;
 }
 
 void norm_rad_test(a)
index d0e7d39..2974499 100644 (file)
Binary files a/trunk/noumerov/noumerov.o and b/trunk/noumerov/noumerov.o differ