ScrExample
------------------------------------------------------------
Test A-1
Core Weeks Method: without a search (sigma=1,b=1)
Fs =
1./sqrt(s.^2+1)
ft =
besselj(0,t)
Time: 
    10    20    30    40    50    60
Exact: 
  Columns 1 through 4
        -0.245935764451348         0.167024664340583       -0.0863679835810402       0.00736689058423729
  Columns 5 through 6
        0.0558123276692518       -0.0914718040890619
Approximate: 
  Columns 1 through 4
         -0.84402061225052          675.310942254994         -9758.46747572134         -249689.613664902
        -0.245011111002623          9.40898958393507          96937.7914402418          223168195.720863
        -0.245935764798823         0.167011073140905       -0.0771439271611661          240.700826596682
        -0.245935764451535         0.167024666011583       -0.0863431237953682        -0.788848758679686
        -0.245935764451287         0.167024666139143       -0.0863418866483183         -1.93141500694858
  Columns 5 through 6
         -1890761.51926913         -8780501.34078411
          22249207219.2736          694927913374.904
         -176280599.923388          10522782803833.6
          1328.50522228756          130302461.907258
         -8897.64563355348         -22051852.2770832
Absolute Error %: 
  Columns 1 through 4
          59.8084847799172          67514.3917590653          975838.110773776          24968962.1031793
        0.0924653448725776          924.196491959449          9693787.78082253          22316819571.3496
      3.47474882575749e-08        0.0013591199678355         0.922405687650296          24069.3532760961
      1.89199666455174e-11      1.67105605385957e-07       0.00248620515763051          80.2609641766399
      6.09649041367123e-12      1.79857273023611e-07       0.00294138469105021          195.226011294773
  Columns 5 through 6
          189076157.508146          878050124.931231
          2224920721921.78          69492791337499.5
          17628060005.9089      1.05227828038532e+15
          175184.552695357          13790273061.6686
          1130388.35496505          9186035915.07954
Relative Error %: 
  Columns 1 through 4
          243.187422997799          404218.095726242          11298609.3956696           3389348846.3918
         0.375973559920641          5533.29351451294          112238208.869688          3029340441013.23
      1.41286845104014e-07       0.00813724112664042          10.6799493215538          3267233.71290413
      7.69305216251304e-11      1.00048460534672e-06         0.028786189679856          10894.8223485729
      2.47889542510083e-11      1.07683062099655e-06        0.0340564242569154          26500.4629921465
  Columns 5 through 6
          3387713170.26278          9599134221.47347
          39864324152664.5           759718167030330
          315845275444.775      1.15038540112401e+16
          3138814.66713795          150759823740.239
          20253381.3257855          100424781237.894
Run Time :
  Columns 1 through 4
                  0.025102                  0.002094                  0.000913                  0.000905
                  0.000919                  0.000952                  0.000894                  0.000851
                  0.000952                  0.001105                  0.001002                  0.000931
                  0.001095                  0.001081                  0.001147                   0.00108
                  0.001385                   0.00144                  0.001367                  0.001367
  Columns 5 through 6
                  0.000886                  0.000814
                  0.000851                   0.00085
                  0.000998                  0.000959
                  0.001218                  0.001078
                  0.001369                  0.001376
sigma: 
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
b:
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
     1     1     1     1     1     1
------------------------------------------------------------
Test A-2
Core Weeks Method: CPU Local Search
Fs =
1./sqrt(s.^2+1)
ft =
besselj(0,t)
Time: 
    10    20    30    40    50    60
Exact: 
  Columns 1 through 4
        -0.245935764451348         0.167024664340583       -0.0863679835810402       0.00736689058423729
  Columns 5 through 6
        0.0558123276692518       -0.0914718040890619
Approximate: 
  Columns 1 through 4
        -0.443749988733802         0.136622810667228       0.00483776218740764     1.05325084105169e-161
        -0.246104386500722          0.14937808764338       -0.0568245816882683       -0.0566677921025585
        -0.245935764443097           0.1670258622198       -0.0956603752840292        0.0989517023949357
        -0.245935764451352         0.167024664341942       -0.0863679837186951       0.00736701976118199
        -0.245935764451348         0.167024664340579       -0.0863679835809906       0.00736689058479705
  Columns 5 through 6
     1.16997416027439e-205     9.66937070976925e-250
       0.00750760569309432      -0.00966350651657359
       0.00721994854508524       -0.0432319206119996
        0.0558150768197056       -0.0887788515623068
         0.055812327666484       -0.0914718042781613
