Code

Appendix C of the book lists various pieces of code developed and described in detail throughout the book's main text. This code is made available here electronically in precisely+ the same form as it is reprinted in the book (see, however → copyright, for some parts of the code).

appendix C.1 file pk_code_s8.f90 - when executed this .f90 file produces:

(a) the following final lines as output on the screen:

simplct dtend 1.893120664545875E-11

    1.729000000000000E+03    2.880000000000000E+02    7.781652229058686E-06
   -4.188984575485651E-05    7.356245424554244E-05
   -1.471990480456968E-05    6.726320529854618E-06
   44.478345147777546        45.868285689828717     
   1.4142135623730951       0.99999999983112664     

history: produced on MacBook Pro 13" /m_siam/tar_xvf_book_23_05/code_sub (29 August 2011)

(b) the file xx46 (among others)

file history: the above file xx46 file pulled from /m_siam/tar_xvf_book_23_05/code_sub (29 August 2011)

appendix C.2 file aux_routines_v2.f90

appendix C.3 file nr_routines_v1.f90 [see → copyright]

appendix C.4 file aux_routines_v2_nag.f90

appendix C.5 file kasahara_nms_1.f90 - when executed this .f90 file produces the file nms_data

file history: the above file nms_data file pulled from /m_siam/tar_xvf_book_23_05/code_sub (28 August 2011)

appendix C.6 file burg_1.f90 - when executed this .f90 file produces the following final line as output on the screen (see, footnote 89 in chapter 7 in the book on p. 212):

Gal PS diff at x_n    0.996433829112603E+00    0.996433829112594E+00   -0.921485110438880E-14

history: produced on MacBook Pro 13" /m_siam/tar_xvf_book_23_05/code_sub (29 August 2011)

appendix C.7 file f_fft.f90 - when executed this .f90 file produces the following output on the screen (see, exercise 10.1 on p. 340 and item 11.2.1D on p. 346 in the book):

  L times F+1 u.l. corner
      1  1.00D+00  0.00D+00     1.00D+00  0.00D+00     1.00D+00  0.00D+00     1.00D+00  0.00D+00
      2  1.00D+00  0.00D+00    -6.66D-16 -1.00D+00    -1.00D+00  0.00D+00     6.66D-16  1.00D+00
      3  1.00D+00  0.00D+00    -1.00D+00  0.00D+00     1.00D+00  0.00D+00    -1.00D+00  0.00D+00
      4  1.00D+00  0.00D+00     6.66D-16  1.00D+00    -1.00D+00  0.00D+00    -6.66D-16 -1.00D+00
  L times F-1 u.l. corner
      1  1.00D+00  0.00D+00     1.00D+00  0.00D+00     1.00D+00  0.00D+00     1.00D+00  0.00D+00
      2  1.00D+00  0.00D+00    -6.66D-16  1.00D+00    -1.00D+00  0.00D+00     6.66D-16 -1.00D+00
      3  1.00D+00  0.00D+00    -1.00D+00  0.00D+00     1.00D+00  0.00D+00    -1.00D+00  0.00D+00
      4  1.00D+00  0.00D+00     6.66D-16 -1.00D+00    -1.00D+00  0.00D+00    -6.66D-16  1.00D+00

history: produced on MacBook Pro 13" /m_siam/tar_xvf_book_23_05/code_sub (29 August 2011)

file history: the above seven .f90 files pulled from the de-tarred tar-file in /m_siam/tar_xvf_book_23_05/code_sub (26 August 2011)

The following file is referred to by the code of appendix C.5 (see also, item 11.2.1B on p. 346 and footnote 63 in chapter 6 on p. 162):

file kasahara_nms_1_aux.f90 [see → copyright]

The following file is referred to by the code of appendices C.6, and C.7 (see also, items 11.2.1C, and 11.2.1.D, on p. 346):

file add_f_fft.f90 [see → copyright]

file history: the above two files pulled from Documents/peak_2009 (26 August 2011)

+ Note: The only two - insignificant - exceptions to this precise electronic reproduction of the code as it appears in the book are:

(a) The line of code specifying variable rfswe in module setpars in pk_code_s8.f90 is reprinted in the book on p. 441 as

      double precision,parameter,public :: rfswe  = 98060.0d00 

but contained in the electronic code provided here as

      double precision,parameter,public :: rfswe  = 98060.0d00 !29400.0d00!0.0d00 

This shortening of the line in the book became necessary for editorial reasons (24 September 2011).

(b) Within routine t_spec the electronic code provided here contains within the line

call gg2sp (xnm,xfield,pwg) !--> see alpnm1

an obsolete comment that does not appear in the book where this line is on p. 458 thus reading

call gg2sp (xnm,xfield,pwg)

In summary, the printed pk_code_s8.f90 code in the book is thus a bit cleaner (31 October 2011).