Absolute Error %: 
  Columns 1 through 4
          19.7814224282454          3.04018536733557          9.12057457684478         0.736689058423729
        0.0168622049373541          1.76465766972027          2.95434018927719          6.40346826867958
      8.25257816061741e-10      0.000119787921874732         0.929239170298902          9.15848118106984
      4.68591943987353e-13      1.35949239253178e-10      1.40457365474016e-08      1.29178338469156e-05
      2.78144043925852e-14      3.82176112412859e-13       4.9657887237013e-12      5.65055548785702e-11
  Columns 5 through 6
          5.58123276692518          9.14718040890619
          4.83047219761575          8.18082975724883
          4.85923791241666          4.82398834770623
      0.000274934778304371         0.269295253342147
      2.76792611871214e-10      1.89138597453033e-08
Relative Error %: 
  Columns 1 through 4
          80.4332890434836          18.2020145308376          105.601337424844                       100
         0.068563451822355            10.56525200447          34.2064277384118          869.222665310231
      3.35558277952289e-09      0.000717187023531265          10.7590698748569          1243.19495129546
      1.90534282410174e-12      8.13947088532756e-10      1.62626658224831e-07       0.00175349880647821
      1.13096216219856e-13      2.28814177787274e-12      5.74957121586824e-11      7.67020416992121e-09
  Columns 5 through 6
                       100                       100
          86.5484813004307          89.4355352309826
          87.0638820371886          52.7374352757855
       0.00492605827038169          2.94402473006815
      4.95934542475111e-09      2.06772567062171e-07
Run Time :
  Columns 1 through 4
                   0.35917                  0.163503                   0.17394                  0.167372
                  0.143324                  0.161098                  0.187449                  0.172509
                  0.133212                  0.174954                   0.17051                  0.187066
                  0.195846                  0.184341                  0.170276                  0.175165
                  0.206966                    0.2068                  0.224796                  0.211929
  Columns 5 through 6
                   0.16237                  0.163299
                  0.184445                  0.155874
                  0.183018                  0.198713
                  0.171622                  0.192819
                  0.195824                  0.193337
sigma: 
  Columns 1 through 4
         0.699402467888805         0.150319408660644         0.139294052228044      4.03469594067567e-05
          1.80343223519556         0.229311069858234        0.0169615788513467       0.00683199074535717
          1.23348742831458          1.00177672503042         0.711854754336708         0.117499735966686
         0.688837074972661         0.551364027584328         0.543467274146097         0.503126953189955
         0.278327157428271         0.268755684570178          0.26303347574927         0.263079012674484
  Columns 5 through 6
      5.28396170026742e-05      3.55550015122173e-05
        0.0044318184863447       0.00521953617480629
        0.0198441614154572        0.0180838074598612
         0.501059120579157         0.433601792369248
         0.262574068190857         0.263511812868036
b:
  Columns 1 through 4
          1.04789425812034         0.841874282111522          0.84035810932719           10.278407582292
          2.15977228859359          1.11456180001682         0.042176603618904         0.147056725859685
            1.643182823832          1.46464340205457          1.18009474497111         0.871434759447483
         0.842111134151232          1.11456180001682          1.11456180001682          1.14369822548386
          1.11462122623865          0.97201990295355          1.06805736040923          1.04656238440422
  Columns 5 through 6
          10.2783708267359          10.2784216791733
         0.412989155563856         0.196934197409884
        0.0211449141727899         0.223745014644159
          1.14256713169123          1.11452575284836
          1.06939359120067          1.07098779103521
------------------------------------------------------------
Test A-3
Core Weeks Method: CPU Global Local (slow)
Fs =
1./sqrt(s.^2+1)
ft =
besselj(0,t)
Time: 
    10    20    30    40    50    60
Exact: 
  Columns 1 through 4
        -0.245935764451348         0.167024664340583       -0.0863679835810402       0.00736689058423729
  Columns 5 through 6
        0.0558123276692518       -0.0914718040890619
Approximate: 
  Columns 1 through 4
        -0.134930517793546         0.397014312151498        0.0432798314729921       0.00115918985995485
        -0.246089956632071         0.115795248100143         0.204572637425807        -0.284501785944612
        -0.245935764444776         0.167022802917207       -0.0747825328356847         0.208992813528041
        -0.245935764451342         0.167024664339814        -0.086367984838649       0.00736687236854854
        -0.245935764451348         0.167024664340557       -0.0863679835851995       0.00736689064467401
  Columns 5 through 6
      1.67048835270168e-05      1.68087357734351e-07
        -0.235367884640735        -0.025289669847977
          0.20038154956621          3.30820397645863
        0.0558789880816913       -0.0886667399267015
          0.05581232705429       -0.0914718085262633
Absolute Error %: 
  Columns 1 through 4
          11.1005246657802          22.9989647810915          12.9647815054032         0.620770072428244
        0.0154192180723128          5.12294162404398          29.0940621006847          29.1868676528849
      6.57196905044348e-10      0.000186142342821494          1.15854507453555          20.1625922943804
      6.34385488515991e-13      7.79749384310586e-11      1.25767652465113e-07      3.46422867102574e-06
      7.18989533580448e-15      2.64096034716096e-12      4.16509461767318e-10      6.04367207490734e-09
  Columns 5 through 6
          5.57956227857248          9.14719721764196
          29.1180212309987          6.61821342410849
          14.4569221896958           339.96757805477
       0.00666604124493218         0.280506416236346
      6.14961831511436e-08      4.43720141915977e-07
Relative Error %: 
  Columns 1 through 4
          45.1358698908395          137.698015271528          150.110966678274          84.2648693271605
         0.062696119479455          30.6717672163537          336.861657461128          3961.89780737821
      2.67222990731125e-09       0.00111446021194766          13.4140572293027          2736.92028730842
      2.57947635201096e-12      4.66846850067954e-10      1.45618372978575e-06      0.000470242992129956
      2.92348506198121e-14      1.58117985603356e-11      4.82249839000238e-09      8.20383037565239e-07
  Columns 5 through 6
          99.9700695451621          100.000183758656
          521.713077504209          72.3524969253327
          259.027401175036          3716.63794587192
         0.119436718074825          3.06658886888499
      1.10183871053676e-06      4.85089527133352e-06
Run Time :
  Columns 1 through 4
                  3.994296                  3.913772                  3.909286                  3.909259
                  4.083326                  4.097913                   4.07928                   4.05253
                  4.313019                  4.310604                  4.311406                  4.305939
                  4.815744                  4.812765                  4.817349                  4.815742
                  5.780882                  5.775662                  5.778239                   5.77979
  Columns 5 through 6
                  3.909668                  3.912248
                  4.054992                  4.054109
                  4.306802                  4.302975
                  4.814578                  4.814867
                  5.779603                  5.779762
sigma: 
  Columns 1 through 4
                       0.2                       0.2                       0.2                       0.2
                       1.6                       0.2                       0.2                       0.2
                       1.2                       1.2                       0.6                       0.2
                       0.6                       0.6                       0.6                       0.6
                       0.4                       0.4                       0.4                       0.2
  Columns 5 through 6
                       0.2                       0.2
                       0.2                       0.2
                       0.2                       0.2
                       0.4                       0.4
                       0.2                       0.2
b:
  Columns 1 through 4
                       0.8                       0.8                       0.8                       0.8
                       1.8                       0.8                       0.8                       0.8
                       1.6                       1.6                       1.2                       0.8
                         1                         1                         1                         1
                       0.6                       0.6                       0.6                         1
  Columns 5 through 6
                       0.8                       0.8
                       0.8                       0.8
                       0.8                       0.8
                         1                         1
                         1                         1
------------------------------------------------------------
Test A-4
Core Weeks Method: GPU Global Search (fast)
The JACKET sofware was not located.
------------------------------------------------------------
Test A-5
Wrapped Weeks Method: CPU Local Search
Fs =
1./sqrt(s.^2+1)
ft =
besselj(0,t)
Time: 
    10    20    30    40    50    60
Exact: 
  Columns 1 through 4
        -0.245935764451348         0.167024664340583       -0.0863679835810402       0.00736689058423729
  Columns 5 through 6
        0.0558123276692518       -0.0914718040890619
Approximate: 
  Columns 1 through 4
         -0.24593576442941         0.167026481151498       -0.0863679836427115       0.00736693331353297
  Columns 5 through 6
        0.0558123276717197       -0.0914718038490346
Measured Absolute Error %: 
  Columns 1 through 4
       2.1938053459174e-09      0.000181681091515953      6.24769855794897e-09      4.27334613874389e-06
  Columns 5 through 6
      2.77437308943396e-10       2.4003062625269e-08
Estimated Absolute Error %: 
  Columns 1 through 4
      2.77774987707604e-08        0.0020599409986811      1.95095571034058e-06      0.000373932628047215
  Columns 5 through 6
      1.28675446190865e-07      1.61917236255929e-06
Measured Relative Error %: 
  Columns 1 through 4
      8.92023716360043e-09       0.00108775007711127      7.23381315494841e-08      0.000580074604051733
  Columns 5 through 6
      4.97089658377108e-09      2.62409415276191e-07
Estimated Relative Error %: 
  Columns 1 through 4
      1.12946154192768e-07        0.0123330203958058      2.25888764337873e-05        0.0507582479890654
  Columns 5 through 6
      2.30550223505667e-06      1.77013275613497e-05
Run Time :
                  2.072943
sigma: 
  Columns 1 through 4
          1.19790518050677          1.01541531626775         0.551336542317656         0.533078093385645
  Columns 5 through 6
         0.270820505127095         0.264461636238619
b:
  Columns 1 through 4
           1.5581735434107          1.37761624007386          1.26975818500259          1.14661490345873
  Columns 5 through 6
         0.976851541226325         0.962706800381917
Tolerance Flag: 
     1     1     1     1     1     1
------------------------------------------------------------
Test A-6
Wrapped Weeks Method: GPU Global Search
The JACKET sofware was not located.
------------------------------------------------------------
Test A-7
Clenshaw Algorithm/Wrapped Weeks Method: CPU Local Search
Fs =
1./sqrt(s.^2+1)
ft =
besselj(0,t)
Runtime =
                  0.747526
------------------------------------------------------------
Test B-1
Wrapped Weeks Method: CPU Local Search
Fs =
1./(s.*(s.*s+9/25))
ft =
(25/9)*(1-cos(3*t/5))
Time: 
     1     3     5     7     9    11
Exact: 
  Columns 1 through 4
         0.485178847473116           3.4088947074808          5.52775693500124          4.13961339261305
  Columns 5 through 6
          1.01474201127046         0.138242800115196
Approximate: 
  Columns 1 through 4
         0.485178847473116           3.4088947074808          5.52775693500124          4.13961339261306
  Columns 5 through 6
          1.01474201127052         0.138242800115251
Measured Absolute Error %: 
  Columns 1 through 4
      5.55436358895481e-15      1.50703997155877e-14      1.17828499000445e-13      7.08081631334782e-13
  Columns 5 through 6
      6.62158579361579e-12      1.52645626468178e-11
Estimated Absolute Error %: 
  Columns 1 through 4
      6.88860641872329e-14      1.12000608114168e-12      5.83129903003076e-12      3.56206808317696e-11
  Columns 5 through 6
      1.83716764436001e-10      1.19662385108881e-09
Measured Relative Error %: 
  Columns 1 through 4
      1.14480744943494e-14       4.4209050172526e-15      2.13157887341909e-14      1.71050183719649e-13
  Columns 5 through 6
      6.52538844363559e-12      1.10418500161297e-10
Estimated Relative Error %: 
  Columns 1 through 4
       1.4198076553832e-13      3.28554026231387e-13      1.05491234484417e-12       8.6048327351856e-12
  Columns 5 through 6
      1.81047756371075e-10      8.65595785162915e-09
Run Time :
                  1.058332
sigma: 
  Columns 1 through 4
          2.30554747456846          1.17037211235166         0.982600018379572         0.913720776055285
  Columns 5 through 6
         0.862060464969342         0.910186548328861
b:
  Columns 1 through 4
          1.46733308922862          1.32167573543845         0.912215335338883         0.851948917154587
  Columns 5 through 6
          1.02073542151396          1.00561726764576
Tolerance Flag: 
     1     1     1     1     1     1
------------------------------------------------------------
Test B-2
Wrapped Weeks Method: GPU Global Search
The JACKET sofware was not located.
------------------------------------------------------------
Test C-1
Wrapped Weeks Method: CPU Local Search
ft =
sinh(2*sqrt(t))/sqrt(pi)
Time: 
     1     3     5     7     9    11
Exact: 
  Columns 1 through 4
          2.04623686308906          9.00346273510434          24.6923465801113          56.0343645526697
  Columns 5 through 6
          113.804462252841          214.376909610431
Approximate: 
  Columns 1 through 4
          2.04632243414325          9.00419282678741          24.6919355752342          56.0379801111845
  Columns 5 through 6
          113.803777958128          214.377869346237
Measured Absolute Error %: 
  Columns 1 through 4
       0.00855710541962651        0.0730091683067258        0.0411004877122423          0.36155585147668
  Columns 5 through 6
         0.068429471245679        0.0959735805821538
Estimated Absolute Error %: 
  Columns 1 through 4
          1.18120974746823          6.31722361031636          17.8153508375296           50.243573874716
  Columns 5 through 6
           21.417834378913          42.6825173559506
Measured Relative Error %: 
  Columns 1 through 4
        0.0041818743342882       0.00810900988372666       0.00166450311147613       0.00645239496089645
  Columns 5 through 6
      0.000601289878191668      0.000447686183911124
Estimated Relative Error %: 
  Columns 1 through 4
         0.577235399348381         0.701586886447241         0.721504832346892         0.896598588582746
  Columns 5 through 6
         0.188199678105531         0.199099456889438
Run Time :
                  1.690818
sigma: 
  Columns 1 through 4
         0.694791026563239         0.518436677950187         0.518411081714497         0.518411081714497
  Columns 5 through 6
         0.344844464942352         0.344830602651127
b:
  Columns 1 through 4
          4.87029000552337          1.82841672089363          1.82828710270276          1.82828710270231
  Columns 5 through 6
           1.8216635352003          1.82155148394989
Tolerance Flag: 
     1     1     1     1     1     1
------------------------------------------------------------
Test C-2
Wrapped Weeks Method: GPU Global Search
The JACKET sofware was not located.
------------------------------------------------------------
Test D-1
Wrapped Weeks Method: CPU Local Search
Fs =
(s+0.6).^(-9/11)
ft =
(t.^(-2/11))./(gamma(9/11)*exp(0.6*t))
Time: 
  Columns 1 through 4
                       0.5                         1                       1.5                         2
  Columns 5 through 6
                       2.5                         3
Exact: 
  Columns 1 through 4
         0.734281347009652         0.479558314245366         0.330017133521624          0.23202351899818
  Columns 5 through 6
         0.165053091157434         0.118287465807711
Approximate: 
  Columns 1 through 4
         0.789519378257953         0.495386925941766           0.3154898152501         0.207980368251142
  Columns 5 through 6
          0.14472846111834         0.107357494429102
Measured Absolute Error %: 
  Columns 1 through 4
          5.52380312483012          1.58286116963998          1.45273182715241          2.40431507470378
  Columns 5 through 6
           2.0324630039094          1.09299713786093
Estimated Absolute Error %: 
  Columns 1 through 4
           16.463832534779          16.4641646709206          16.4644968137627          16.4648289633053
  Columns 5 through 6
          16.4651611195485          16.4654932824926
Measured Relative Error %: 
  Columns 1 through 4
          7.52273382311251          3.30066463789868          4.40198910780863          10.3623765602945
  Columns 5 through 6
          12.3139953917661           9.2401771430095
Estimated Relative Error %: 
  Columns 1 through 4
          20.8529809250608          33.2349600054968          52.1870945365089          79.1653034454843
  Columns 5 through 6
          113.765882621287          153.370692656825
Run Time :
                 27.930745
sigma: 
  Columns 1 through 4
      4.03469594067567e-05      4.03469594067567e-05      4.03469594067567e-05      4.03469594067567e-05
  Columns 5 through 6
      4.03469594067567e-05      4.03469594067567e-05
b:
  Columns 1 through 4
       0.00368990304365948       0.00368990304365943       0.00368990304365948       0.00368990304365949
  Columns 5 through 6
       0.00368990304365943       0.00368990304365951
Tolerance Flag: 
     0     0     0     0     0     0
------------------------------------------------------------
Test D-2
Wrapped Weeks Method: GPU Global Search
The JACKET sofware was not located.
diary off
